~ubuntu-branches/ubuntu/vivid/curl/vivid

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2013-05-07 12:16:37 UTC
  • mfrom: (3.4.37 sid)
  • Revision ID: package-import@ubuntu.com-20130507121637-9t3i98qgsyr9dw5d
Tags: 7.30.0-1ubuntu1
* Resynchronize on Debian. Remaining changes:
  - Drop dependencies not in main:
    + Build-Depends: Drop stunnel4 and libssh2-1-dev.
    + Drop libssh2-1-dev from binary package Depends.
  - Add new libcurl3-udeb package.
  - Add new curl-udeb package.
* Add warning to debian/patches/series.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#! /usr/bin/make -f
2
2
 
3
 
# These are used for cross-compiling and for saving the configure script
4
 
# from having to guess our platform (since we know it already)
5
 
DEB_BUILD_ARCH          ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
6
 
DEB_BUILD_ARCH_OS       ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
7
 
DEB_BUILD_GNU_TYPE      ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
8
 
DEB_HOST_GNU_TYPE       ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
9
 
DEB_HOST_MULTIARCH      ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
10
 
 
11
 
# set the number of build jobs
12
 
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
13
 
    JOBS:=-j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
14
 
endif
15
 
 
16
 
ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
17
 
CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) --with-random=/dev/urandom
18
 
else
19
 
CROSS= --build $(DEB_BUILD_GNU_TYPE)
20
 
endif
21
 
 
22
 
ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
23
 
    DO_TEST=no
24
 
else
25
 
    DO_TEST=no
26
 
    ifeq (${DEB_BUILD_GNU_TYPE},${DEB_HOST_GNU_TYPE})
27
 
    ifneq (${DEB_BUILD_ARCH},m68k)
28
 
    ifneq (${DEB_BUILD_ARCH_OS},kfreebsd)
29
 
    ifneq (${DEB_BUILD_ARCH_OS},knetbsd)
30
 
    ifneq (${DEB_BUILD_ARCH_OS},hurd)
31
 
        DO_TEST=yes
32
 
    endif
33
 
    endif
34
 
    endif
35
 
    endif
36
 
    endif
37
 
endif
38
 
 
39
 
CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
40
 
CFLAGS   = $(shell dpkg-buildflags --get CFLAGS)
41
 
LDFLAGS  = $(shell dpkg-buildflags --get LDFLAGS)
42
 
 
43
3
# this will avoid unneded dependencies
44
 
LDFLAGS += -Wl,--as-needed
 
4
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
45
5
 
46
6
# this will catch miss-linking. (e.g. undefined symbols)
47
 
#LDFLAGS+= -Wl,-z,defs
48
 
 
49
 
CONFIGURE_ARGS = $(CROSS) --prefix=/usr --mandir=/usr/share/man \
50
 
                --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)  \
51
 
                --disable-dependency-tracking --enable-ipv6     \
52
 
                --with-lber-lib=lber --disable-symbol-hiding    \
53
 
                --enable-versioned-symbols --enable-manual      \
54
 
                CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
55
 
# this is still not ready
56
 
#               --enable-ares
57
 
# this fixes the ldap warning of dpkg-shlibdebs, but we dont want that.
58
 
#               --with-ldap-lib=/usr/lib/libldap_r.so
59
 
 
60
 
ifneq (${DEB_BUILD_ARCH_OS},hurd)
61
 
CONFIGURE_ARGS += --with-gssapi=/usr
62
 
endif
63
 
 
64
 
CONFIGURE_ARGS_UDEB = $(filter-out --with-lber-lib=lber --with-gssapi=/usr,$(CONFIGURE_ARGS))
65
 
 
66
 
build-arch: build-stamp
67
 
build-indep: build-stamp
68
 
 
69
 
build: build-arch build-indep
70
 
 
71
 
configure-stamp:
72
 
        dh_testdir
73
 
        mkdir -p debian/build debian/build-gnutls debian/build-nss debian/build-udeb
 
7
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,-z,defs
 
8
 
 
9
CONFIGURE_ARGS = -- --disable-dependency-tracking               \
 
