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
|
#!/usr/bin/make -f
include /usr/share/dpkg/architecture.mk
# verbose build output (antimake.mk)
export V=1
PG_CONFIG=pg_config
PGBINDIR=$(shell $(PG_CONFIG) --bindir)
ifeq ($(DEB_HOST_ARCH_OS),linux)
SYSTEMD = --with-systemd
endif
%:
dh $@
override_dh_auto_clean:
[ ! -f config.mak ] || $(MAKE) distclean
override_dh_autoreconf:
dh_autoreconf ./autogen.sh
override_dh_auto_configure:
dh_auto_configure -- \
--bindir=/usr/sbin \
--with-cares=yes \
--with-pam \
$(SYSTEMD)
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
$(MAKE) check PATH=$(PGBINDIR):$(PATH)
endif
override_dh_auto_install:
dh_auto_install --destdir=debian/pgbouncer
rm -f $(addprefix $(CURDIR)/debian/pgbouncer/usr/share/doc/pgbouncer/,pgbouncer.ini userlist.txt)
mkdir -p $(CURDIR)/debian/pgbouncer/etc/pgbouncer
touch $(CURDIR)/debian/pgbouncer/etc/pgbouncer/userlist.txt
override_dh_installsystemd:
# don't auto-enable/start pgbouncer.socket
dh_installsystemd pgbouncer.service
|