File: rules

package info (click to toggle)
scim-tables 0.5.9-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 20,616 kB
  • ctags: 1,940
  • sloc: sh: 20,039; ansic: 8,530; cpp: 6,592; perl: 4,718; makefile: 936; yacc: 288; sed: 16
file content (126 lines) | stat: -rwxr-xr-x 3,149 bytes parent folder | download | duplicates (2)
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
117
118
119
120
121
122
123
124
125
126
#!/usr/bin/make -f
#
# debian/rules for scim-tables package
# Copyright Ming Hua <minghua@rice.edu>, 2006,2007
#
# This file is distributed under the same license as scim-tables.

# uncomment this to turn on verbose mode
#export DH_VERBOSE = 1

# set the platform for configure script, especially useful for cross-compiling
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
ifeq ($(DEB_HOST_GNU_TYPE), $(DEB_BUILD_GNU_TYPE))
	CONFFLAGS += --build=$(DEB_BUILD_GNU_TYPE)
else
	CONFFLAGS += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
endif
# for more information, see /usr/share/doc/autotools-dev/README.Debian.gz

# set compiler flags, enable warning and debug
CFLAGS += -W -g
CXXFLAGS += -W -g
# set optimization level
ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O
	CXXFLAGS += -O
else
	CFLAGS += -O0
	CXXFLAGS += -O0
endif

clean: clean-patched unpatch

clean-patched:
	dh_testdir
	dh_testroot
	rm -f build-stamp
	# only run "make distclean" if a Makefile exists
	[ ! -f Makefile ] || $(MAKE) distclean
	# remove existent config.{guess,sub} as we use the ones from
	# autotools-dev package
	rm -f config.guess config.sub
	# remove GMO file for Dutch translation
	rm -f po/nl.gmo
	dh_clean

patch: patch-stamp
patch-stamp:
	dh_testdir
	dpatch apply-all
	# put information about applied patches in the stamp file
	dpatch cat-all -nd >$@

unpatch:
	dh_testdir
	dpatch deapply-all
	rm -rf debian/patched
	rm -f patch-stamp

config.status: patch-stamp
	dh_testdir
	# link config.{guess,sub} from autotools-dev package
	ln -sf /usr/share/misc/config.guess config.guess
	ln -sf /usr/share/misc/config.sub config.sub
	rm -f config.cache
	# run configure with all necessary definitions and options
	./configure \
		CFLAGS="$(CFLAGS)" \
		CXXFLAGS="$(CXXFLAGS)" \
		$(CONFFLAGS) \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--disable-skim-support \
		--disable-static

build: build-stamp
build-stamp: config.status
	dh_testdir
	dh_clean
	$(MAKE)
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp

	uudecode -o debian/tmp/usr/share/scim/icons/Translit.png debian/Translit.png.uu
	uudecode -o debian/tmp/usr/share/scim/icons/Ukrainian-Translit.png debian/Ukrainian-Translit.png.uu
	# clean up unnecessary library files for modules
	rm debian/tmp/usr/lib/scim-1.0/*/*/*.la
	# distribute files to different binary packages
	dh_install --sourcedir=debian/tmp --fail-missing
	touch $@

binary: binary-arch binary-indep

binary-arch: build
	dh_testdir
	dh_testroot
	dh_installchangelogs -a ChangeLog
	dh_installdocs -a
	dh_strip -a
	dh_compress -a
	dh_fixperms -a
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

binary-indep: build
	dh_testdir
	dh_testroot
	dh_installchangelogs -i ChangeLog
	dh_installdocs -i
	dh_compress -i
	dh_fixperms -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

get-orig-source:
	uscan --verbose --rename --repack --force-download

.SUFFIXES:
.PHONY: clean build binary binary-arch binary-indep clean-patched patch unpatch get-orig-source

# vim:textwidth=0: