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
|
#! /usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This has to be exported to make some magic below work.
export DH_OPTIONS
include /usr/share/dpkg/architecture.mk
CURLVERS := $(strip $(shell /usr/bin/curl-config --version | awk '{print $$2}' | sed 's/-rc/~rc/'))
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DO_PACKAGES = $(shell dh_listpackages)
ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
export _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__$(DEB_HOST_MULTIARCH)
endif
export no_proxy=localhost,127.0.0.1
export PYBUILD_NAME=pycurl
export PYBUILD_BEFORE_TEST=make -C tests/fake-curl/libcurl && mkdir -p tests/tmp
export PYBUILD_TEST_ARGS=-v -ra -m 'not online'
export PYCURL_VSFTPD_PATH=vsftpd
%:
dh $@ --buildsystem=pybuild
override_dh_auto_build-indep:
$(MAKE) docs PYTHON=python3
override_dh_auto_test-indep:
execute_after_dh_auto_install-arch:
# Remove documentation as installed by setup.py
rm -rf $(CURDIR)/debian/python*-pycurl*/usr/share/doc/pycurl
override_dh_installdocs:
mkdir -p debian/python-pycurl-doc/usr/share/doc/python-pycurl-doc/html
ifneq (,$(filter python-pycurl-doc,$(DO_PACKAGES)))
cp -a build/doc/* $(CURDIR)/debian/python-pycurl-doc/usr/share/doc/python-pycurl-doc/html
endif
dh_installdocs -ppython3-pycurl --link-doc=python3-pycurl
dh_installdocs -Npython3-pycurl
override_dh_installchangelogs:
dh_installchangelogs ChangeLog
override_dh_strip:
ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
dh_strip -ppython3-pycurl --dbgsym-migration='python3-pycurl-dbg (<< 7.44.1-2~)'
endif
override_dh_compress:
dh_compress -X.py
override_dh_shlibdeps:
dh_shlibdeps -a
sed -i '/shlibs:Depends/s,\(libcurl[0-9]*t64-gnutls (>= \)[^)]*\().*\),\1$(CURLVERS)\2,' debian/python3-pycurl*.substvars
|