| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
DPKG_EXPORT_BUILDFLAGS = 1 |
| 9 |
include /usr/share/dpkg/default.mk |
| 10 |
|
| 11 |
|
| 12 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic -DSQLITE3_SONAME=\\\"$(SQLITE3_SONAME)\\\" |
| 17 |
|
| 18 |
SQLITE3_SONAME = $(shell objdump -p $$(pkg-config --variable=libdir sqlite3)/libsqlite3.so | sed -ne 's/^[[:space:]]*SONAME[[:space:]]*\(libsqlite3\.so.*\)/\1/p') |
| 19 |
|
| 20 |
|
| 21 |
%: |
| 22 |
dh $@ --with runit |
| 23 |
|
| 24 |
override_dh_auto_clean: |
| 25 |
dh_auto_clean -Bbuild-sqlite3 |
| 26 |
dh_auto_clean -Denforcer -Bbuild-mysql/enforcer |
| 27 |
debconf-updatepo |
| 28 |
rm -rf build-mysql build-sqlite3 |
| 29 |
|
| 30 |
COMMON = --disable-rpath --with-ldns=/usr \ |
| 31 |
--with-cunit=/usr --libexecdir=/usr/lib/opendnssec/ \ |
| 32 |
--with-pkcs11-opensc=/usr/lib/pkcs11/opensc-pkcs11.so \ |
| 33 |
--with-pkcs11-softhsm=/usr/lib/softhsm/libsofthsm2.so \ |
| 34 |
--with-readline |
| 35 |
|
| 36 |
override_dh_auto_configure: |
| 37 |
dh_auto_configure -Bbuild-sqlite3 -- $(COMMON) --with-enforcer-database=sqlite3 |
| 38 |
mkdir build-mysql |
| 39 |
ln -s ../build-sqlite3/libhsm build-mysql/libhsm |
| 40 |
dh_auto_configure -Bbuild-mysql/enforcer -- $(COMMON) --with-enforcer-database=mysql --disable-signer --disable-doxygen-doc |
| 41 |
touch $(wildcard conf/*.rng) |
| 42 |
|
| 43 |
override_dh_auto_build-arch: |
| 44 |
dh_auto_build -Bbuild-sqlite3 |
| 45 |
dh_auto_build -Bbuild-mysql/enforcer |
| 46 |
|
| 47 |
override_dh_auto_build-indep: |
| 48 |
dh_auto_build -Bbuild-sqlite3 -- docs |
| 49 |
|
| 50 |
override_dh_auto_install: |
| 51 |
dh_auto_install -Bbuild-sqlite3 -- DESTDIR=$(CURDIR)/debian/tmp |
| 52 |
dh_auto_install -Bbuild-mysql/enforcer -- DESTDIR=$(CURDIR)/debian/tmp-mysql |
| 53 |
|
| 54 |
install -m 755 $(CURDIR)/enforcer/utils/convert_mysql_to_sqlite $(CURDIR)/debian/tmp/usr/share/opendnssec/ |
| 55 |
install -m 755 $(CURDIR)/enforcer/utils/convert_sqlite_to_mysql $(CURDIR)/debian/tmp/usr/share/opendnssec/ |
| 56 |
install -m 644 $(CURDIR)/enforcer/src/db/schema.* $(CURDIR)/debian/tmp/usr/share/opendnssec/ |
| 57 |
|
| 58 |
|
| 59 |
rm -rf $(CURDIR)/debian/opendnssec-enforcer-mysql/var/run/opendnssec/ \ |
| 60 |
$(CURDIR)/debian/opendnssec-enforcer-mysql/usr/bin/ods-hsm* \ |
| 61 |
$(CURDIR)/debian/opendnssec-enforcer-mysql/usr/bin/ods-kasp2html \ |
| 62 |
$(CURDIR)/debian/opendnssec-enforcer-mysql/usr/sbin/ods-control \ |
| 63 |
$(CURDIR)/debian/opendnssec-enforcer-mysql/usr/share/opendnssec/*.rn? \ |
| 64 |
$(CURDIR)/debian/opendnssec-enforcer-mysql/usr/share/opendnssec/kasp2html.xsl \ |
| 65 |
$(CURDIR)/debian/opendnssec-enforcer-mysql/etc/opendnssec \ |
| 66 |
$(CURDIR)/debian/opendnssec-enforcer-mysql/usr/share/man/man5 \ |
| 67 |
$(CURDIR)/debian/opendnssec-enforcer-mysql/usr/share/man/man7 \ |
| 68 |
$(CURDIR)/debian/opendnssec-enforcer-mysql/usr/share/man/man8/ods-control.* \ |
| 69 |
$(CURDIR)/debian/opendnssec-enforcer-mysql/usr/share/man/man1/ods-hsm* \ |
| 70 |
$(CURDIR)/debian/opendnssec-enforcer-mysql/usr/share/opendnssec/database_create* |
| 71 |
|
| 72 |
override_dh_installdocs: |
| 73 |
dh_installdocs -p opendnssec-common -p opendnssec-doc |
| 74 |
|
| 75 |
override_dh_installchangelogs: |
| 76 |
dh_installchangelogs -p opendnssec-common -p opendnssec-doc NEWS |
| 77 |
|
| 78 |
override_dh_install: |
| 79 |
dh_install -popendnssec-enforcer-mysql --sourcedir=debian/tmp-mysql |
| 80 |
dh_install -Nopendnssec-enforcer-mysql |
| 81 |
|
| 82 |
override_dh_missing: |
| 83 |
dh_missing -Nopendnssec-enforcer-mysql --fail-missing -Xxml.sample |