Rev 122 | Rev 153 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 122 | Rev 149 | ||
|---|---|---|---|
| Line 19... | Line 19... | ||
| 19 | endif |
19 | endif |
| 20 | 20 | ||
| 21 | export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) |
21 | export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) |
| 22 | export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) |
22 | export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) |
| 23 | 23 | ||
| 24 | CFARGSEXTRA = --with-cdebug |
24 | CFARGSEXTRA := --with-cdebug |
| 25 | 25 | ||
| 26 | ifneq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) |
26 | ifneq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) |
| 27 | export CC=$(DEB_HOST_GNU_TYPE)-gcc |
27 | export CC=$(DEB_HOST_GNU_TYPE)-gcc |
| 28 | CFARGSEXTRA += --host=$(DEB_HOST_GNU_TYPE) |
28 | CFARGSEXTRA += --host=$(DEB_HOST_GNU_TYPE) |
| 29 | endif |
29 | endif |
| 30 | 30 | ||
| 31 | ifeq (,$(DEB_BUILD_ARCH)) |
- | |
| 32 | DEB_BUILD_ARCH=$(shell dpkg-architecture -qDEB_BUILD_ARCH) |
31 | DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH) |
| 33 | endif |
- | |
| 34 | - | ||
| 35 | CFLAGS_EXTRA = -g |
- | |
| 36 | CPPFLAGS_EXTRA = -DDEBIAN |
- | |
| 37 | - | ||
| 38 | ifdef SSP |
- | |
| 39 | SSP_FLAGS=-fstack-protector |
32 | DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) |
| 40 | endif |
- | |
| 41 | 33 | ||
| 42 | ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) |
34 | ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) |
| 43 | CFARGSEXTRA += --without-copt |
35 | CFARGSEXTRA += --without-copt |
| 44 | else |
36 | else |
| - | 37 | ifneq (,$(filter $(DEB_HOST_ARCH), i386)) |
|
| - | 38 | CFARGSEXTRA += --without-copt |
|
| - | 39 | export DEB_CFLAGS_MAINT_STRIP := -O2 -O3 |
|
| - | 40 | export DEB_CFLAGS_MAINT_PREPEND := -O1 |
|
| - | 41 | else |
|
| 45 | CFARGSEXTRA += --with-copt |
42 | CFARGSEXTRA += --with-copt |
| 46 | endif |
43 | endif |
| - | 44 | endif |
|
| 47 | 45 | ||
| 48 | ifneq (,$(filter debug,$(DEB_BUILD_OPTIONS))) |
46 | ifneq (,$(filter debug,$(DEB_BUILD_OPTIONS))) |
| 49 | CFARGSEXTRA += --with-rtldebug |
47 | CFARGSEXTRA += --with-rtldebug |
| 50 | else |
48 | else |
| 51 | CFARGSEXTRA += --without-rtldebug |
49 | CFARGSEXTRA += --without-rtldebug |
| 52 | endif |
50 | endif |
| 53 | 51 | ||
| 54 | CFLAGS_EXTRA += $(SSP_FLAGS) |
- | |
| 55 | # Temporary workaround for hppa linker issues |
52 | # Temporary workaround for hppa linker issues |
| 56 | ifeq ($(DEB_BUILD_ARCH),hppa) |
53 | ifeq ($(DEB_BUILD_ARCH),hppa) |
| 57 | CFLAGS_EXTRA += -ffunction-sections |
54 | export DEB_CFLAGS_MAINT_APPEND += -ffunction-sections |
| 58 | endif |
- | |
| 59 | - | ||
| 60 | ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS))) |
- | |
| 61 | INSTALL_PROGRAM += -s |
- | |
| 62 | endif |
55 | endif |
| 63 | 56 | ||
| 64 | EXTRA_ARGS=--with-security |
57 | EXTRA_ARGS=--with-security |
| 65 | 58 | ||
| - | 59 | export DEB_CPPFLAGS_MAINT_APPEND := -DDEBIAN |
|
| - | 60 | export DEB_LDFLAGS_MAINT_APPEND := -Wl,--as-needed |
|
| - | 61 | ||
| 66 | DO_MACHINE_CODE=no |
62 | DO_MACHINE_CODE=no |
| 67 | ifeq ($(DEB_BUILD_ARCH),i386) |
63 | ifeq ($(DEB_HOST_ARCH),i386) |
| 68 | DO_MACHINE_CODE=yes |
64 | DO_MACHINE_CODE=yes |
| 69 | endif |
65 | endif |
| 70 | ifeq ($(DEB_BUILD_ARCH),powerpc) |
66 | ifeq ($(DEB_HOST_ARCH),powerpc) |
| 71 | DO_MACHINE_CODE=yes |
67 | DO_MACHINE_CODE=yes |
| 72 | endif |
68 | endif |
| 73 | ifeq ($(DEB_BUILD_ARCH),sparc) |
69 | ifeq ($(DEB_BUILD_ARCH),sparc) |
| 74 | DO_MACHINE_CODE=no |
70 | DO_MACHINE_CODE=no |
| 75 | endif |
71 | endif |
| Line 91... | Line 87... | ||
| 91 | 87 | ||
| 92 | ifneq ($(VERSION),$(DEBVERSION)) |
88 | ifneq ($(VERSION),$(DEBVERSION)) |
| 93 | $(error Version mismatch; buildid.txt: $(VERSION), debian/changelog: $(DEBVERSION)) |
89 | $(error Version mismatch; buildid.txt: $(VERSION), debian/changelog: $(DEBVERSION)) |
| 94 | endif |
90 | endif |
| 95 | 91 | ||
| - | 92 | CFLAGS := $(shell dpkg-buildflags --get CFLAGS) |
|
| - | 93 | CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS) |
|
| - | 94 | LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) |
|
| - | 95 | ||
| - | 96 | # --with-lib-path is just to stop configure from adding all the |
|
| - | 97 | # standard library directories with -L as well as -R to LDFLAGS |
|
| 96 | CFARGS=$(CFARGSEXTRA) \ |
98 | CFARGS=$(CFARGSEXTRA) \ |
| 97 | --with-cflags='$(CFLAGS_EXTRA)' \ |
99 | --with-cflags='`dpkg-buildflags --get CFLAGS`' \ |
| 98 | --with-cppflags='$(CPPFLAGS_EXTRA)' \ |
100 | --with-cppflags='`dpkg-buildflags --get CPPFLAGS`' \ |
| - | 101 | --with-ldflags='`dpkg-buildflags --get LDFLAGS`' \ |
|
| - | 102 | --prefix=/usr \ |
|
| 99 | --with-bignums \ |
103 | --with-bignums \ |
| 100 | --with-gmp \ |
104 | --with-gmp \ |
| 101 | --with-poll \ |
105 | --with-poll \ |
| 102 | --with-zlib \ |
106 | --with-zlib \ |
| 103 | --with-freetype \ |
107 | --with-freetype \ |
| Line 227... | Line 231... | ||
| 227 | binary-arch: build-arch install |
231 | binary-arch: build-arch install |
| 228 | dh_testdir -a |
232 | dh_testdir -a |
| 229 | dh_testroot -a |
233 | dh_testroot -a |
| 230 | dh_install -a -N$(PIKE)-core --sourcedir=debian/tmp $(DH_EXCLUDE) |
234 | dh_install -a -N$(PIKE)-core --sourcedir=debian/tmp $(DH_EXCLUDE) |
| 231 | dh_install -p$(PIKE)-core --sourcedir=debian/tmp $(DH_EXCLUDE) $(DH_ALREADY) |
235 | dh_install -p$(PIKE)-core --sourcedir=debian/tmp $(DH_EXCLUDE) $(DH_ALREADY) |
| 232 | for p in $(MODULE_PACKAGES) $(PIKE)-dev; do \ |
236 | for p in $(MODULE_PACKAGES); do \ |
| 233 | dh_link -p$$p usr/share/doc/$(PIKE)-core usr/share/doc/$$p; \ |
237 | dh_link -p$$p usr/share/doc/$(PIKE)-core usr/share/doc/$$p; \ |
| - | 238 | sed "s/#PACKAGE#/$$p/" debian/prerm-snippet >> debian/$$p.prerm.debhelper; \ |
|
| 234 | done |
239 | done |
| 235 | dh_installdocs -a |
240 | dh_installdocs -a |
| 236 | dh_installmenu -a |
241 | dh_installmenu -a |
| 237 | dh_installchangelogs -a -k CHANGES |
242 | dh_installchangelogs -a -k CHANGES |
| 238 | dh_strip -a |
243 | dh_strip -a |