1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
PKD = $(abspath $(dir $(MAKEFILE_LIST)))
PKG = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source))
# ABI major version
somajor=$(shell perl -ne 'print $$1 if m{LIBBASE58_SO_VERSION\],\s*\[(\d+)};' configure.ac)
# The base library name
plib=$(PKG)-$(somajor)
pdev=$(PKG)-dev
pdbg=$(PKG)-dbg
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
%:
dh $@ --parallel --with autoreconf
override_dh_auto_install:
dh_auto_install --destdir=$(CURDIR)/debian/tmp
override_dh_install:
$(info I: library-name=$(plib))
$(if $(wildcard debian/$(plib).symbols),,$(error invalid package/library name..))
dh_install -p$(plib) --autodest \
usr/lib/*/lib*.so.*
dh_install -p$(pdev) --autodest \
usr/include \
usr/lib/*/lib*.so \
usr/lib/*/pkgconfig
override_dh_gencontrol:
dh_gencontrol -v -- -Vplib=$(plib)
# gracefully handle stripping if -dbg package (un-)commented in debian/control
override_dh_strip:
[ -d "$(CURDIR)/debian/$(pdbg)" ] \
&& dh_strip --dbg-package=$(pdbg) \
|| dh_strip
|