File: rules

package info (click to toggle)
docbook5-xml 5.0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, squeeze, stretch, wheezy
  • size: 3,792 kB
  • ctags: 145
  • sloc: xml: 3,291; makefile: 50; perl: 47
file content (62 lines) | stat: -rwxr-xr-x 1,483 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
#!/usr/bin/make -f
# rules file for docbook5-xml

PACKAGE := docbook5-xml

build:
	dh_testdir

clean:
	dh_testdir
	dh_testroot
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs

binary-arch: install
binary-indep: install
	dh_testdir
	dh_testroot
	dh_installchangelogs ChangeLog.upstream
	dh_install
	dh_installdocs -X.xml
	dh_installexamples
	dh_installxmlcatalogs
	dh_bugfiles
	dh_link
	find $(CURDIR)/debian/$(PACKAGE) -type l -follow >/dev/null # exits 1 on broken links
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch

version=$(shell dpkg-parsechangelog | sed -n -e 's/^Version: \(.*\)-[^-]*/\1/p')

get-orig-source:
	set -ex ; \
	TMPDIR=$(PACKAGE)-${version}.orig ; \
	mkdir -p "$$TMPDIR" ; \
	touch "$$TMPDIR"/ChangeLog.upstream ; \
	for db in 5.0 ; do \
		dbxzip=docbook-$${db}.zip ; \
		mkdir -p "$$TMPDIR"/docbook-$${db} ; \
		wget -P "$$TMPDIR" http://www.docbook.org/xml/$${db}/"$$dbxzip" ; \
		unzip -d "$$TMPDIR" "$$TMPDIR"/"$$dbxzip" ; \
		rm -f "$$TMPDIR"/"$$dbxzip" ; \
		[ -f "$$TMPDIR"/docbook-$${db}/ChangeLog ] && \
		    cat "$$TMPDIR"/docbook-$${db}/ChangeLog >> "$$TMPDIR"/ChangeLog.upstream ; \
        done ; \
        find "$$TMPDIR" -type f ! -perm 644 -exec chmod 644 "{}" ";" ; \
        GZIP=-9 tar -czf $(CURDIR)/$(PACKAGE)_${version}.orig.tar.gz "$$TMPDIR" ; \
        rm -rf "$$TMPDIR"


.PHONY: binary binary-arch binary-indep build clean get-orig-source