From 35259f3084142193b3c4a16bea14e4fab98c9958 Mon Sep 17 00:00:00 2001 From: jcorgan Date: Thu, 20 Sep 2007 23:06:27 +0000 Subject: [PATCH 1/1] Work in progress with Debian packaging. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@6489 221aa14e-8319-0410-a670-987f0aec2ac5 --- debian/changelog | 3 +- debian/control | 383 ++++++++++++++++++------------------ debian/copyright | 9 +- debian/gen-install-files.sh | 4 +- debian/libusrp0c2a.dirs | 1 + debian/rules | 32 +-- debian/usrp.hotplug | 47 +++++ 7 files changed, 255 insertions(+), 224 deletions(-) create mode 100644 debian/usrp.hotplug diff --git a/debian/changelog b/debian/changelog index 65a87e47..acccb613 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ -gnuradio (3.0.svn) UNRELEASED; urgency=low +gnuradio (3.0.svn) unstable; urgency=low + * add/split packages to cover entire GNU Radio distribution * fix build failure with gcc-4.3 by adding a #include, closes: #420896 * update copyright assertion on the debian/ contents, since I have assigned my copyright to the FSF and now have upstream commit rights diff --git a/debian/control b/debian/control index c463e3aa..384d2c2b 100644 --- a/debian/control +++ b/debian/control @@ -11,6 +11,7 @@ XS-Python-Version: >= 2.3 Package: libgnuradio-omnithread0c2a Section: libs Architecture: any +Depends: ${shlibs:Depends} Description: GNU Radio Omnithreads Abstraction Library This package is a fork of the omniORB-4.0.1 threading library for use with GNU Radio. @@ -28,10 +29,10 @@ Description: GNU Radio Omnithreads Abstraction Library Package: libpmt0c2a Section: libs Architecture: any -Depends: libgnuradio-omnithread0c2a +Depends: ${shlibs:Depends}, libgnuradio-omnithread0c2a Description: GNU Radio Polymorphic Type Library This package implements polymorphic types. These are similar - to lisp or python data objects, and implement transparent + to lisp or Python data objects, and implement transparent reference counting using the boost shared_ptr templates. Package: libpmt0-dev @@ -48,7 +49,7 @@ Description: GNU Radio Polymorphic Type Library Package: libmblock0c2a Section: libs Architecture: any -Depends: libgnuradio-omnithread0c2a, libpmt0c2a +Depends: ${shlibs:Depends}, libgnuradio-omnithread0c2a, libpmt0c2a Description: GNU Radio Message Block Library This package provides the GNU Radio message block library. @@ -64,7 +65,7 @@ Description: GNU Radio Message Block Library Package: libgnuradio-core0c2a Section: libs Architecture: any -Depends: libgnuradio-omnithread0c2a, fftw3 +Depends: ${shlibs:Depends}, libgnuradio-omnithread0c2a Conflicts: libgnuradio-core0, libgnuradio-core0c2 Replaces: libgnuradio-core0, libgnuradio-core0c2 Suggests: gnuradio-doc @@ -89,7 +90,7 @@ Description: Software Defined Radio Package: python-gnuradio-core Architecture: any -Depends: ${python:Depends}, libgnuradio-core0c2a, python-numpy +Depends: ${python:Depends}, ${shlibs:Depends}, python-numpy Provides: ${python:Provides} Section: python XB-Python-Version: ${python:Versions} @@ -97,122 +98,21 @@ Description: Python bindings for GNU Radio core library This package provides the modules that enable one to use gnuradio from Python scripts. -Package: libusrp0c2a -Section: libs -Architecture: any -Depends: libusb-0.1-4 -Conflicts: libusrp0 -Replaces: libusrp0 -Suggests: usrp-doc, usrp-firmware -Description: Client side library for the USRP - The Universal Software Radio Peripheral (USRP) is an USB-connected, - low-cost and open board. It features four high-speed analog-to-digital - and digital-to-analog converters, an FPGA and a microcontroller. It's - ideal for capturing or transmitting various signals, usually in - combination with GNU Radio. The design schemas are available under a - free license. - . - This package contains the client-side library, providing an easy interface - for communicating with the USRP. - -Package: libusrp0-dev -Section: libdevel -Architecture: any -Depends: libusb-dev -Description: Client side library for the USRP - The Universal Software Radio Peripheral (USRP) is an USB-connected, - low-cost and open board. It features four high-speed analog-to-digital - and digital-to-analog converters, an FPGA and a microcontroller. It's - ideal for capturing or transmitting various signals, usually in - combination with GNU Radio. The design schemas are available under a - free license. - . - This package contains the client-side library, providing an easy interface - for communicating with the USRP. - . - This package contains header files needed by developers. - -Package: libusrp-inband0c2a -Section: libs -Architecture: any -Depends: libusrp0c2a -Suggests: usrp-inband-firmware -Description: Client side library for the USRP with in-band signaling - The package is an alternative C++ interface to the USRP that implements - an experimental in-band signaling method across the USB. - -Package: libusrp-inband0-dev -Section: libdevel -Architecture: any -Depends: libusrp0-dev -Description: Client side library for the USRP with in-band signaling - The package is an alternative C++ interface to the USRP that implements - an experimental in-band signaling method across the USB. - . - This package contains header files needed by developers. - -Package: usrp-firmware -Section: contrib/comm -Architecture: all -Description: control applications and firmware for the USRP - The Universal Software Radio Peripheral (USRP) is an USB-connected, - low-cost and open board. It features four high-speed analog-to-digital - and digital-to-analog converters, an FPGA and a microcontroller. It's - ideal for capturing or transmitting various signals, usually in - combination with GNU Radio. The design schemas are available under a - free license. - . - This package contains the basic FPGA bitstrings for normal USRP operation, - which need non-free tools to build. - -Package: usrp-doc -Section: doc -Architecture: all -Description: Software Defined Radio - This package contains the documentation for the Universal Software Radio - Peripheral (USRP) hardware and interface library. - -Package: python-usrp -Architecture: any -Depends: ${python:Depends}, libusrp0c2a -Provides: ${python:Provides} -Section: python -XB-Python-Version: ${python:Versions} -Description: Python bindings for the USRP library - This package provides the modules that enable one to use the USRP as a - standalone device from Python, independent of GNU Radio proper. - -Package: python-gnuradio-usrp -Architecture: any -Depends: ${python:Depends}, python-gnuradio-core, python-usrp -Section: python -XB-Python-Version: ${python:Versions} -Description: Python bindings for GNU Radio USRP driver - This package provides the Python interface to the GNU Radio USRP - driver and daughterboard drivers. - Package: python-gnuradio-wxgui Architecture: any Depends: ${python:Depends}, python-gnuradio-core, python-wxgtk2.6 +Provides: ${python:Provides} Section: python XB-Python-Version: ${python:Versions} Description: GNU Radio Graphical Interface Routines based on wxPython This package provides high level GUI construction classes based upon the wxPython bindings for wxWidgets. -Package: python-gnuradio-atsc -Architecture: any -Depends: ${python:Depends}, python-gnuradio-core -Section: python -XB-Python-Version: ${python:Versions} -Description: GNU Radio ATSC Receiver - This package provides a decoder for ATSC waveforms using GNU Radio. - Package: python-gnuradio-audio-alsa Architecture: any -Depends: ${python:Depends}, python-gnuradio-core, libasound2 +Depends: ${python:Depends}, ${shlibs:Depends}, python-gnuradio-core Section: python -Provides: python-gnuradio-audio +Provides: ${python:Provides}, python-gnuradio-audio XB-Python-Version: ${python:Versions} Description: Python bindings for GNU Radio ALSA audio driver This package provides the Python interface to the GNU Radio ALSA @@ -220,9 +120,9 @@ Description: Python bindings for GNU Radio ALSA audio driver Package: python-gnuradio-audio-jack Architecture: any -Depends: ${python:Depends}, python-gnuradio-core, libjack0.100.0-0 +Depends: ${python:Depends}, ${shlibs:Depends}, python-gnuradio-core Section: python -Provides: python-gnuradio-audio +Provides: ${python:Provides}, python-gnuradio-audio XB-Python-Version: ${python:Versions} Description: GNU Radio Python JACK Audio Driver This package provides the Python interface to the GNU Radio driver @@ -230,9 +130,9 @@ Description: GNU Radio Python JACK Audio Driver Package: python-gnuradio-audio-oss Architecture: any -Depends: ${python:Depends}, python-gnuradio-core +Depends: ${python:Depends}, ${shlibs:Depends}, python-gnuradio-core Section: python -Provides: python-gnuradio-audio +Provides: ${python:Provides}, python-gnuradio-audio XB-Python-Version: ${python:Versions} Description: GNU Radio Python OSS Audio Driver This package provides the Python interface to the GNU Radio driver @@ -240,17 +140,27 @@ Description: GNU Radio Python OSS Audio Driver Package: python-gnuradio-audio-portaudio Architecture: any -Depends: ${python:Depends}, python-gnuradio-core, libportaudio2 +Depends: ${python:Depends}, ${shlibs:Depends}, python-gnuradio-core +Provides: ${python:Provides}, python-gnuradio-audio Section: python -Provides: python-gnuradio-audio XB-Python-Version: ${python:Versions} Description: GNU Radio Python PortAudio Driver This package provides the Python interface to the GNU Radio driver for the PortAudio audio system. +Package: python-gnuradio-atsc +Architecture: any +Depends: ${python:Depends}, ${shlibs:Depends}, python-gnuradio-core +Provides: ${python:Provides} +Section: python +XB-Python-Version: ${python:Versions} +Description: GNU Radio ATSC Receiver + This package provides a decoder for ATSC waveforms using GNU Radio. + Package: python-gnuradio-comedi Architecture: any -Depends: ${python:Depends}, python-gnuradio-core, libcomedi-0.7.22 +Depends: ${python:Depends}, ${shlibs:Depends}, python-gnuradio-core +Provides: ${python:Provides} Section: python XB-Python-Version: ${python:Versions} Description: GNU Radio Python Comedilib Driver @@ -259,7 +169,8 @@ Description: GNU Radio Python Comedilib Driver Package: python-gnuradio-cvsd-vocoder Architecture: any -Depends: ${python:Depends}, python-gnuradio-core +Depends: ${python:Depends}, ${shlibs:Depends}, python-gnuradio-core +Provides: ${python:Provides} Section: python XB-Python-Version: ${python:Versions} Description: GNU Radio CVSD Vocoder @@ -268,7 +179,8 @@ Description: GNU Radio CVSD Vocoder Package: python-gnuradio-gsm-fr-vocoder Architecture: any -Depends: ${python:Depends}, python-gnuradio-core +Depends: ${python:Depends}, ${shlibs:Depends}, python-gnuradio-core +Provides: ${python:Provides} Section: python XB-Python-Version: ${python:Versions} Description: GNU Radio GSM Full-Rate Vocoder @@ -277,80 +189,178 @@ Description: GNU Radio GSM Full-Rate Vocoder Package: python-gnuradio-trellis Architecture: any -Depends: ${python:Depends}, python-gnuradio-core +Depends: ${python:Depends}, ${shlibs:Depends}, python-gnuradio-core +Provides: ${python:Provides} Section: python XB-Python-Version: ${python:Versions} Description: GNU Radio Trellis-Coded Modulation library - This package provides an implementation of trellis-code modulation + This package provides an implementation of trellis-coded modulation for GNU Radio. Package: python-gnuradio-video-sdl Architecture: any -Depends: ${python:Depends}, python-gnuradio-core, libsdl1.2debian +Depends: ${python:Depends}, ${shlibs:Depends}, python-gnuradio-core +Provides: ${python:Provides} Section: python XB-Python-Version: ${python:Versions} -Description: GNU SDL Interface Library +Description: GNU Radio SDL Interface Library This package provides an interface to the SDL rendering library for GNU Radio. -Package: python-gnuradio-utils -Architecture: any -Depends: ${python:Depends}, python-gnuradio-usrp, python-gnuradio-wxgui +Package: python-gnuradio Section: python +Architecture: all +Depends: python-gnuradio-core, python-gnuradio-wxgui, python-gnuradio-alsa | python-gnuradio-audio, python-gnuradio-atsc, python-gnuradio-comedi, python-gnuradio-cvsd-vocoder, python-gnuradio-gsm-fr-vocoder, python-gnuradio-trellis, python-gnuradio-video-sdl +Provides: ${python:Provides} XB-Python-Version: ${python:Versions} -Description: GNU Radio Trellis-Coded Modulation library - This package provides commonly used utilities for GNU Radio +Description: Python Libraries for GNU Radio Components + This is a virtual package that depends upon all the Python components + for GNU Radio. Package: gnuradio-examples Architecture: any -Depends: ${python:Depends}, python-gnuradio-usrp, python-gnuradio-wxgui, python-gnuradio-audio +Suggests: usrp +Depends: ${python:Depends}, python-gnuradio-core, python-gnuradio-wxgui, python-gnuradio-audio-alsa | python-gnuradio-audio Section: comm XB-Python-Version: ${python:Versions} Description: GNU Radio Example Programs This package provides examples of GNU Radio usage using Python -Package: gnuradio-pager -Architecture: any -Depends: ${python:Depends}, python-gnuradio-usrp +Package: gnuradio Section: comm +Architecture: all +Depends: gnuradio-doc, python-gnuradio, gnuradio-examples +Suggests: usrp +Descripton: GNU Software Defined Radio + This is a virtual package that depends the entire GNU Radio collection of + components. If you are using a USRP, you should also install the usrp package. + +Package: gnuradio-dev +Section: libdevel +Architecture: all +Depends: libgnuradio-core0-dev, libgnuradio-omnithread0-dev, libmblock0-dev, libpmt0-dev +Description: Development headers for GNU Radio C++ development + This is a virtual package that depends on all the development header packages + for the various GNU Radio components. It is only needed if you intend to develop + custom GNU Radio signal processing blocks in C++. + +Package: usrp-firmware +Section: contrib/comm +Architecture: all +Description: control applications and firmware for the USRP + The Universal Software Radio Peripheral (USRP) is an USB-connected, + low-cost and open board. It features four high-speed analog-to-digital + and digital-to-analog converters, an FPGA and a microcontroller. It's + ideal for capturing or transmitting various signals, usually in + combination with GNU Radio. The design schemas are available under a + free license. + . + This package contains the basic FPGA bitstrings for normal USRP operation, + which need non-free tools to build. + +Package: libusrp0c2a +Section: contrib/libs +Architecture: any +Depends: ${shlibs:Depends}, usrp-firmware +Conflicts: libusrp0 +Replaces: libusrp0 +Suggests: usrp-doc +Description: Client side library for the USRP + The Universal Software Radio Peripheral (USRP) is an USB-connected, + low-cost and open board. It features four high-speed analog-to-digital + and digital-to-analog converters, an FPGA and a microcontroller. It's + ideal for capturing or transmitting various signals, usually in + combination with GNU Radio. The design schemas are available under a + free license. + . + This package contains the client-side library, providing an easy interface + for communicating with the USRP. + +Package: libusrp0-dev +Section: contrib/libdevel +Architecture: any +Depends: libusrp0c2a (= ${Source-Version}), libusb-dev +Description: Client side library for the USRP + The Universal Software Radio Peripheral (USRP) is an USB-connected, + low-cost and open board. It features four high-speed analog-to-digital + and digital-to-analog converters, an FPGA and a microcontroller. It's + ideal for capturing or transmitting various signals, usually in + combination with GNU Radio. The design schemas are available under a + free license. + . + This package contains the client-side library, providing an easy interface + for communicating with the USRP. + . + This package contains header files needed by developers. + +Package: libusrp-inband0c2a +Section: contrib/libs +Architecture: any +Depends: ${shlibs:Depends} +Description: Client side library for the USRP with in-band signaling + The package is an alternative C++ interface to the USRP that implements + an experimental in-band signaling method across the USB. + +Package: libusrp-inband0-dev +Section: contrib/libdevel +Architecture: any +Depends: libusrp-inband0c2a (= ${Source-Version}), libusrp0-dev +Description: Client side library for the USRP with in-band signaling + The package is an alternative C++ interface to the USRP that implements + an experimental in-band signaling method across the USB. + . + This package contains header files needed by developers. + +Package: usrp-doc +Section: doc +Architecture: all +Description: Software Defined Radio + This package contains the documentation for the Universal Software Radio + Peripheral (USRP) hardware and interface library. + +Package: python-usrp +Architecture: any +Depends: ${python:Depends}, ${shlibs:Depends} +Provides: ${python:Provides} +Section: contrib/python XB-Python-Version: ${python:Versions} -Description: GNU Radio FLEX Pager Decoder - This package provides a decoder for the FLEX paging protocol for GNU Radio +Description: Python bindings for the USRP library + This package provides the modules that enable one to use the USRP as a + standalone device from Python, independent of GNU Radio proper. -Package: gnuradio-radio-astronomy +Package: python-gnuradio-usrp Architecture: any -Depends: ${python:Depends}, python-gnuradio-usrp, python-gnuradio-wxgui -Section: comm +Depends: ${python:Depends}, ${shlibs:Depends}, python-gnuradio-core, python-usrp +Provides: ${python:Provides} +Section: contrib/python XB-Python-Version: ${python:Versions} -Description: GNU Radio Radio Astronomy Applications - This package provides radio astronomy applications for GNU Radio +Description: Python bindings for GNU Radio USRP driver + This package provides the Python interface to the GNU Radio USRP + driver and daughterboard drivers. -Package: gnuradio-radar-mono +Package: gnuradio-utils Architecture: any -Depends: ${python:Depends}, python-gnuradio-usrp -Suggests: gnuradio-radar-mono-firmware -Section: comm +Depends: ${python:Depends}, ${shlibs:Depends}, python-gnuradio-usrp, python-gnuradio-wxgui +Provides: ${python:Provides} +Section: contrib/comm XB-Python-Version: ${python:Versions} -Description: GNU Radio Mono-static Radar Application - This package provides a mono-static radar application for GNU Radio +Description: GNU Radio Utilities + This package provides commonly used utilities for GNU Radio -Package: gnuradio-radar-mono-firmware +Package: usrp Section: contrib/comm Architecture: all -Description: GNU Radio Mono-static Radar Firmware - This package provides a mono-static radar application for GNU Radio - . - This package contains the FPGA bitstrings for the USRP, which require - non-free tools to build. +Depends: usrp-doc, usrp-firmware +Description: The Universal Software Radio Peripheral + This is a virtual package that depends on the entire USRP software collection. -Package: gnuradio-sounder +Package: gnuradio-pager Architecture: any -Depends: ${python:Depends}, python-gnuradio-usrp -Suggests: gnuradio-sounder-firmware -Section: comm +Depends: ${python:Depends}, ${shlibs:Depends}, python-gnuradio-usrp +Section: contrib/comm XB-Python-Version: ${python:Versions} -Description: GNU Radio Channel Sounder Application - This package provides an RF channel sounder application for GNU Radio +Description: GNU Radio FLEX Pager Decoder + This package provides a decoder for the FLEX paging protocol for GNU Radio Package: gnuradio-sounder-firmware Section: contrib/comm @@ -358,39 +368,38 @@ Architecture: all Description: GNU Radio Channel Sounder Application This package provides an RF channel sounder application for GNU Radio . - This package contains the FPGA bitstrings for the USRP, which require - non-free tools to build. + This package contains the custom FPGA bitstrings for the USRP, which + require non-free tools to build. -Package: python-gnuradio -Section: python -Architecture: all -Depends: python-gnuradio-atsc, python-gnuradio-audio-alsa, python-gnuradio-audio-jack, python-gnuradio-audio-oss, python-gnuradio-audio-portaudio, python-gnuradio-comedi, python-gnuradio-core, python-gnuradio-cvsd-vocoder, python-gnuradio-gsm-fr-vocoder, python-gnuradio-trellis, python-gnuradio-usrp, python-gnuradio-utils, python-gnuradio-video-sdl, python-gnuradio-wxgui -Description: Python Libraries for GNU Radio Components - This is a virtual package that depends upon all the Python components - for GNU Radio. +Package: gnuradio-sounder +Architecture: any +Depends: ${python:Depends}, ${shlibs:Depends}, python-gnuradio-usrp, gnuradio-sounder-firmware +Section: contrib/comm +XB-Python-Version: ${python:Versions} +Description: GNU Radio Channel Sounder Application + This package provides an RF channel sounder application for GNU Radio -Package: gnuradio -Section: comm +Package: gnuradio-radar-mono-firmware +Section: contrib/comm Architecture: all -Depends: gnuradio-doc, gnuradio-examples, python-gnuradio, gnuradio-pager, gnuradio-radar-mono, gnuradio-radio-astronomy, gnuradio-sounder -Suggests: usrp -Descripton: GNU Software Defined Radio - This is a virtual package that depends the entire GNU Radio collection of - components. If you are using a USRP, you should also install the usrp package. +Description: GNU Radio Monostatic Radar Firmware + This package provides a monostatic radar application for GNU Radio + . + This package contains the custom FPGA bitstrings for the USRP, which + require non-free tools to build. -Package: gnuradio-dev -Section: libdevel -Architecture: all -Depends: libgnuradio-core0-dev, libgnuradio-omnithread0-dev, libmblock0-dev, libpmt0-dev -Description: Development headers for GNU Radio C++ development - This is a virtual package that depends on all the development header packages - for the various GNU Radio components. It is only needed if you intend to develop - custom GNU Radio signal processing blocks in C++. +Package: gnuradio-radar-mono +Architecture: any +Depends: ${python:Depends}, ${shlibs:Depends}, python-gnuradio-usrp, gnuradio-radar-mono-firmware +Section: contrib/comm +XB-Python-Version: ${python:Versions} +Description: GNU Radio Monostatic Radar Application + This package provides a monostatic radar application for GNU Radio -Package: usrp -Section: comm -Architecture: all -Depends: python-usrp, usrp-doc, usrp-firmware -Description: The Univeral Software Radio Peripheral - This is a virtual package that depends on the entire USRP software collection. You will - still need to install package usrp-firmware, in contrib/comm, however. +Package: gnuradio-radio-astronomy +Architecture: any +Depends: ${python:Depends}, ${shlibs:Depends}, python-gnuradio-usrp, python-gnuradio-wxgui +Section: contrib/comm +XB-Python-Version: ${python:Versions} +Description: GNU Radio Radio Astronomy Applications + This package provides radio astronomy applications for GNU Radio diff --git a/debian/copyright b/debian/copyright index 9c9e7125..d93151a4 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,17 +1,17 @@ GNU Radio was re-packaged by Bdale Garbee to reflect upstream restructuring on Wed, 6 Sep 2006 16:02:03 -0600. Much was learned and portions were taken from the previous Debian packages built -by Ramakrishnan Muthukrishnan and Steinar H. Gunderson +by Ramakrishnan Muthukrishnan and Steinar H. Gunderson. GNU Radio was downloaded from http://www.gnu.org/software/gnuradio/ Upstream Authors: Eric Blossom Matt Ettus - Stephane Fillod - + Johnathan Corgan + See the AUTHORS file for a more complete list of contributors. -The current upstream maintainer is Johnathan Corgan +The current upstream maintainer is Johnathan Corgan. Copyright: @@ -24,4 +24,3 @@ on a Debian system at: The Debian packaging was created by Bdale Garbee , is (c) Copyright 2006 Hewlett-Packard Development Company, L.P., and is made available under the terms of the GPL. - diff --git a/debian/gen-install-files.sh b/debian/gen-install-files.sh index 4ae877fe..4fcccadc 100755 --- a/debian/gen-install-files.sh +++ b/debian/gen-install-files.sh @@ -190,8 +190,8 @@ $EXTRACT gr-video-sdl/src/Makefile ourlib_LTLIBRARIES >>$NAME $EXTRACT gr-video-sdl/src/Makefile ourlib_LTLIBRARIES | \ sed -e 's/\.la$/.so/' >>$NAME -# python-gnuradio-video-sdl -NAME=debian/python-gnuradio-utils.install +# gnuradio-utils +NAME=debian/gnuradio-utils.install rm -f $NAME touch $NAME $EXTRACT gr-utils/src/python/Makefile bin_SCRIPTS >>$NAME diff --git a/debian/libusrp0c2a.dirs b/debian/libusrp0c2a.dirs index b448f1a6..cc85a6f2 100644 --- a/debian/libusrp0c2a.dirs +++ b/debian/libusrp0c2a.dirs @@ -1,2 +1,3 @@ usr/lib usr/lib/pkgconfig +etc/hotplug.d/usb diff --git a/debian/rules b/debian/rules index a0f70f4d..92d5bd65 100755 --- a/debian/rules +++ b/debian/rules @@ -27,7 +27,7 @@ endif clean: dh_testdir dh_testroot - rm -f build-stamp configure-stamp + rm -f build-stamp configure-stamp extract-stamp install-stamp if [ -f Makefile ]; \ then\ @@ -90,24 +90,12 @@ install-stamp: build-stamp fi; \ done - dh_install --sourcedir=debian/tmp --list-missing + dh_install --sourcedir=debian/tmp +# FIXME: Ubuntu vs. Debian (below) # install -m 0755 debian/usrp.hotplug \ # $(CURDIR)/debian/usrp/etc/hotplug.d/usb/ -# cp -r gnuradio-examples/python/* \ -# debian/gnuradio-examples/usr/share/gnuradio/ -# find debian/gnuradio-examples -type f -name Makefile\* -exec rm {} \; -# find debian/gnuradio-examples -type d -name CVS -exec rm {} \; -# find debian/gnuradio-examples -name \*.py -exec chmod +x {} \; - -# mv debian/gnuradio/usr/bin/microtune.py \ -# debian/gnuradio/usr/bin/microtune - -# mv debian/usrp/usr/bin/usrp_ra_receiver.py \ -# debian/usrp/usr/bin/usrp_ra_receiver -# mv debian/usrp/usr/bin/usrp_psr_receiver.py \ -# debian/usrp/usr/bin/usrp_psr_receiver touch $@ @@ -119,25 +107,11 @@ binary-common: dh_testroot dh_installchangelogs ChangeLog dh_installdocs - dh_installexamples -# dh_installmenu -# dh_installdebconf -# dh_installlogrotate -# dh_installemacsen -# dh_installpam -# dh_installmime dh_pycentral - dh_python -# dh_installinit -# dh_installcron -# dh_installinfo - dh_installman dh_link dh_strip dh_compress -# dh_movefiles --sourcedir=debian/gnuradio dh_fixperms -# dh_perl dh_makeshlibs dh_installdeb dh_shlibdeps diff --git a/debian/usrp.hotplug b/debian/usrp.hotplug new file mode 100644 index 00000000..e8b94320 --- /dev/null +++ b/debian/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 + + + -- 2.30.2