10
        --disable-symbol-hiding --enable-versioned-symbols      \
 
11
        --with-lber-lib=lber --with-gssapi=/usr
 
12
 
 
13
%:
 
14
        dh $@
 
15
 
 
16
override_dh_auto_configure:
 
17
        mkdir -p debian/build debian/build-gnutls debian/build-nss
74
18
        # pop the last patch (nss)
75
19
        quilt pop
76
20
        # pop the second last patch (gnutls)
77
21
        quilt pop
78
22
        # get the source without nss and gnutls patches
79
 
        tar -cf - --exclude=debian --exclude=.pc . | tar -xf - -C debian/build
80
 
        tar -cf - --exclude=debian --exclude=.pc . | tar -xf - -C debian/build-udeb
 
23
        tar -cf - --exclude=debian/build* --exclude=.pc . \
 
24
                | tar -xf - -C debian/build
81
25
        # push the second last patch which must be gnutls
82
26
        quilt push
83
27
        # get the source with gnutls patch applied
84
 
        tar -cf - --exclude=debian --exclude=.pc . | tar -xf - -C debian/build-gnutls
 
28
        tar -cf - --exclude=debian/build* --exclude=.pc . \
 
29
                | tar -xf - -C debian/build-gnutls
85
30
        # push the last patch which must be nss
86
31
        quilt push
87
32
        # get the source with nss patch applied
88
 
        tar -cf - --exclude=debian --exclude=.pc . | tar -xf - -C debian/build-nss
 
33
        tar -cf - --exclude=debian/build* --exclude=.pc . \
 
34
                | tar -xf - -C debian/build-nss
89
35
        # run buildconf and make sure to copy the patched ltmain.sh
90
 
        for flavour in build build-udeb build-gnutls build-nss; do \
 
36
        for flavour in build build-gnutls build-nss; do \
91
37
                (cd debian/$$flavour && ./buildconf && cp ../../ltmain.sh .) \
92
38
        done
93
 
        cd debian/build && ./configure ${CONFIGURE_ARGS}                \
94
 
                --with-librtmp --with-ca-path=/etc/ssl/certs
95
 
        cd debian/build-udeb && ./configure ${CONFIGURE_ARGS_UDEB}      \
96
 
                --with-ca-path=/etc/ssl/certs --without-gnutls          \
97
 
                --without-nss --disable-ldap --disable-ldaps            \
98
 
                --disable-file --disable-ftp --disable-pop4             \
99
 
                --disable-rtsp --disable-imap --disable-smtp            \
100
 
                --without-librtmp --without-libidn
101
 
        cd debian/build-gnutls && ./configure ${CONFIGURE_ARGS}         \
 
39
        cd debian/build && dh_auto_configure ${CONFIGURE_ARGS}          \
 
40
                --with-ca-path=/etc/ssl/certs
 
41
        cd debian/build-gnutls &&  dh_auto_configure ${CONFIGURE_ARGS}  \
102
42
                --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt     \
103
43
                --without-ssl --with-gnutls
104
 
        cd debian/build-nss && ./configure ${CONFIGURE_ARGS}            \
 
44
        cd debian/build-nss && dh_auto_configure ${CONFIGURE_ARGS}      \
105
45
                --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt     \
106
46
                --without-ssl --with-nss
107
 
        touch configure-stamp
108
 
 
109
 
build-stamp: configure-stamp
110
 
        dh_testdir
111
 
        ${MAKE} $(JOBS) -C debian/build
112
 
        ${MAKE} $(JOBS) -C debian/build-udeb
113
 
        ${MAKE} $(JOBS) -C debian/build-gnutls
114
 
        ${MAKE} $(JOBS) -C debian/build-nss
115
 
ifeq (${DO_TEST},yes)
116
 
        -${MAKE} -C debian/build test
117
 
        -${MAKE} -C debian/build-udeb test
118
 
        -${MAKE} -C debian/build-gnutls test
119
 
        -${MAKE} -C debian/build-nss test
120
 
