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 64 65 66 67 68 69 70 71 72 73 74 75 76
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# Show command in Makefile
export VERBOSE=1
# The build system doesn't use CPPFLAGS, pass them to CFLAGS to enable the
# missing (hardening) flags.
export DEB_CFLAGS_MAINT_APPEND := -Wall $(shell dpkg-buildflags --get CPPFLAGS)
# More hardening
export DEB_BUILD_MAINT_OPTIONS := hardening=+bindnow
DESTDIR=$(CURDIR)/debian/tmp
conf_args = \
--localstatedir=/var \
--with-socketpath=/var/run/ctdb/ctdbd.socket \
--with-logdir=/var/log/ctdb \
--enable-pmda
%:
dh $@ --with systemd
override_dh_auto_configure: check-external-libs
dh_auto_configure -- $(conf_args)
override_dh_auto_test:
# skipping (runtime) tests
override_dh_systemd_start:
dh_systemd_start -pctdb --no-start --no-restart-on-upgrade
override_dh_installinit:
# Install /etc/default/ctdb
mkdir -p $(CURDIR)/debian/ctdb/etc/default
install -m644 config/ctdb.sysconfig $(CURDIR)/debian/ctdb/etc/default/ctdb
# Install /etc/init.d/ctdb
mkdir -p $(CURDIR)/debian/ctdb/etc/init.d
install -m755 config/ctdb.init $(CURDIR)/debian/ctdb/etc/init.d/ctdb
# Install dh scripts
dh_installinit -pctdb --no-start --no-restart-on-upgrade --onlyscripts
override_dh_installdocs:
cp config/events.d/README README.eventscripts
cp config/notify.d.README README.notify.d
dh_installdocs
ifeq ($(DEB_BUILD_ARCH_OS), hurd)
dh_installdocs debian/README.hurd
endif
ifeq ($(DEB_BUILD_ARCH_OS), kfreebsd)
dh_installdocs debian/README.kfreebsd
endif
#patch doc
sed -i 's|/etc/sysconfig/|/etc/default/|' $(CURDIR)/debian/ctdb/usr/share/doc/ctdb/web/*.html
#upstream changelog
grep -A 10000 '%changelog' packaging/RPM/ctdb.spec.in > $(CURDIR)/debian/ctdb/usr/share/doc/ctdb/changelog
override_dh_strip:
dh_strip --dbg-package=ctdb-dbg
check-external-libs:
@if [ -e lib/popt -o -e lib/tdb -o -e lib/talloc -o -e lib/tevent ]; then \
echo " *****************************************"; \
echo " ** **"; \
echo " ** tar contains external libraries! **"; \
echo " ** **"; \
echo " *****************************************"; \
echo "The tarball should be made by using"; \
echo "git-import-orig, uscan or"; \
echo "debian/uupdate-wrapper"; \
echo ""; \
exit 1; \
fi
|