]> git.gag.com Git - debian/gnuradio/commitdiff
Added enabling group 'user' access to USRP hardware into Debian packaging.
authorjcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5>
Sat, 13 Oct 2007 20:50:09 +0000 (20:50 +0000)
committerjcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5>
Sat, 13 Oct 2007 20:50:09 +0000 (20:50 +0000)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@6630 221aa14e-8319-0410-a670-987f0aec2ac5

debian/libusrp0c2a.dirs
debian/libusrp0c2a.install
debian/libusrp0c2a.postinst [new file with mode: 0644]
debian/libusrp0c2a.postrm [new file with mode: 0644]
debian/libusrp0c2a.udev [new file with mode: 0644]
debian/rules

index cc85a6f23dcfb2fd4cb786c0a1fce4b77672da44..c5a0290d01ebf860609417c932b7661500a2dbe8 100644 (file)
@@ -1,3 +1,3 @@
 usr/lib
 usr/lib/pkgconfig
-etc/hotplug.d/usb
+etc/udev/rules.d
index 4fedca772b972861bd50d2e1c8acd07701801b38..42d895305b2a0d454b94470b271850d34764af73 100644 (file)
@@ -1,3 +1,4 @@
-usr/lib/pkgconfig/usrp.pc
 usr/lib/libusrp.la
 usr/lib/libusrp.so.*
+usr/lib/pkgconfig/usrp.pc
+etc/udev/rules.d/40-usrp.rules
diff --git a/debian/libusrp0c2a.postinst b/debian/libusrp0c2a.postinst
new file mode 100644 (file)
index 0000000..6ed2f9e
--- /dev/null
@@ -0,0 +1,14 @@
+#! /bin/sh
+
+set -e
+
+if [ "$1" != "configure" ]; then
+       exit 0
+fi
+
+# Create usrp group for udev access
+if ! getent group usrp >/dev/null; then
+    addgroup --system usrp
+fi
+
+exit 0
diff --git a/debian/libusrp0c2a.postrm b/debian/libusrp0c2a.postrm
new file mode 100644 (file)
index 0000000..4abb561
--- /dev/null
@@ -0,0 +1,11 @@
+#! /bin/sh
+
+set -e
+
+if [ "$1" != "remove" ]; then
+       exit 0
+fi
+
+rm -f /etc/udev/rules.d/40-usrp.rules
+
+exit 0
diff --git a/debian/libusrp0c2a.udev b/debian/libusrp0c2a.udev
new file mode 100644 (file)
index 0000000..e45dc29
--- /dev/null
@@ -0,0 +1 @@
+ACTION=="add", BUS=="usb", SYSFS{idVendor}=="fffe", SYSFS{idProduct}=="0002", GROUP:="usrp", MODE:="0660"
index b9c8ac6228574dfab9c4726a1966249091a953be..00348e26e938ec0158363977c90e7b593f15eb8d 100755 (executable)
@@ -80,12 +80,11 @@ install-stamp: build-stamp
          fi; \
        done
 
-       dh_install --sourcedir=debian/tmp
-
-# FIXME: Ubuntu vs. Debian (below)
-#      install -m 0755 debian/usrp.hotplug \
-#              $(CURDIR)/debian/usrp/etc/hotplug.d/usb/
+       : # Deposit rule to allow group 'usrp' access to USRP hardware
+       install -m 0755 -D debian/libusrp0c2a.udev \
+               debian/tmp/etc/udev/rules.d/40-usrp.rules
 
+       dh_install --sourcedir=debian/tmp
        touch $@