summaryrefslogtreecommitdiff
path: root/debian/custom
diff options
context:
space:
mode:
authorjcorgan2009-07-14 17:17:45 +0000
committerjcorgan2009-07-14 17:17:45 +0000
commit09a2e8374e5ca4abbcdc8b872244756ce774dab3 (patch)
tree94a96b87356bd30c26525428137e1d6c04ebaf93 /debian/custom
parentc51227a80b5e03e2d18f02f8693de97610fe8f00 (diff)
downloadgnuradio-09a2e8374e5ca4abbcdc8b872244756ce774dab3.tar.gz
gnuradio-09a2e8374e5ca4abbcdc8b872244756ce774dab3.tar.bz2
gnuradio-09a2e8374e5ca4abbcdc8b872244756ce774dab3.zip
Reorganization of debian package directory
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@11424 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'debian/custom')
-rw-r--r--debian/custom/grc.conf9
-rw-r--r--debian/custom/libusrp.udev1
-rw-r--r--debian/custom/libusrp2.limits1
-rw-r--r--debian/custom/usrp.hotplug47
4 files changed, 58 insertions, 0 deletions
diff --git a/debian/custom/grc.conf b/debian/custom/grc.conf
new file mode 100644
index 000000000..eb503ec95
--- /dev/null
+++ b/debian/custom/grc.conf
@@ -0,0 +1,9 @@
+# This file contains system wide configuration data for GNU Radio.
+# You may override any setting on a per-user basis by editing
+# ~/.gnuradio/config.conf
+
+[grc]
+pythonw = python
+doc_dir = /usr/share/doc/gnuradio-doc
+global_blocks_path = /usr/share/gnuradio/grc/blocks
+local_blocks_path = /usr/local/share/gnuradio/grc/blocks
diff --git a/debian/custom/libusrp.udev b/debian/custom/libusrp.udev
new file mode 100644
index 000000000..e45dc294a
--- /dev/null
+++ b/debian/custom/libusrp.udev
@@ -0,0 +1 @@
+ACTION=="add", BUS=="usb", SYSFS{idVendor}=="fffe", SYSFS{idProduct}=="0002", GROUP:="usrp", MODE:="0660"
diff --git a/debian/custom/libusrp2.limits b/debian/custom/libusrp2.limits
new file mode 100644
index 000000000..f259b2992
--- /dev/null
+++ b/debian/custom/libusrp2.limits
@@ -0,0 +1 @@
+@usrp - rtprio 50
diff --git a/debian/custom/usrp.hotplug b/debian/custom/usrp.hotplug
new file mode 100644
index 000000000..e8b943204
--- /dev/null
+++ b/debian/custom/usrp.hotplug
@@ -0,0 +1,47 @@
+#! /bin/sh
+
+GROUP=usrp
+
+# Set the permissions for the USRP devices right.
+set_permissions() {
+ if [ -f "$1" ]
+ then
+ if getent group $GROUP > /dev/null; then
+ chmod 660 "$DEVICE"
+ chown root.$GROUP "$1"
+ fi
+ fi
+}
+
+#
+# If we do not have /sbin/hotplug, we are being called by post-sarge udev
+# emulating hotplug. In that case, all of this is handled by our udev rules,
+# so we don't need to duplicate the work done here.
+#
+if ! [ -x /sbin/hotplug ]; then
+ exit
+fi
+
+if [ "$ACTION" != "add" ]; then
+ exit
+fi
+
+# FIXME: Map the USB device ID to usrper's idea of "which USRP".
+# For now, we just assume the user only has a single one.
+
+case $PRODUCT in
+ # USRP without loaded firmware
+ fffe/2/2 | fffe/2/4)
+ sleep 1 # required on some machines
+ /usr/bin/usrper load_standard_bits
+ set_permissions "$DEVICE"
+ ;;
+
+ # USRP with loaded firmware
+ fffe/2/102 | fffe/2/104)
+ set_permissions "$DEVICE"
+ ;;
+esac
+
+
+