File: rules

package info (click to toggle)
icu 57.1-6%2Bdeb9u4
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 98,548 kB
  • sloc: cpp: 385,068; ansic: 161,995; makefile: 5,496; sh: 4,101; xml: 3,796; perl: 3,193; python: 471; sed: 35; lisp: 12
file content (60 lines) | stat: -rwxr-xr-x 1,779 bytes parent folder | download
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
#!/usr/bin/make -f
# -*- makefile -*-

include /usr/share/dpkg/architecture.mk

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

l_SONAME=57

override_dh_clean:
	dh_clean
	find $(CURDIR)/source/ \( -name Makefile -o -name pkgdataMakefile \) \
		-exec rm {} \;
	rm -Rf build-native

override_dh_auto_configure:
ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
	dh_auto_configure -- --enable-static
else
	dh_auto_configure -B $(CURDIR)/build-native -- --host=$(DEB_BUILD_GNU_TYPE)
	dh_auto_build -B $(CURDIR)/build-native
	dh_auto_configure -- --enable-static --with-cross-build=$(CURDIR)/build-native
endif

override_dh_auto_build:
	dh_auto_build --parallel
	$(MAKE) -C $(CURDIR)/source/ doc

override_dh_auto_install:
	dh_auto_install
	$(MAKE) -C $(CURDIR)/source/ install-doc DESTDIR=$(CURDIR)/debian/tmp/
	# delete extra license file
	rm  $(CURDIR)/debian/tmp/usr/share/icu/57.1/LICENSE

override_dh_installdocs-indep:
	dh_installdocs -i
	# symlink duplicated files
	for file in `find debian/icu-doc/usr/share/doc/icu-doc/html/ -name \*icu_1_1\*`; do \
		normal=`echo $$file | sed s/icu_1_1//`; \
		if [ -f $$normal ]; then \
			rm $$file; \
			ln -s `basename $$normal` $$file; \
		fi; \
	done

override_dh_strip:
	dh_strip -plibicu$(l_SONAME) --dbg-package=libicu$(l_SONAME)-dbg
	dh_strip -picu-devtools --dbg-package=icu-devtools-dbg
	# libicudata library doesn't contain any debug symbols, remove that
	for file in `find debian/libicu$(l_SONAME)-dbg/usr/lib/debug -type f -print`; do \
		if ! nm -a $$file | grep -q debug; then rm $$file; fi; \
	done

%:
	dh $@ --sourcedirectory=$(CURDIR/)source/ --parallel

.PHONY: override_dh_clean override_dh_auto_configure override_dh_auto_build \
	override_dh_auto_install override_dh_installdocs-indep \
	override_dh_strip