~rdoering/ubuntu/karmic/erlang/fix-535090

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Luca Falavigna
  • Date: 2008-11-04 22:26:12 UTC
  • mfrom: (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20081104222612-1uwzavuet6ar35fw
Tags: 1:12.b.3-dfsg-4ubuntu1
* Merge from Debian unstable, remaining Ubuntu changes:
  + debian/patches/glibc2.8_compatibility.patch:
    - Fix FTBFS with new glibc.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 
7
7
#export DH_VERBOSE=1
8
8
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
 
9
DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
10
DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
9
11
export QUILT_PATCHES := debian/patches
10
12
ROOT_DIR=$(shell pwd)
11
13
BUILD_DIR=$(ROOT_DIR)
19
21
-include ${BUILD_DIR}/lib/webtool/vsn.mk
20
22
SOURCE_VERSION=$(shell dpkg-parsechangelog | sed -ne's!^Version: \(.*\)-.*!\1!p')
21
23
ABI_VERSION=$(shell cat debian/control | sed -ne's!^Provides: erlang-abi-\(.*\)!\1!p' | head -1)
 
24
HIPE_ARCHES=$(shell cat debian/control | grep '^Architecture:' | egrep -v '(all|any)' | sed -e 's/^Architecture: *//')
22
25
 
23
 
BUILD_HIPE := $(shell cat debian/control | grep "^Architecture:" | grep -c ${DEB_HOST_ARCH} | sed -es/1/yes/ -es/0/no/)
 
26
BUILD_HIPE := $(shell echo ' $(HIPE_ARCHES) ' | grep -c ' ${DEB_HOST_ARCH} ' | sed -es/1/yes/ -es/0/no/)
24
27
ifeq ($(BUILD_HIPE), no)
25
28
BINARY_TARGETS=binary-erlang-base
26
29
INSTALL_RULE=install-stnd-stamp
31
34
TMPINSTALL_DIR=debian/erlang-hipe
32
35
endif
33
36
 
34
 
USE_KERNEL_POLL := $(shell echo ${DEB_HOST_ARCH} | egrep -c "bsd|hurd" | sed -es/1/no/ -es/0/yes/)
 
37
USE_KERNEL_POLL := $(shell echo ${DEB_HOST_ARCH} | egrep -c "hurd" | sed -es/1/no/ -es/0/yes/)
35
38
ifeq ($(USE_KERNEL_POLL), no)
36
39
KERNEL_POLL_OPT=--disable-kernel-poll
37
40
else
160
163
 
161
164
        (cd ${BUILD_DIR} && \
162
165
        CFLAGS="$(CFLAGS)" \
163
 
        ./configure --prefix=/usr \
 
166
        ./configure --host=$(DEB_HOST_GNU_TYPE) \
 
167
                    --build=$(DEB_BUILD_GNU_TYPE) \
 
168
                    --prefix=/usr \
164
169
                    --libexecdir=/usr/bin \
165
170
                    --infodir=/usr/share/info \
166
171
                    --mandir=/usr/share/man \
187
192
 
188
193
        (cd ${BUILD_DIR} && \
189
194
        CFLAGS="$(CFLAGS)" \
190
 
        ./configure --prefix=/usr \
 
195
        ./configure --host=$(DEB_HOST_GNU_TYPE) \
 
196
                    --build=$(DEB_BUILD_GNU_TYPE) \
 
197
                    --prefix=/usr \
191
198
                    --libexecdir=/usr/bin \
192
199
                    --infodir=/usr/share/info \
193
200
                    --mandir=/usr/share/man \
300
307
        for i in debian/*.in ; do \
301
308
            sed -e's/@VERSION@/$(VSN)/g' \
302
309
                -e's/@SOURCE_VERSION@/$(SOURCE_VERSION)/g' \
 
310
                -e's/@HIPE_ARCHES@/$(HIPE_ARCHES)/g' \
303
311
                -e's/@ABI_VERSION@/$(ABI_VERSION)/g' \
304
312
                -e's/@EI_VSN@/$(EI_VSN)/g' \
305
313
                -e's/@IC_VSN@/$(IC_VSN)/g' \
348
356
        dh_fixperms -i
349
357
        dh_makeshlibs -i
350
358
        dh_installdeb -i
 
359
        echo 'erlang-base=erlang-base | erlang-base-hipe' >>debian/erlang.substvars
 
360
        echo 'erlang-base=erlang-base (>= $${binary:Version}) | erlang-base-hipe (>= $${binary:Version}), erlang-base (<< $${binary:Version}.0) | erlang-base-hipe (<< $${binary:Version}.0)' >>debian/erlang-src.substvars
 
361
        echo 'erlang-base=erlang-base (>= $${binary:Version}) | erlang-base-hipe (>= $${binary:Version}), erlang-base (<< $${binary:Version}.0) | erlang-base-hipe (<< $${binary:Version}.0)' >>debian/erlang-examples.substvars
351
362
        dh_shlibdeps -i
352
363
        dh_gencontrol -i
353
364
        dh_md5sums -i
386
397
        dh_fixperms -a -Nerlang-base-hipe
387
398
        dh_makeshlibs -a -Nerlang-base-hipe
388
399
        dh_installdeb -a -Nerlang-base-hipe
 
400
ifneq ($(DEB_HOST_ARCH), hurd-i386)
 
401
        echo 'procps:Depends=procps' >>debian/erlang-base.substvars
 
402
endif
 
403
ifeq ($(BUILD_HIPE), yes)
 
404
        echo 'erlang-base=erlang-base (= $${binary:Version}) | erlang-base-hipe (= $${binary:Version})' >>debian/erlang-nox.substvars
 
405
        echo 'erlang-base=erlang-base (= $${binary:Version}) | erlang-base-hipe (= $${binary:Version})' >>debian/erlang-x11.substvars
 
406
        echo 'erlang-base=erlang-base (= $${binary:Version}) | erlang-base-hipe (= $${binary:Version})' >>debian/erlang-dev.substvars
 
407
else
 
408
        echo 'erlang-base=erlang-base (= $${binary:Version})' >>debian/erlang-nox.substvars
 
409
        echo 'erlang-base=erlang-base (= $${binary:Version})' >>debian/erlang-x11.substvars
 
410
        echo 'erlang-base=erlang-base (= $${binary:Version})' >>debian/erlang-dev.substvars
 
411
endif
389
412
        dh_shlibdeps -a -Nerlang-base-hipe
390
413
        dh_gencontrol -a -Nerlang-base-hipe
391
414
        dh_md5sums -a -Nerlang-base-hipe
408
431
        dh_fixperms -perlang-base-hipe
409
432
        dh_makeshlibs -perlang-base-hipe
410
433
        dh_installdeb -perlang-base-hipe
 
434
ifneq ($(DEB_HOST_ARCH), hurd-i386)
 
435
        echo 'procps:Depends=procps' >>debian/erlang-base-hipe.substvars
 
436
endif
411
437
        dh_shlibdeps -perlang-base-hipe
412
438
        dh_gencontrol -perlang-base-hipe
413
439
        dh_md5sums -perlang-base-hipe