12
12
# These are used for cross-compiling and for saving the configure script
13
13
# from having to guess our platform (since we know it already)
14
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
15
14
DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
15
DEB_BUILD_ARCH_OS ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
16
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
16
17
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
17
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
18
DEB_HOST_GNU_SYSTEM ?= $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM)
19
DEB_BUILD_GNU_SYSTEM ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_SYSTEM)
22
ifneq (${DEB_BUILD_ARCH},hurd-i386)
27
20
ifeq (${DEB_BUILD_GNU_TYPE},${DEB_HOST_GNU_TYPE})
28
ifneq (${DEB_BUILD_GNU_SYSTEM},m68k-linux)
29
ifneq (${DEB_BUILD_GNU_SYSTEM},kfreebsd-gnu)
30
ifneq (${DEB_BUILD_GNU_SYSTEM},knetbsd-gnu)
21
ifneq (${DEB_BUILD_ARCH},m68k)
22
ifneq (${DEB_BUILD_ARCH_OS},kfreebsd)
23
ifneq (${DEB_BUILD_ARCH_OS},knetbsd)
37
CONFIGURE_ARGS = --host=${DEB_HOST_GNU_TYPE} --build=${DEB_BUILD_GNU_TYPE} --prefix=/usr --mandir=/usr/share/man --disable-dependency-tracking --enable-ipv6 --enable-manual
30
SHLIBS_VERSION=7.15.0-1
32
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
34
ifneq (${DEB_BUILD_ARCH_OS},hurd)
35
CONFIGURE_ARGS += --with-gssapi=/usr
41
40
#configure-stamp: DH_OPTIONS=
43
mkdir -p debian/build debian/build-gnutls
44
tar -c --exclude=debian . | tar -C debian/build-gnutls -x
45
cat debian/gnutls-soname.patch | (cd debian/build-gnutls && patch -p1)
46
cd debian/build-gnutls && aclocal-1.7 && automake-1.7
45
47
cd debian/build && ../../configure ${CONFIGURE_ARGS}
47
ifeq (${DO_GSSAPI},yes)
48
mkdir -p debian/build-gssapi
49
cd debian/build-gssapi && ../../configure ${CONFIGURE_ARGS} --with-gssapi-includes=/usr/include --with-gssapi-libs=/usr/lib
48
cd debian/build-gnutls && ../../configure ${CONFIGURE_ARGS} --without-ssl --with-gnutls
52
49
touch configure-stamp
54
51
#build-stamp: DH_OPTIONS=
55
52
build-stamp: configure-stamp
57
54
${MAKE} -C debian/build
59
ifeq (${DO_GSSAPI},yes)
60
${MAKE} -C debian/build-gssapi
55
${MAKE} -C debian/build-gnutls
64
58
#test-stamp: DH_OPTIONS=
67
61
ifeq (${DO_TEST},yes)
68
62
-${MAKE} -C debian/build test
70
ifeq (${DO_GSSAPI},yes)
71
-${MAKE} -C debian/build-gssapi test
63
-${MAKE} -C debian/build-gnutls test
79
rm -rf test-stamp build-stamp configure-stamp debian/build
81
ifeq (${DO_GSSAPI},yes)
82
rm -rf debian/build-gssapi debian/tmp-gssapi
70
rm -rf test-stamp build-stamp configure-stamp debian/build debian/build-gnutls debian/tmp-gnutls
71
dh_clean debian/shlibs.local
86
73
#install: DH_OPTIONS=
87
install: libname=`test "${DO_GSSAPI}" = "yes" && basename debian/tmp-gssapi/usr/lib/libcurl.so.*.*`
88
74
install: build-stamp test-stamp
93
79
${MAKE} -C debian/build DESTDIR=`pwd`/debian/tmp install
95
ifeq (${DO_GSSAPI},yes)
96
${MAKE} -C debian/build-gssapi DESTDIR=`pwd`/debian/tmp-gssapi install
101
ifeq (${DO_GSSAPI},yes)
102
cp -d debian/tmp-gssapi/usr/lib/$(libname) debian/libcurl3-gssapi/usr/lib/$(libname).gssapi
103
ln -s $(libname).gssapi debian/libcurl3-gssapi/usr/lib/libcurl.so.3
104
install -m 644 debian/libcurl3-gssapi.lintian-overrides \
105
debian/libcurl3-gssapi/usr/share/lintian/overrides/libcurl3-gssapi
80
${MAKE} -C debian/build-gnutls DESTDIR=`pwd`/debian/tmp-gnutls install
81
dh_install -Nlibcurl3-gnutls -Nlibcurl3-gnutls-dev --sourcedir=debian/tmp
82
dh_install -plibcurl3-gnutls -plibcurl3-gnutls-dev --sourcedir=debian/tmp-gnutls
83
install -m 644 debian/libcurl3-gnutls.lintian-overrides debian/libcurl3-gnutls/usr/share/lintian/overrides/libcurl3-gnutls
109
85
# Build architecture-independent files here.
110
86
#binary-indep: DH_OPTIONS=-i
120
install -m 644 docs/*.html debian/libcurl3-dev/usr/share/doc/libcurl3-dev/html
121
install -m 644 docs/libcurl/*.html debian/libcurl3-dev/usr/share/doc/libcurl3-dev/html/libcurl
122
install -m 644 docs/*.pdf debian/libcurl3-dev/usr/share/doc/libcurl3-dev/pdf
123
install -m 644 docs/libcurl/*.pdf debian/libcurl3-dev/usr/share/doc/libcurl3-dev/pdf/libcurl
96
for package in libcurl3-openssl-dev libcurl3-gnutls-dev; do \
97
install -m 644 docs/libcurl/libcurl.m4 debian/$${package}/usr/share/aclocal; \
98
for doc_ext in html pdf; do \
99
install -m 644 docs/*.$${doc_ext} debian/$${package}/usr/share/doc/$${package}/$${doc_ext}; \
100
install -m 644 docs/libcurl/*.$${doc_ext} debian/$${package}/usr/share/doc/$${package}/$${doc_ext}/libcurl; \
125
104
dh_installexamples
126
105
dh_installchangelogs CHANGES
128
107
dh_strip --dbg-package=libcurl3
131
dh_makeshlibs -plibcurl3 -V "libcurl3 (>= 7.13.1-1)"
110
echo "libcurl 3 libcurl3 (>= $(SHLIBS_VERSION))" > debian/shlibs.local
111
dh_makeshlibs -plibcurl3 -V "libcurl3 (>= $(SHLIBS_VERSION))"
112
dh_makeshlibs -plibcurl3-gnutls -V "libcurl3-gnutls (>= $(SHLIBS_VERSION))"
136
ifeq (${DO_GSSAPI},yes)
140
dh_gencontrol -Nlibcurl3-gssapi
141
dh_builddeb -Nlibcurl3-gssapi
144
119
binary: binary-indep binary-arch