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
|
#!/usr/bin/make -f
DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
# To distinguish variables that are truly local to this file (rather
# than for use by cdbs), we adopt the convention of starting local
# variables' names with l_.
l_SONAME := 44
l_CFLAGS := -g -Wall
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
l_CFLAGS += -O0
else
l_CFLAGS += -O2
endif
# Turn off optimization on armel to avoid some internal compiler
# errors. This can be removed once bug 484053 is resolved.
ifeq ($(shell dpkg --print-architecture),armel)
l_CFLAGS := $(filter-out -O%,$(l_CFLAGS)) -O0
endif
# common configure cruft
l_CONFIGURE = CC="gcc" CXX="g++" CPPFLAGS="" LDFLAGS="" \
./configure \
--build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \
--includedir="\$${prefix}/include" \
--mandir="\$${prefix}/share/man" --infodir="\$${prefix}/share/info" \
--sysconfdir=/etc --localstatedir=/var \
--disable-maintainer-mode --disable-dependency-tracking
# specific to this package
l_CONFIGURE += --disable-samples --enable-static --enable-weak-threads
ifneq (, $(filter $(DEB_HOST_ARCH_CPU), amd64 ppc64 kfreebsd-amd64))
build32 := build32
endif
# Variables used by cdbs
VERSION := $(shell dpkg-parsechangelog | \
awk '/Version:/ {print $$2}' | cut -d- -f 1)
DEB_SRCDIR = $(CURDIR)/source
DEB_COMPRESS_EXCLUDE = html examples
DEB_INSTALL_EXAMPLES_libicu-dev = \
source/samples/*
# Overridden for 32-bit packages on 64-bit platforms
DEB_DH_INSTALL_SOURCEDIR=debian/tmp
DEB_DBG_PACKAGE_libicu$(l_SONAME) = libicu$(l_SONAME)-dbg
override DEB_MAKE_CHECK_TARGET = check
# Include cdbs rules files.
include /usr/share/cdbs/1/rules/debhelper.mk
# As 0.4.21, cdbs creates but doesn't remove debian/compat. It
# creates it conditionally, so this doesn't have a trivial fix.
clean::
$(RM) debian/compat *.cdbs-config_list
$(RM) -rf debian/tmp32
$(RM) debian/stamp-configure debian/stamp-configure32
post-patches::
chmod a+x $(DEB_SRCDIR)/configure
ifneq (, $(build32))
cp -a $(DEB_SRCDIR) $(DEB_SRCDIR)-build32
endif
configure/libicu$(l_SONAME) configure/libicu-dev:: debian/stamp-configure
debian/stamp-configure:
cd $(DEB_SRCDIR) && \
CFLAGS="$(l_CFLAGS)" CXXFLAGS="$(l_CFLAGS)" \
$(l_CONFIGURE)
touch debian/stamp-configure
configure/lib32icu$(l_SONAME) configure/lib32icu-dev:: debian/stamp-configure32
debian/stamp-configure32:
cd $(DEB_SRCDIR)-build32 && \
CFLAGS="$(l_CFLAGS) -m32" CXXFLAGS="$(l_CFLAGS) -m32" \
$(l_CONFIGURE) --libdir=/usr/lib32
touch debian/stamp-configure32
build/libicu$(l_SONAME) build/libicu-dev::
$(MAKE) -C $(DEB_SRCDIR)
build/lib32icu$(l_SONAME) build/lib32icu-dev::
$(MAKE) -C $(DEB_SRCDIR)-build32
install/libicu$(l_SONAME) install/libicu-dev::
$(MAKE) -C $(DEB_SRCDIR) install DESTDIR=$(CURDIR)/debian/tmp
binary-install/lib32icu$(l_SONAME) binary-install/lib32icu-dev:: DEB_DH_INSTALL_SOURCEDIR=debian/tmp32
install/lib32icu$(l_SONAME) install/lib32icu-dev::
$(MAKE) -C $(DEB_SRCDIR)-build32 install DESTDIR=$(CURDIR)/debian/tmp32
install/icu-doc:: install/libicu$(l_SONAME) install/libicu-dev
$(MAKE) -C $(DEB_SRCDIR) install-doc DESTDIR=$(CURDIR)/debian/tmp
# Install lintian override files
binary-post-install/%::
if [ -f debian/$*.lintian ]; then \
mkdir -p debian/$*/usr/share/lintian/overrides && \
cp -p debian/$*.lintian debian/$*/usr/share/lintian/overrides/$*; \
fi
binary-predeb/%::
perl debian/fix_substvars.pl debian/$*.substvars 'lib(32)?icu.*'
|