File: rules

package info (click to toggle)
doc-linux-nl 20011220-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,632 kB
  • ctags: 16
  • sloc: perl: 193; sh: 84; makefile: 74
file content (115 lines) | stat: -rwxr-xr-x 2,920 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
#!/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

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

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

$(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)

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

# 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 && \
	cp ../../../../../../../HOWTO/*.gz .  && \
	cp ../../../../../../../gif/*.gif .  && \
	gunzip *.gz && \
	make -f ../../../../../../Makefile.sgml html && \
	sh ../../../../../../creindex.sh && \
	rm -rf *.sgml)

	cp debian/copyright $(R)/usr/share/doc/doc-linux-nl-html
	cp debian/changelog $(R)/usr/share/doc/doc-linux-nl-html
	gzip -9 $(R)/usr/share/doc/doc-linux-nl-html/changelog

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

	(cd $(R2)/usr/share/doc/HOWTO/nl-txt && \
	cp ../../../../../../../HOWTO/*.gz .  && \
	gunzip *.gz && \
	make -f ../../../../../../Makefile.sgml txt && \
	rm -rf *.sgml && \
	gzip -9 -r * )

	cp debian/copyright $(R2)/usr/share/doc/doc-linux-nl-text
	cp debian/changelog $(R2)/usr/share/doc/doc-linux-nl-text
	gzip -9 $(R2)/usr/share/doc/doc-linux-nl-text/changelog

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

	#dh_dhelp -pdoc-linux-nl-html -P$(R)
	dh_installdeb -pdoc-linux-nl-html -P$(R)
	dh_installdeb -pdoc-linux-nl-text -P$(R2)
	dh_installdocs -pdoc-linux-nl-html -P$(R)
	dh_installdocs -pdoc-linux-nl-text -P$(R2)
	dh_md5sums -pdoc-linux-nl-html -P$(R)
	dh_md5sums -pdoc-linux-nl-text -P$(R2)
	dpkg-gencontrol -pdoc-linux-nl-html -P$(R)
	dpkg-gencontrol -pdoc-linux-nl-text -P$(R2)
	dpkg --build debian/doc-linux-nl-html ..
	dpkg --build debian/doc-linux-nl-text ..



define checkdir
	test -f debian/rules
endef

# Below here is fairly generic really

binary:		binary-indep binary-arch

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

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

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