File: rules

package info (click to toggle)
doc-linux-it 2003.12-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 6,592 kB
  • ctags: 10
  • sloc: perl: 87; makefile: 61; sh: 61
file content (84 lines) | stat: -rwxr-xr-x 2,036 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f               

R = debian/doc-linux-it
R2 = debian/doc-linux-it-text

HTML_BUILD = $(R)/usr/share/doc/HOWTO/it-html
TEXT_BUILD = $(R2)/usr/share/doc/HOWTO/it-txt

source = $(shell dpkg-parsechangelog | grep '^Source:' | sed 's/^Source: //')
upstream = $(shell dpkg-parsechangelog | grep '^Version:' | \
                  sed -e 's/^Version: //' -e 's/-.*//')

export DH_COMPAT = 2
export DH_OPTIONS

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

build: 

clean:
	dh_testdir
	dh_testroot
	rm -rf $(R) $(R2)
	dh_clean

# Build a new .orig.tar.gz.
orig: clean
	tar -C .. --exclude debian -czvf \
	../$(source)_$(upstream).orig.tar.gz $(source)-$(upstream)

# Construct the binary packages.

binary-doc-linux-it: DH_OPTIONS=-pdoc-linux-it
binary-doc-linux-it: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	tar -C $(R)/usr/share/doc/HOWTO -xzf HOWTO/Linux-html-HOWTOs.tar.gz
	mv $(R)/usr/share/doc/HOWTO/HOWTO $(HTML_BUILD)

	chmod +x debian/sgml2dhelp       # diffs don't preserve permissions
	cd $(R)/usr/share/doc/HOWTO/it-html; \
		../../../../../../sgml2dhelp Italian/HOWTO System
	dh_installchangelogs
	gzip -9 $(R)/usr/share/doc/doc-linux-it/changelog.Debian 
	ln -s ../HOWTO/it-html $(R)/usr/share/doc/doc-linux-it/HOWTO
	dh_installmenu

binary-doc-linux-it-text: DH_OPTIONS=-pdoc-linux-it-text
binary-doc-linux-it-text: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	tar -C $(TEXT_BUILD) -xzf HOWTO/Linux-HOWTOs.tar.gz

	dh_installchangelogs
	gzip -9 $(R2)/usr/share/doc/doc-linux-it-text/changelog.Debian 
	ln -s ../HOWTO/it-txt $(R2)/usr/share/doc/doc-linux-it-text/HOWTO

binary-arch:

# Makes a binary package.
binary-indep: DH_OPTIONS=-i
binary-indep: binary-doc-linux-it binary-doc-linux-it-text
	dh_testdir
	dh_testroot
	dh_fixperms
	dh_installdocs
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch

.PHONY: clean orig
.PHONY: binary-doc-linux-it binary-doc-linux-it-text
.PHONY: binary-arch binary-indep binary