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
110
111
112
113
114
115
116
|
#!/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_PWD := $(shell pwd)
l_STAMPS := debian/l_stamps
l_RUN_CHECK := 1
l_CFLAGS := -g -Wall
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
l_CFLAGS += -O0
else
l_CFLAGS += -O2
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
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_TAR_SRCDIR = icu/source
DEB_COMPRESS_EXCLUDE = html examples
DEB_INSTALL_EXAMPLES_libicu36-dev = \
build-tree/$(DEB_TAR_SRCDIR)/samples/*
# Overridden for 32-bit packages on 64-bit platforms
DEB_DH_INSTALL_SOURCEDIR=debian/tmp
# Include cdbs rules files.
include /usr/share/cdbs/1/rules/tarball.mk
include /usr/share/cdbs/1/rules/simple-patchsys.mk
include /usr/share/cdbs/1/rules/debhelper.mk
cleanbuilddir::
$(RM) -r $(l_STAMPS)
# 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/libicu36 configure/libicu36-dev:: debian/stamp-configure
debian/stamp-configure:
cd $(DEB_SRCDIR) && \
CFLAGS="$(l_CFLAGS)" CXXFLAGS="$(l_CFLAGS)" \
$(l_CONFIGURE)
touch debian/stamp-configure
configure/lib32icu36 configure/lib32icu36-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/libicu36 build/libicu36-dev::
$(MAKE) -C $(DEB_SRCDIR)
build/lib32icu36 build/lib32icu36-dev::
$(MAKE) -C $(DEB_SRCDIR)-build32
install/libicu36 install/libicu36-dev::
$(MAKE) -C $(DEB_SRCDIR) install DESTDIR=$(CURDIR)/debian/tmp
binary-install/lib32icu36 binary-install/lib32icu36-dev:: DEB_DH_INSTALL_SOURCEDIR=debian/tmp32
install/lib32icu36 install/lib32icu36-dev::
$(MAKE) -C $(DEB_SRCDIR)-build32 install DESTDIR=$(CURDIR)/debian/tmp32
install/icu-doc:: install/libicu36 install/libicu36-dev
$(MAKE) -C $(DEB_SRCDIR) install-doc DESTDIR=$(CURDIR)/debian/tmp
ifeq ($(DEB_HOST_ARCH),amd64)
# On amd64 only, it appears that we need to put these in a different
# location.
binary-install/lib32icu36 binary-install/lib32icu36-dev::
mkdir -p debian/$(cdbs_curpkg)/emul/ia32-linux/usr
mv debian/$(cdbs_curpkg)/usr/lib32 debian/$(cdbs_curpkg)/emul/ia32-linux/usr/lib
endif
# As per upstream, icuswap is deprecated and should not be
# distributed.
binary-post-install/libicu36-dev::
find debian/$(cdbs_curpkg) -type f -name .cvsignore | xargs rm
rm debian/$(cdbs_curpkg)/usr/sbin/icuswap
# 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
|