Merged r6224:6268 from features/deb into trunk. Implements most of a Debian package...
[debian/gnuradio] / debian / rules
index 2fe14ac5f86ff1daf599169f7111a9730174103a..cc8b2bfc974f2a1a4ad48d3524530240d15d842e 100755 (executable)
@@ -24,6 +24,30 @@ else
        CFLAGS += -O2
 endif
 
+clean:
+       dh_testdir
+       dh_testroot
+       rm -f build-stamp configure-stamp
+
+       if [ -f Makefile ]; \
+       then\
+               if [ -d .svn ]; \
+               then \
+                       $(MAKE) maintainer-clean; \
+               else \
+                       $(MAKE) distclean; \
+               fi; \
+       fi
+
+       dh_clean
+
+update:
+       dh_testdir
+       -test -r /usr/share/misc/config.sub && \
+               cp -f /usr/share/misc/config.sub config.sub
+       -test -r /usr/share/misc/config.guess && \
+               cp -f /usr/share/misc/config.guess config.guess
+
 configure: configure-stamp
 configure-stamp:
        dh_testdir
@@ -37,47 +61,27 @@ configure-stamp:
                --disable-gr-qtgui
        touch configure-stamp
 
+extract: extract-stamp
+extract-stamp: configure-stamp
+       dh_testdir
+       debian/gen-install-files.sh 
+       touch $@
+
 build: build-stamp
-build-stamp: configure-stamp 
+build-stamp: extract-stamp
 
        $(MAKE) 
        $(MAKE) check
        touch $@
 
-update:
-       -test -r /usr/share/misc/config.sub && \
-               cp -f /usr/share/misc/config.sub config.sub
-       -test -r /usr/share/misc/config.guess && \
-               cp -f /usr/share/misc/config.guess config.guess
-
-clean:
-       dh_testdir
-       dh_testroot
-       rm -f build-stamp configure-stamp
-
-       if [ -f Makefile ]; \
-       then\
-               if [ -d .svn ]; \
-               then \
-                       $(MAKE) maintainer-clean; \
-               else \
-                       $(MAKE) distclean; \
-               fi; \
-       fi
-
-
-       dh_clean
-
-install:
+install: install-stamp
+install-stamp: build-stamp
        dh_testdir
        dh_testroot
        dh_clean -k
        dh_installdirs
 
        $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
-#      install -m 0755 debian/usrp.hotplug \
-#              $(CURDIR)/debian/usrp/etc/hotplug.d/usb/
-
        : # make python scripts starting with '#!' executable
        for i in `find debian -mindepth 2 -type f ! -perm 755`; do \
          if head -1 $$i | grep -q '^#!'; then \
@@ -88,6 +92,9 @@ install:
 
        dh_install --sourcedir=debian/tmp --list-missing
 
+#      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 {} \;
@@ -101,6 +108,8 @@ install:
 #              debian/usrp/usr/bin/usrp_ra_receiver
 #      mv debian/usrp/usr/bin/usrp_psr_receiver.py \
 #              debian/usrp/usr/bin/usrp_psr_receiver
+       touch $@
+
 
 # Must not depend on anything. This is to be called by
 # binary-arch/binary-indep
@@ -124,15 +133,7 @@ binary-common:
 #      dh_installinfo
        dh_installman
        dh_link
-ifneq (,$(findstring -s,$(DH_OPTIONS)))
-       dh_strip --no-package=libgnuradio-core0c2a --no-package=libusrp0c2a
-       DH_OPTIONS= dh_strip --package=libgnuradio-core0c2a \
-               --dbg-package=libgnuradio-core0c2a-dbg
-       DH_OPTIONS= dh_strip --package=libusrp0c2a \
-               --dbg-package=libusrp0c2a-dbg
-else
        dh_strip
-endif
        dh_compress 
 #      dh_movefiles --sourcedir=debian/gnuradio
        dh_fixperms