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 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
|
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
export DEB_BUILD_MAINT_OPTIONS := hardening=+all
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
CONFIGURE_ARGS = -- --disable-dependency-tracking \
--disable-symbol-hiding --enable-versioned-symbols \
--enable-threaded-resolver --with-lber-lib=lber \
--with-gssapi=/usr --with-libssh2 --with-nghttp2 \
--includedir=/usr/include/$(DEB_HOST_MULTIARCH) \
--with-zsh-functions-dir=/usr/share/zsh/vendor-completions
ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes),yes)
CONFIGURE_ARGS += --without-libssh2
endif
%:
dh $@
override_dh_auto_configure:
mkdir -p debian/build debian/build-gnutls debian/build-nss
quilt pop
quilt pop
tar -cf - --exclude=debian/build* --exclude=.pc . \
| tar -xf - -C debian/build
quilt push
tar -cf - --exclude=debian/build* --exclude=.pc . \
| tar -xf - -C debian/build-gnutls
quilt push
tar -cf - --exclude=debian/build* --exclude=.pc . \
| tar -xf - -C debian/build-nss
for flavour in build build-gnutls build-nss; do \
(cd debian/$$flavour && ./buildconf && cp ../../ltmain.sh .) \
done
cd debian/build && dh_auto_configure ${CONFIGURE_ARGS} \
--with-ca-path=/etc/ssl/certs
cd debian/build-gnutls && dh_auto_configure ${CONFIGURE_ARGS} \
--with-ca-path=/etc/ssl/certs \
--without-ssl --with-gnutls
cd debian/build-nss && dh_auto_configure ${CONFIGURE_ARGS} \
--without-ssl --with-nss
override_dh_auto_build:
cd debian/build && dh_auto_build
cd debian/build-gnutls && dh_auto_build
cd debian/build-nss && dh_auto_build
override_dh_auto_test:
-cd debian/build && dh_auto_test
-cd debian/build-gnutls && dh_auto_test
-cd debian/build-nss && dh_auto_test
override_dh_install:
${MAKE} -C debian/build \
DESTDIR=$(shell pwd)/debian/tmp install
${MAKE} -C debian/build-gnutls \
DESTDIR=$(shell pwd)/debian/tmp-gnutls install
${MAKE} -C debian/build-nss \
DESTDIR=$(shell pwd)/debian/tmp-nss install
dh_install -plibcurl3-gnutls -plibcurl4-gnutls-dev \
--sourcedir=debian/tmp-gnutls
dh_install -plibcurl3-nss -plibcurl4-nss-dev \
--sourcedir=debian/tmp-nss
dh_install -pcurl -plibcurl4 -plibcurl4-openssl-dev -plibcurl4-doc \
--sourcedir=debian/tmp
sed -i "/dependency_libs/ s/'.*'/''/" `find . -name '*.la'`
sed -e "/-lcurl /s|`krb5-config --libs gssapi`|\`krb5-config --libs gssapi\`|" \
-e "/--prefix/s|/$(DEB_HOST_MULTIARCH)'|/'\\\\\`dpkg-architecture -qDEB_HOST_MULTIARCH\\\\\`|g" \
-e "/--prefix/s|=$(DEB_BUILD_GNU_TYPE)'|='\\\\\`dpkg-architecture -qDEB_BUILD_GNU_TYPE\\\\\`|g" \
-e "/-fdebug-prefix-map=/s|\(-fdebug-prefix-map=\)/[^ ]*=.||" \
-i `find . -name curl-config`
override_dh_installchangelogs:
dh_installchangelogs CHANGES
override_dh_compress:
dh_compress -X.pdf
override_dh_auto_clean:
$(RM) -r debian/build* debian/tmp*
dh_auto_clean
|