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 119 120 121 122 123
|
#! /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
# This is the debhelper compatibility version to use.
export DH_COMPAT=5
# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
DEB_BUILD_ARCH_OS ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DO_TEST=no
ifeq (${DEB_BUILD_GNU_TYPE},${DEB_HOST_GNU_TYPE})
ifneq (${DEB_BUILD_ARCH},m68k)
ifneq (${DEB_BUILD_ARCH_OS},kfreebsd)
ifneq (${DEB_BUILD_ARCH_OS},knetbsd)
DO_TEST=yes
endif
endif
endif
endif
SHLIBS_VERSION=7.15.5-1
CONFIGURE_ARGS = --host=${DEB_HOST_GNU_TYPE} --build=${DEB_BUILD_GNU_TYPE} --prefix=/usr --mandir=/usr/share/man --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt --disable-dependency-tracking --enable-ipv6 --enable-manual --enable-versioned-symbols
ifneq (${DEB_BUILD_ARCH_OS},hurd)
CONFIGURE_ARGS += --with-gssapi=/usr
endif
build: build-stamp
#configure-stamp: DH_OPTIONS=
configure-stamp:
dh_testdir
autoconf && aclocal-1.7 && automake-1.7
mkdir -p debian/build debian/build-gnutls
tar -cf - --exclude=debian . | tar -xf - -C debian/build-gnutls
cat debian/gnutls-soname.patch | (cd debian/build-gnutls && patch -p1)
cd debian/build-gnutls && aclocal-1.7 && automake-1.7
cd debian/build && ../../configure ${CONFIGURE_ARGS}
cd debian/build-gnutls && ../../configure ${CONFIGURE_ARGS} --without-ssl --with-gnutls
touch configure-stamp
#build-stamp: DH_OPTIONS=
build-stamp: configure-stamp
dh_testdir
${MAKE} -C debian/build
${MAKE} -C debian/build-gnutls
touch build-stamp
#test-stamp: DH_OPTIONS=
test-stamp: build-stamp
dh_testdir
ifeq (${DO_TEST},yes)
-${MAKE} -C debian/build test
-${MAKE} -C debian/build-gnutls test
endif
touch test-stamp
clean:
dh_testdir
dh_testroot
rm -rf test-stamp build-stamp configure-stamp debian/build debian/build-gnutls debian/tmp-gnutls
dh_clean debian/shlibs.local
#install: DH_OPTIONS=
install: build-stamp test-stamp
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
${MAKE} -C debian/build DESTDIR=`pwd`/debian/tmp install
${MAKE} -C debian/build-gnutls DESTDIR=`pwd`/debian/tmp-gnutls install
dh_install -Nlibcurl3-gnutls -Nlibcurl3-gnutls-dev --sourcedir=debian/tmp
dh_install -plibcurl3-gnutls -plibcurl3-gnutls-dev --sourcedir=debian/tmp-gnutls
install -m 644 debian/libcurl3-gnutls.lintian-overrides debian/libcurl3-gnutls/usr/share/lintian/overrides/libcurl3-gnutls
# Build architecture-independent files here.
#binary-indep: DH_OPTIONS=-i
binary-indep: build-stamp install
# We have nothing to do here.
# Build architecture-dependent files here.
#binary-arch: DH_OPTIONS=-a
binary-arch: build-stamp install
dh_testdir
dh_testroot
dh_installdocs
for package in libcurl3-openssl-dev libcurl3-gnutls-dev; do \
install -m 644 docs/libcurl/libcurl.m4 debian/$${package}/usr/share/aclocal; \
for doc_ext in html pdf; do \
install -m 644 docs/*.$${doc_ext} debian/$${package}/usr/share/doc/$${package}/$${doc_ext}; \
install -m 644 docs/libcurl/*.$${doc_ext} debian/$${package}/usr/share/doc/$${package}/$${doc_ext}/libcurl; \
done; \
done
dh_installman
dh_installexamples
dh_installchangelogs CHANGES
dh_link
dh_strip -Nlibcurl3 -Nlibcurl3-gnutls
dh_strip -plibcurl3 -plibcurl3-gnutls --dbg-package=libcurl3-dbg
dh_compress
dh_fixperms
echo "libcurl 3 libcurl3 (>= $(SHLIBS_VERSION))" > debian/shlibs.local
dh_makeshlibs -plibcurl3 -V "libcurl3 (>= $(SHLIBS_VERSION))"
dh_makeshlibs -plibcurl3-gnutls -V "libcurl3-gnutls (>= $(SHLIBS_VERSION))"
dh_installdeb
dh_shlibdeps
dh_md5sums
dh_gencontrol
dh_builddeb
binary: binary-indep binary-arch
.PHONY: binary binary-arch binary-indep build clean install
|