File: rules

package info (click to toggle)
doc-linux-nl 20050324-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 15,900 kB
  • ctags: 105
  • sloc: xml: 37,932; makefile: 313; perl: 193; sh: 120; ansic: 12; csh: 9
file content (151 lines) | stat: -rwxr-xr-x 4,867 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
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
#!/usr/bin/make -f
#
# Invoke each target with `./debian/rules <target>'.  All targets should be
# invoked with the package root as the current directory.
#
# Marco Budde (Budde@tu-harburg.de)

# The name of the package

DH_COMPAT=4

R = debian/doc-linux-nl-html
R2 = debian/doc-linux-nl-text
R3 = debian/manpages-nl

DIRECTORIES = \
	$(R) \
	$(R)/DEBIAN \
	$(R)/usr \
	$(R)/usr/share/doc \
	$(R)/usr/share/doc/doc-linux-nl-html/FAQ \
	$(R)/usr/share/doc/HOWTO/nl-html \
	$(R)/usr/share/doc/HOWTO \
	$(R2) \
	$(R2)/DEBIAN \
	$(R2)/usr \
	$(R2)/usr/share/doc \
	$(R2)/usr/share/doc/doc-linux-nl-text \
	$(R2)/usr/share/doc/HOWTO/nl-txt \
	$(R2)/usr/share/doc/HOWTO \
	$(R3) \
	$(R3)/DEBIAN \
	$(R3)/usr/share/man/nl/man1 \
	$(R3)/usr/share/man/nl/man2 \
	$(R3)/usr/share/man/nl/man3 \
	$(R3)/usr/share/man/nl/man4 \
	$(R3)/usr/share/man/nl/man5 \
	$(R3)/usr/share/man/nl/man6 \
	$(R3)/usr/share/man/nl/man8

MANVER = 1.45

$(DIRECTORIES):
	install -d -g root -o root -m 755 $@
	chmod g-s $@

# Builds the binary package.
build:
	$(checkdir)
	touch build

# Clean $(DIRECTORIES)
clean-dir:
	$(checkdir)
	rm -rf $(R)
	rm -rf $(R2)
	rm -rf $(R3)

# Undoes the effect of `make -f rules build'.
clean: clean-dir
	$(checkdir)
	dh_clean
	rm -f debian/files* debian/substvars core debian/*~ HOWTO/*~ 
	rm -f build *~ debian/*.debhelper
	rm -rf debian/manpage-build

# Makes a binary package.
binary-indep: $(DIRECTORIES) checkroot build
	$(checkdir)

binary-arch: $(DIRECTORIES) checkroot build
	$(checkdir)

#######################	   html	  ##############################

	(cd $(R)/usr/share/doc/HOWTO/nl-html && \
	find ../../../../../../../HOWTO/ -name "*.sgml" -exec cp {} . \; && \
	make -f ../../../../../../Makefile.sgml html && \
	sh ../../../../../../creindex.sh && \
	rm -rf *.sgml)

	dh_installdocs -p doc-linux-nl-html -P$(R)
	dh_installchangelogs -p doc-linux-nl-html -P$(R)

#######################	   txt    ##############################

	(cd $(R2)/usr/share/doc/HOWTO/nl-txt && \
	find ../../../../../../../HOWTO/ -name "*.sgml" -exec cp {} . \; && \
	make -f ../../../../../../Makefile.sgml txt && \
	rm -rf *.sgml && \
	gzip -9 -r * )

	dh_installdocs -p doc-linux-nl-text -P$(R2)
	dh_installchangelogs -p doc-linux-nl-text -P$(R2)

#######################	 manpages ##############################

	mkdir debian/manpage-build
	find MANPAGE/man-pages-$(MANVER)/man1 -path MANPAGE/man-pages-$(MANVER)/man1/CVS -prune -o -type f -a -not -name Makefile.in -exec debian/mp-mv {} 1 \;
	find MANPAGE/man-pages-$(MANVER)/man2 -path MANPAGE/man-pages-$(MANVER)/man1/CVS -prune -o -type f -a -not -name Makefile.in -exec debian/mp-mv {} 2 \;
	find MANPAGE/man-pages-$(MANVER)/man3 -path MANPAGE/man-pages-$(MANVER)/man1/CVS -prune -o -type f -a -not -name Makefile.in -exec debian/mp-mv {} 3 \;
	find MANPAGE/man-pages-$(MANVER)/man4 -path MANPAGE/man-pages-$(MANVER)/man1/CVS -prune -o -type f -a -not -name Makefile.in -exec debian/mp-mv {} 4 \;
	find MANPAGE/man-pages-$(MANVER)/man5 -path MANPAGE/man-pages-$(MANVER)/man1/CVS -prune -o -type f -a -not -name Makefile.in -exec debian/mp-mv {} 5 \;
	find MANPAGE/man-pages-$(MANVER)/man6 -path MANPAGE/man-pages-$(MANVER)/man1/CVS -prune -o -type f -a -not -name Makefile.in -exec debian/mp-mv {} 6 \;
	find MANPAGE/man-pages-$(MANVER)/man8 -path MANPAGE/man-pages-$(MANVER)/man1/CVS -prune -o -type f -a -not -name Makefile.in -exec debian/mp-mv {} 8 \;
	dh_installman debian/manpage-build/* -pmanpages-nl -P$(R3)
	dh_installdebconf -pmanpages-nl -P$(R3)
	dh_installdocs -pmanpages-nl -P$(R3)
	dh_installchangelogs -pmanpages-nl -P$(R3)

#################################################################

	dh_compress -pdoc-linux-nl-html -P$(R)
	dh_compress -pdoc-linux-nl-text -P$(R2)
	dh_compress -pmanpages-nl -P$(R3)
	dh_md5sums -pdoc-linux-nl-html -P$(R)
	dh_md5sums -pdoc-linux-nl-text -P$(R2)
	dh_md5sums -pmanpages-nl -P$(R3)
	dh_gencontrol -pdoc-linux-nl-html -P$(R)
	dh_gencontrol -pdoc-linux-nl-text -P$(R2)
	dh_gencontrol -pmanpages-nl -P$(R3)
	dh_installdeb -pdoc-linux-nl-html -P$(R)
	dh_installdeb -pdoc-linux-nl-text -P$(R2)
	dh_installdeb -pmanpages-nl -P$(R3)
	dh_md5sums -pdoc-linux-nl-text -P$(R)
	dh_md5sums -pdoc-linux-nl-text -P$(R2)
	dh_md5sums -pmanpages-nl -P$(R3)
	dpkg --build debian/doc-linux-nl-html ..
	dpkg --build debian/doc-linux-nl-text ..
	dpkg --build debian/manpages-nl ..

define checkdir
	test -f debian/rules
endef

binary:		binary-indep binary-arch

source diff:
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

checkroot:
	$(checkdir)
	test root = "`whoami`"

cvs-build:
	dpkg-buildpackage -rfakeroot -Iconfig -ICVS -Ien -IINDEX -Iintern -Iwork -IWORK -IDATABASE -uc -us

cvs-build-signed:
	debuild -Iconfig -ICVS -Ien -IINDEX -Iintern -Iwork -IWORK -IDATABASE

.PHONY: binary binary-arch binary-indep clean checkroot cvs-build cvs-build-signed