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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#DH_VERBOSE = 1
# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
# see FEATURE AREAS in dpkg-buildflags(1)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
# package maintainers to append LDFLAGS
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
DRV_API_MAJOR := 0
DRV_API_MINOR := 10
DRV_API_FUNC := 2
DRV_API_DEPEND := bio-drv-api-$(DRV_API_MAJOR).$(DRV_API_MINOR)
APP_API_MAJOR := 0
APP_API_MINOR := 11
APP_API_FUNC := 2
APP_API_DEPEND := bio-app-api-$(APP_API_MAJOR).$(APP_API_MINOR)
# main packaging script based on dh7 syntax
%:
dh $@ --with python3
# debmake generated override targets
# This is example for Cmake (See http://bugs.debian.org/641051 )
#override_dh_auto_configure:
# dh_auto_configure -- \
# -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
override_dh_auto_configure:
./autogen.sh
dh_auto_configure -- \
--enable-static \
--enable-shared \
--with-bio-db-dir=/var/lib/biometric-auth/ \
--with-bio-db-name=biometric.db \
--with-bio-config-dir=/etc/biometric-auth/ \
--with-bio-driver-dir=/usr/lib/biometric-authentication/drivers \
--with-bio-extra-dir=/usr/lib/biometric-authentication/drivers/extra \
--libexecdir=\$${prefix}/lib/biometric-authentication
override_dh_auto_install:
dh_auto_install
mkdir -p debian/tmp/usr/share/biometric-auth/
mv debian/tmp/etc/biometric-auth/biometric-drivers.conf \
debian/tmp/usr/share/biometric-auth/biometric-drivers.conf.template
mv debian/tmp/lib/* debian/tmp/usr/lib/
rmdir debian/tmp/lib
override_dh_gencontrol:
echo "bio-app-api:Provides=$(APP_API_DEPEND)" >> debian/biometric-auth.substvars;
echo "bio-drv-api:Provides=$(DRV_API_DEPEND)" >> debian/libbiometric0.substvars;
dh_gencontrol -- -V"bio-drv-api:Depends=$(DRV_API_DEPEND)"
|