File: rules

package info (click to toggle)
junior-doc 1.16.1
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, sid, squeeze, stretch, wheezy
  • size: 64 kB
  • ctags: 6
  • sloc: makefile: 69; sh: 31
file content (60 lines) | stat: -rwxr-xr-x 2,139 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
#!/usr/bin/make -f
# derived from sample debian/rules file for GNU hello by Ian Jackson.

tmp = $(shell pwd)/debian/tmp
docdir = $(tmp)/usr/share/doc/junior-doc
examplesdir = $(docdir)/examples
scriptsdir = $(examplesdir)/scripts

build: stamp-build
stamp-build:
	test -d quickguide -a -f debian/rules
	cd quickguide && $(MAKE) html txt ps
	cd quickguide && gzip -9 junior-quickguide.txt junior-quickguide.ps
	touch $@

clean:
	test -d quickguide -a -f debian/rules
	test "`id -u`" -eq 0
	cd quickguide && $(MAKE) clean
	rm -rf $(tmp)
	rm -f quickguide/*.gz stamp-build debian/files `find . -name "*~"`

binary: binary-indep binary-arch

binary-arch:

binary-indep: build
	test -d quickguide -a -f debian/rules
	test "`id -u`" -eq 0
	rm -rf $(tmp)

	install -m 755 -d $(tmp)/DEBIAN $(docdir) $(docdir)/quickguide \
          $(examplesdir) $(scriptsdir) $(tmp)/usr/share/doc-base
	cd quickguide && install -m 644 junior-quickguide.txt.gz \
		    junior-quickguide.ps.gz \
                    junior-quickguide.html/* $(docdir)/quickguide

	install -m 755 debian/prerm debian/postinst $(tmp)/DEBIAN
	install -m 644 doc-base/* $(tmp)/usr/share/doc-base
	install -m 644 debian/copyright $(docdir)
	install -m 644 scripts/list-junior.sh $(scriptsdir)
	gzip -c9 debian/changelog > $(docdir)/changelog.gz
	chown -R root.root $(tmp) && chmod -R go=rX $(tmp)
	dpkg-gencontrol -isp
	dpkg --build $(tmp) ..

# If we were including the quickguide in ftp/doc, we would do the
# following, similar to doc-debian.  But while the project is still
# immature, we will not upload these materials.  Instead, we will
# just distribute them from the Debian Jr. website.  If this is ever
# enabled, it needs to be OK'd by ftpmaster@d.o
#
# The extra-package files:
#	cd quickguide/junior-quickguide.html && GZIP=-9 tar czf ../../../junior-quickguide.html.tar.gz *
#	cp quickguide/junior-quickguide.txt.gz quickguide/junior-quickguide.ps.gz ../
#	dpkg-distaddfile junior-quickguide.html.tar.gz byhand -
#	dpkg-distaddfile junior-quickguide.txt.gz byhand -
#	dpkg-distaddfile junior-quickguide.ps.gz byhand -

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