File: rules

package info (click to toggle)
konwert 1.8-13.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,236 kB
  • sloc: sh: 30,632; cpp: 1,335; perl: 874; makefile: 317
file content (116 lines) | stat: -rwxr-xr-x 2,763 bytes parent folder | download | duplicates (3)
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
# -*- makefile -*-
# Made with the aid of dh_make, by Craig Small
# Uses debhelper, GNU copyright 1997 by Joey Hess.
# Some lines taken from debmake, by Cristoph Lameter.

export LC_ALL=C

topdir=$(shell pwd)
debdir=${topdir}/debian
tmpdir=${debdir}/tmp
docdir=${debdir}/konwert-filters/usr/share/doc

CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
CXXFLAGS := -Wall $(shell dpkg-buildflags --get CXXFLAGS)
LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)

build-arch: build
build-indep: build
build: build-stamp
build-stamp:
	dh_testdir

	chmod +x filters/UTF8-prn7pl
	make CXXFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" prefix=/usr

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp

	${MAKE} clean || true

	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs

	${MAKE} install prefix=${tmpdir}/usr nofixmanconfig=1 \
		mandir=${tmpdir}/usr/share/man

	mkdir -p ${tmpdir}/usr/share/doc
	mv ${tmpdir}/usr/doc/* ${tmpdir}/usr/share/doc/
	rmdir ${tmpdir}/usr/doc

	dh_movefiles

#	cd debian/konwert-filters/usr/share/konwert/filters/ && \
#	  mv 512bold 512bold1 ${tmpdir}/usr/share/konwert/filters

	test -z "`find ${tmpdir} -not -type d | tee /dev/fd/2`" 

binary-indep: install
	dh_testdir -i
	dh_testroot -i

	cd ${debdir}/konwert-dev/usr/share/doc && \
		ln -s konwert konwert-dev

 # override hardlinks warnings
	mkdir -p ${debdir}/konwert-filters/usr/share/lintian/overrides/
	cp debian/lintian-override \
	  ${debdir}/konwert-filters/usr/share/lintian/overrides/konwert-filters

 # remove symlink to binary-arch filter (could be improved - is it worth ?)
#	(cd ${debdir}/konwert-filters/usr/share/konwert/filters/ && \
#	   ( test -L 512bold && rm 512bold ; \
#	     test -L 512bold1 && rm 512bold1 ) )

 # rename docdir
	cd ${docdir} && mv konwert-* konwert-filters

 # remove GPL and redundant files
	cd ${docdir}/konwert-filters && rm */COPYING en/CHANGES pl/ZMIANY

	dh_installdocs -pkonwert-filters
	dh_installchangelogs -pkonwert-filters doc/en/CHANGES
	dh_compress -i
	dh_fixperms -i
	dh_installdeb -i
	dh_perl -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

binary-arch: install
	dh_testdir -a
	dh_testroot -a
	dh_bash-completion -a

 # what is this empy dir for ?
#	rmdir ${tmpdir}/usr/lib/konwert/devel/

	rm -rf ${tmpdir}/usr/share/doc/konwert-1.8
	dh_installdocs -a
	ln -s ../konwert-filters/en  ../konwert-filters/pl debian/konwert/usr/share/doc/konwert/
	dh_buildinfo -a
	dh_installchangelogs -a

	dh_strip -a
	dh_compress -a
	dh_fixperms -a
	dh_installdeb -a
	dh_shlibdeps -a
	dh_perl -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

binary: binary-indep binary-arch
.PHONY: build build-arch build-indep clean binary-indep binary-arch binary