changes from running bootstrap and then make maintainer-clean
[debian/gnuradio] / debian / rules
1 #!/usr/bin/make -f
2
3 # Uncomment this to turn on verbose mode.
4 export DH_VERBOSE=1
5
6 # This has to be exported to make some magic below work.
7 export DH_OPTIONS
8
9 export DH_PYCENTRAL=nomove
10
11 DEB_BUILD_GNU_TYPE = $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
12
13 clean:
14         dh_testdir
15         dh_testroot
16         rm -f build-stamp configure-stamp extract-stamp install-stamp
17
18         # Remove (possibly stale) pre-built Qt-generated moc files; they will
19         # be rebuilt using the current Qt moc.  Perhaps this should actually be
20         # part of 'make distclean' and these files not be distributed:
21         rm -f ./gr-qtgui/src/lib/*_moc.cc
22
23         if [ -f Makefile ]; \
24         then\
25                 $(MAKE) maintainer-clean; \
26         fi
27
28         dh_clean
29
30 update:
31         dh_testdir
32         -test -r /usr/share/misc/config.sub && \
33                 cp -f /usr/share/misc/config.sub config.sub
34         -test -r /usr/share/misc/config.guess && \
35                 cp -f /usr/share/misc/config.guess config.guess
36
37 configure: configure-stamp
38 configure-stamp:
39         dh_testdir
40         ./bootstrap
41         ./configure \
42                 --build=$(DEB_BUILD_GNU_TYPE) \
43                 --prefix=/usr \
44                 --mandir=\$${prefix}/share/man \
45                 --infodir=\$${prefix}/share/info \
46                 --enable-shared \
47                 --sysconfdir=/etc \
48                 --enable-all-components \
49                 --disable-gr-audio-osx \
50                 --disable-gr-audio-windows \
51                 --disable-gcell --disable-gr-gcell \
52                 --disable-gr-comedi --disable-usrp2-firmware 
53         touch configure-stamp
54
55 build: build-stamp
56 build-stamp: configure-stamp
57
58         $(MAKE)
59         $(MAKE) check
60         touch $@
61
62 extract: extract-stamp
63 extract-stamp: build-stamp debian/gen-install-files.sh
64         dh_testdir
65         chmod +x debian/gen-install-files.sh dtools/bin/extract_install_filenames
66         debian/gen-install-files.sh
67         touch $@
68
69 install: install-stamp
70 install-stamp: extract-stamp debian/control
71         dh_testdir
72         dh_testroot
73         dh_clean -k
74         dh_installdirs
75
76         $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
77         : # make python scripts starting with '#!' executable
78         for i in `find debian -mindepth 2 -type f ! -perm 755`; do \
79           if head -1 $$i | grep -q '^#!'; then \
80             chmod 755 $$i; \
81             echo "made executable: $$i"; \
82           fi; \
83         done
84
85         : # Deposit rule to allow group 'usrp' access to USRP hardware
86         install -m 0644 -D debian/libusrp0.udev \
87                 debian/tmp/lib/udev/rules.d/40-usrp.rules
88
89         : # Deposit rule to allow group 'usrp' access to USRP2 hardware
90         install -m 0644 -D debian/libusrp2-0.limits \
91                 debian/tmp/etc/security/limits.d/libusrp2-0.limits
92
93         : # Install custom grc.conf
94         install -m 0644 -D debian/grc.conf \
95                 debian/tmp/etc/gnuradio/conf.d/grc.conf
96
97         dh_install --sourcedir=debian/tmp
98         touch $@
99
100
101
102 # Must not depend on anything. This is to be called by
103 # binary-arch/binary-indep
104 # in another 'make' thread.
105 binary-common:
106         dh_testdir
107         dh_testroot
108         dh_installchangelogs ChangeLog
109         dh_installdocs
110         dh_pycentral
111         dh_link
112         dh_strip
113         dh_compress 
114         dh_fixperms
115         dh_makeshlibs
116         dh_installdeb
117         dh_shlibdeps
118         dh_gencontrol
119         dh_md5sums
120         dh_builddeb
121
122 # Build architecture independant packages using the common target.
123 binary-indep: build install
124         $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
125
126 # Build architecture dependant packages using the common target.
127 binary-arch: build install
128         $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
129
130 binary: binary-arch binary-indep
131 .PHONY: build clean binary-indep binary-arch binary install configure