File: rules

package info (click to toggle)
doc-linux-de 2003.10-5
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 1,136 kB
  • ctags: 5
  • sloc: makefile: 86; sh: 6
file content (86 lines) | stat: -rwxr-xr-x 1,998 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
#!/usr/bin/make -f
#
# Invoke each target with `./debian/rules <target>'.  All targets should be
# invoked with the package root as the current directory.

# The name of the package
P = doc-linux-de

R = debian/$(P)

DIRECTORIES = \
        $(R) \
        $(R)/DEBIAN \
        $(R)/usr/share/doc/HOWTO/de-html/mini \
        $(R)/usr/share/doc/$(P)/FAQ \
#        $(R)/usr/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)

# Undoes the effect of `make -f rules build'.
clean: clean-dir
	$(checkdir)
	[ ! -f Makefile ] || make distclean cleanconfig
	rm -f debian/files* debian/substvars core debian/*~ HOWTO/*~ 
	rm -f HOWTO/mini/*~ build debian/*.debhelper

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

	cp HOWTO/*.sgml.gz $(R)/usr/share/doc/HOWTO/de-html 
	gunzip $(R)/usr/share/doc/HOWTO/de-html/*.gz
	(cd $(R)/usr/share/doc/HOWTO/de-html && make -f ../../../../../../sgml-Makefile html && rm -f *.sgml)

	cp HOWTO/mini/*.sgml.gz $(R)/usr/share/doc/HOWTO/de-html/mini 
	gunzip $(R)/usr/share/doc/HOWTO/de-html/mini/*.gz
	(cd $(R)/usr/share/doc/HOWTO/de-html/mini && make -f ../../../../../../../sgml-Makefile html && rm -f *.sgml)

	cp icons/*.gif $(R)/usr/share/doc/HOWTO/de-html
	cp icons/*.gif $(R)/usr/share/doc/HOWTO/de-html/mini

	(cd $(R)/usr/share/doc/$(P)/FAQ; tar xvfz ../../../../../../../dcoul-faq_html.tar.gz)

	dh_installdocs
	dh_installchangelogs
	dh_compress
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary-arch:

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-indep clean checkroot