File: rules

package info (click to toggle)
doc-linux-fr 1998.03-1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 2,560 kB
  • ctags: 6
  • sloc: makefile: 69; sh: 16
file content (99 lines) | stat: -rwxr-xr-x 2,833 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
#!/usr/bin/make -f
# Sample debian.rules file - Copyright 1994,1995 by Ian Jackson.
#
# 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-fr

INSTALL = install -s

R = debian/tmp

DIRECTORIES = \
        $(R) \
        $(R)/DEBIAN \
        $(R)/usr \
        $(R)/usr/doc \
        $(R)/usr/doc/LANG/fr \
        $(R)/usr/doc/LANG/fr/linux \
        $(R)/usr/doc/LANG/fr/linux/fsstnd \
        $(R)/usr/doc/LANG/fr/HOWTO \
        $(R)/usr/doc/LANG/fr/HOWTO/mini \
        $(R)/usr/doc/$(P) \
	$(R)/usr/lib \
	$(R)/usr/lib/menu

# 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
	rm -f build

# Makes a binary package.
binary-indep: $(DIRECTORIES) checkroot build
	$(checkdir)
	(cd $(R)/usr/doc/LANG/fr/linux && \
	tar xvfz ../../../../../../../fcol-faq-html.tar.gz)
	(cd $(R)/usr/doc/LANG/fr/linux/fsstnd && \
	tar xvfz ../../../../../../../../old/fsstnd-fr-html.tar.gz)
	(cd $(R)/usr/doc/LANG/fr/linux && \
	tar xvfz ../../../../../../../info-sheet.fr-html.tar.gz)
	(cd $(R)/usr/doc/LANG/fr/linux && \
	tar xvfz ../../../../../../../intro-html.tar.gz)
	(cd $(R)/usr/doc/LANG/fr/linux && \
	tar xvfz ../../../../../../../meta-faq.fr-html.tar.gz)
	#(cd $(R)/usr/doc/LANG/fr/linux && \
	#tar xvfz ../../../../../../../Guide_Rootard.html.tgz)
	sh debian/xtar-doc ../../../../../../../HOWTO/html $(R)/usr/doc/LANG/fr/HOWTO
	sh debian/xtar-doc ../../../../../../../../HOWTO/mini/html $(R)/usr/doc/LANG/fr/HOWTO/mini
	$(INSTALL) -m 644 debian/index.html $(R)/usr/doc/LANG/fr/linux/.

binary-arch: $(DIRECTORIES) checkroot build
	$(checkdir)
	$(INSTALL) -m 755 debian/postinst $(R)/DEBIAN/.
	$(INSTALL) -m 755 debian/postrm $(R)/DEBIAN/.
	$(INSTALL) -m 644 debian/changelog $(R)/usr/doc/$(P)/changelog.Debian
	$(INSTALL) -m 644 debian/copyright $(R)/usr/doc/$(P)/.
	$(INSTALL) -m 644 debian/menu $(R)/usr/lib/menu/$(P)
	ln -s ../LANG/fr $(R)/usr/doc/$(P)/fr
	#ln -s ../LANG/fr/HOWTO $(R)/usr/doc/HOWTO/html/fr
	gzip -9v $(R)/usr/doc/$(P)/changelog.Debian
	dpkg-gencontrol
	chown -R root.root $(R)
	chmod -R go-ws+rX $(R)
	chmod -R u-s+rw $(R)
	dpkg --build debian/tmp ..

define checkdir
	test -f intro-html.tar.gz -a -f debian/rules
endef

# Below here is fairly generic really

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

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