| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
# Uncomment this to turn on verbose mode. |
| 4 |
#export DH_VERBOSE=1 |
| 5 |
|
| 6 |
include /usr/share/dpkg/pkg-info.mk |
| 7 |
|
| 8 |
CHANGELOG_DATE ?= $(shell LC_ALL=C date -u -d @$(SOURCE_DATE_EPOCH) +"%d %B %Y") |
| 9 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 10 |
arch = $(shell dpkg-architecture -qDEB_BUILD_ARCH) |
| 11 |
|
| 12 |
export DEB_LDFLAGS_MAINT_STRIP = -Wl,-Bsymbolic-functions |
| 13 |
|
| 14 |
%: |
| 15 |
dh $@ |
| 16 |
|
| 17 |
# 20171109, ta, not needed anymore |
| 18 |
#override_dh_strip: |
| 19 |
# dh_strip --dbg-package=libosmocore-dbg |
| 20 |
|
| 21 |
override_dh_install: |
| 22 |
# sed -i "/dependency_libs/ s/'.*'/''/" `find . -name '*.la'` |
| 23 |
find debian/tmp -name '*.la' -delete |
| 24 |
# package libosmosub not created, remove corresponding links/files |
| 25 |
rm debian/tmp/usr/lib/*/libosmousb.so |
| 26 |
rm debian/tmp/usr/lib/*/libosmousb.so.0 |
| 27 |
rm debian/tmp/usr/lib/*/pkgconfig/libosmousb.pc |
| 28 |
dh_install |
| 29 |
|
| 30 |
# Print test results in case of a failure |
| 31 |
override_dh_auto_test: |
| 32 |
-dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false) |
| 33 |
|
| 34 |
override_dh_installman: |
| 35 |
cd debian/man ; CHANGELOG_DATE="$(CHANGELOG_DATE)" ./genmanpages.sh |
| 36 |
dh_installman |
| 37 |
|
| 38 |
override_dh_missing: |
| 39 |
dh_missing --list-missing |
| 40 |
|
| 41 |
override_dh_clean: |
| 42 |
dh_clean |
| 43 |
$(RM) .version |
| 44 |
$(RM) debian/man/osmo-arfcn.1 |
| 45 |
$(RM) debian/man/osmo-auc-gen.1 |
| 46 |
$(RM) include/osmocom/core/bit16gen.h |
| 47 |
$(RM) include/osmocom/core/bit32gen.h |
| 48 |
$(RM) include/osmocom/core/bit64gen.h |
| 49 |
$(RM) include/osmocom/core/crc16gen.h |
| 50 |
$(RM) include/osmocom/core/crc32gen.h |
| 51 |
$(RM) include/osmocom/core/crc64gen.h |
| 52 |
$(RM) include/osmocom/core/crc8gen.h |
| 53 |
$(RM) include/osmocom/core/socket_compat.h |
| 54 |
$(RM) src/core/crc16gen.c |
| 55 |
$(RM) src/core/crc32gen.c |
| 56 |
$(RM) src/core/crc64gen.c |
| 57 |
$(RM) src/core/crc8gen.c |
| 58 |
$(RM) src/crc16gen.c |
| 59 |
$(RM) src/crc32gen.c |
| 60 |
$(RM) src/crc64gen.c |
| 61 |
$(RM) src/crc8gen.c |
| 62 |
$(RM) tests/package.m4 |
| 63 |
$(RM) tests/testsuite |
| 64 |
$(RM) -r utils/__pycache__ |
| 65 |
$(RM) -r doc/codec/ |
| 66 |
$(RM) -r doc/core/ |
| 67 |
$(RM) -r doc/ctrl/ |
| 68 |
$(RM) -r doc/gsm/ |
| 69 |
$(RM) -r doc/vty/html/ |
| 70 |
$(RM) -r doc/vty/latex/ |
| 71 |
$(RM) utils/conv_codes_gsm.pyc |
| 72 |
$(RM) utils/conv_gen.pyc |
| 73 |
|
| 74 |
override_dh_installchangelogs: |
| 75 |
dh_installchangelogs debian/changelog_upstream |