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
include /usr/share/dpkg/pkg-info.mk
# make pgloader depend on the libssl package cl-plus-ssl depends on
LIBSSL := $(shell dpkg-query --showformat='$${Depends}' --show cl-plus-ssl | grep -o 'libssl[^ ]*')
BITS = $(shell dpkg-architecture -qDEB_BUILD_ARCH_BITS)
ifeq ($(BITS),32)
SIZE=1024
else
SIZE=4096
endif
# buildd provides a build environment where $HOME is not writable, but the
# CL compilers here will need to fill-in a per-user cache
export HOME = $(CURDIR)/debian/home
override_dh_auto_clean:
dh_auto_clean
rm -rf debian/home
override_dh_auto_build-indep:
# do nothing
override_dh_auto_build-arch:
mkdir -p build/bin
mkdir -p $(HOME)
buildapp --require sb-posix \
--require sb-bsd-sockets \
--load /usr/share/common-lisp/source/cl-asdf/build/asdf.lisp \
--asdf-path . \
--asdf-tree /usr/share/common-lisp/systems \
--load-system asdf-finalizers \
--load-system asdf-system-connections \
--load-system pgloader \
--load src/hooks.lisp \
--entry pgloader:main \
--dynamic-space-size $(SIZE) \
--compress-core \
--output build/bin/pgloader
$(MAKE) -C docs html
override_dh_auto_test:
# do nothing
override_dh_strip:
# do nothing
override_dh_installman-arch:
mkdir -p debian/pgloader/usr/share/man/man1/
PATH=debian/pgloader/usr/bin:$(PATH) \
help2man --version-string $(DEB_VERSION_UPSTREAM) \
--no-info \
--name "extract, transform and load data into PostgreSQL" \
pgloader > \
debian/pgloader/usr/share/man/man1/pgloader.1
override_dh_gencontrol:
dh_gencontrol -- -V"ssl:Depends=$(LIBSSL)"
%:
dh $@
|