| 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 |
CFLAGS = -Wall -g |
|---|
| 10 |
|
|---|
| 11 |
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
|---|
| 12 |
CFLAGS += -O0 |
|---|
| 13 |
else |
|---|
| 14 |
CFLAGS += -O2 |
|---|
| 15 |
endif |
|---|
| 16 |
|
|---|
| 17 |
clean: |
|---|
| 18 |
dh_testdir |
|---|
| 19 |
dh_testroot |
|---|
| 20 |
rm -f build-stamp configure-stamp extract-stamp install-stamp |
|---|
| 21 |
|
|---|
| 22 |
if [ -f Makefile ]; \ |
|---|
| 23 |
then\ |
|---|
| 24 |
if [ -d .svn ]; \ |
|---|
| 25 |
then \ |
|---|
| 26 |
$(MAKE) maintainer-clean; \ |
|---|
| 27 |
else \ |
|---|
| 28 |
$(MAKE) distclean; \ |
|---|
| 29 |
fi; \ |
|---|
| 30 |
fi |
|---|
| 31 |
|
|---|
| 32 |
dh_clean |
|---|
| 33 |
|
|---|
| 34 |
update: |
|---|
| 35 |
dh_testdir |
|---|
| 36 |
-test -r /usr/share/misc/config.sub && \ |
|---|
| 37 |
cp -f /usr/share/misc/config.sub config.sub |
|---|
| 38 |
-test -r /usr/share/misc/config.guess && \ |
|---|
| 39 |
cp -f /usr/share/misc/config.guess config.guess |
|---|
| 40 |
|
|---|
| 41 |
configure: configure-stamp |
|---|
| 42 |
configure-stamp: |
|---|
| 43 |
dh_testdir |
|---|
| 44 |
[ -f ./configure ] || ./bootstrap |
|---|
| 45 |
CFLAGS="$(CFLAGS)" ./configure \ |
|---|
| 46 |
--prefix=/usr --mandir=\$${prefix}/share/man \ |
|---|
| 47 |
--infodir=\$${prefix}/share/info --enable-shared \ |
|---|
| 48 |
--enable-doxygen --enable-html-docs \ |
|---|
| 49 |
--sysconfdir=/etc --enable-all-components \ |
|---|
| 50 |
--disable-gr-audio-osx --disable-gr-audio-windows |
|---|
| 51 |
touch configure-stamp |
|---|
| 52 |
|
|---|
| 53 |
extract: extract-stamp |
|---|
| 54 |
extract-stamp: configure-stamp debian/gen-install-files.sh |
|---|
| 55 |
dh_testdir |
|---|
| 56 |
debian/gen-install-files.sh |
|---|
| 57 |
touch $@ |
|---|
| 58 |
|
|---|
| 59 |
build: build-stamp |
|---|
| 60 |
build-stamp: extract-stamp |
|---|
| 61 |
|
|---|
| 62 |
$(MAKE) |
|---|
| 63 |
$(MAKE) check |
|---|
| 64 |
touch $@ |
|---|
| 65 |
|
|---|
| 66 |
install: install-stamp |
|---|
| 67 |
install-stamp: build-stamp |
|---|
| 68 |
dh_testdir |
|---|
| 69 |
dh_testroot |
|---|
| 70 |
dh_clean -k |
|---|
| 71 |
dh_installdirs |
|---|
| 72 |
|
|---|
| 73 |
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp |
|---|
| 74 |
: # make python scripts starting with '#!' executable |
|---|
| 75 |
for i in `find debian -mindepth 2 -type f ! -perm 755`; do \ |
|---|
| 76 |
if head -1 $$i | grep -q '^#!'; then \ |
|---|
| 77 |
chmod 755 $$i; \ |
|---|
| 78 |
echo "made executable: $$i"; \ |
|---|
| 79 |
fi; \ |
|---|
| 80 |
done |
|---|
| 81 |
|
|---|
| 82 |
: # Deposit rule to allow group 'usrp' access to USRP hardware |
|---|
| 83 |
install -m 0755 -D debian/libusrp0c2a.udev \ |
|---|
| 84 |
debian/tmp/etc/udev/rules.d/40-usrp.rules |
|---|
| 85 |
|
|---|
| 86 |
dh_install --sourcedir=debian/tmp |
|---|
| 87 |
touch $@ |
|---|
| 88 |
|
|---|
| 89 |
|
|---|
| 90 |
# Must not depend on anything. This is to be called by |
|---|
| 91 |
# binary-arch/binary-indep |
|---|
| 92 |
# in another 'make' thread. |
|---|
| 93 |
binary-common: |
|---|
| 94 |
dh_testdir |
|---|
| 95 |
dh_testroot |
|---|
| 96 |
dh_installchangelogs ChangeLog |
|---|
| 97 |
dh_installdocs |
|---|
| 98 |
dh_pycentral |
|---|
| 99 |
dh_link |
|---|
| 100 |
dh_strip |
|---|
| 101 |
dh_compress |
|---|
| 102 |
dh_fixperms |
|---|
| 103 |
dh_makeshlibs |
|---|
| 104 |
dh_installdeb |
|---|
| 105 |
dh_shlibdeps |
|---|
| 106 |
dh_gencontrol |
|---|
| 107 |
dh_md5sums |
|---|
| 108 |
dh_builddeb |
|---|
| 109 |
|
|---|
| 110 |
# Build architecture independant packages using the common target. |
|---|
| 111 |
binary-indep: build install |
|---|
| 112 |
$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common |
|---|
| 113 |
|
|---|
| 114 |
# Build architecture dependant packages using the common target. |
|---|
| 115 |
binary-arch: build install |
|---|
| 116 |
$(MAKE) -f debian/rules DH_OPTIONS=-s binary-common |
|---|
| 117 |
|
|---|
| 118 |
binary: binary-arch binary-indep |
|---|
| 119 |
.PHONY: build clean binary-indep binary-arch binary install configure |
|---|