endif
121
 
        touch build-stamp
122
 
 
123
 
clean:
124
 
        dh_testdir
125
 
        dh_testroot
126
 
        $(RM) -r build-stamp configure-stamp debian/build* debian/tmp*
127
 
 
128
 
#install: DH_OPTIONS=
129
 
install: build-stamp
130
 
        dh_testdir
131
 
        dh_testroot
132
 
        dh_prep
133
 
        ${MAKE} -C debian/build         \
 
47
 
 
48
override_dh_auto_build:
 
49
        cd debian/build && dh_auto_build
 
50
        cd debian/build-gnutls && dh_auto_build
 
51
        cd debian/build-nss && dh_auto_build
 
52
 
 
53
override_dh_auto_test:
 
54
        -cd debian/build && dh_auto_test
 
55
        -cd debian/build-gnutls && dh_auto_test
 
56
        -cd debian/build-nss && dh_auto_test
 
57
 
 
58
override_dh_install:
 
59
        ${MAKE} -C debian/build                                 \
134
60
                DESTDIR=$(shell pwd)/debian/tmp install
135
 
        ${MAKE} -C debian/build-udeb    \
136
 
                DESTDIR=$(shell pwd)/debian/tmp-udeb install
137
 
        ${MAKE} -C debian/build-gnutls  \
 
61
        ${MAKE} -C debian/build-gnutls                          \
138
62
                DESTDIR=$(shell pwd)/debian/tmp-gnutls install
139
 
        ${MAKE} -C debian/build-nss     \
 
63
        ${MAKE} -C debian/build-nss                             \
140
64
                DESTDIR=$(shell pwd)/debian/tmp-nss install
141
65
        dh_install -plibcurl3-gnutls -plibcurl4-gnutls-dev      \
142
66
                --sourcedir=debian/tmp-gnutls
143
67
        dh_install -plibcurl3-nss -plibcurl4-nss-dev            \
144
68
                --sourcedir=debian/tmp-nss
145
 
        dh_install -pcurl-udeb -plibcurl3-udeb                  \
146
 
                --sourcedir=debian/tmp-udeb
147
 
        dh_install -pcurl -plibcurl3 -plibcurl4-openssl-dev     \
 
69
        dh_install -pcurl -plibcurl3 -plibcurl4-openssl-dev -plibcurl4-doc \
148
70
                --sourcedir=debian/tmp
149
 
        dh_lintian
150
71
        sed -i "/dependency_libs/ s/'.*'/''/" `find . -name '*.la'`
151
72
 
152
 
# Build architecture-independent files here.
153
 
binary-indep: build-stamp install
154
 
# We have nothing to do here.
155
 
 
156
 
# Build architecture-dependent files here.
157
 
binary-arch: build-stamp install
158
 
        dh_testdir
159
 
        dh_testroot
160
 
        dh_installdocs
161
 
        dh_installman
162
 
        dh_installexamples
 
73
override_dh_installchangelogs:
163
74
        dh_installchangelogs CHANGES
164
 
        dh_link
 
75
 
 
76
override_dh_compress:
 
77
        dh_compress -X.pdf
 
78
 
 
79
override_dh_strip:
165
80
        dh_strip -plibcurl3 -plibcurl3-gnutls -plibcurl3-nss    \
166
81
                --dbg-package=libcurl3-dbg
167
82
        dh_strip --remaining-packages
168
 
        dh_compress
169
 
        dh_fixperms
170
 
        dh_makeshlibs -plibcurl3 --add-udeb=libcurl3-udeb
171
 
        dh_makeshlibs -Nlibcurl3
172
 
        dh_installdeb
173
 
        dh_shlibdeps
174
 
        dh_md5sums
175
 
        dh_gencontrol
176
 
        dh_builddeb
177
 
 
178
 
binary: binary-indep binary-arch
179
 
 
180
 
.PHONY: binary binary-arch binary-indep build clean install
 
83
 
 
84
override_dh_auto_clean:
 
85
        $(RM) -r debian/build* debian/tmp*
 
86
        dh_auto_clean