File: rules

package info (click to toggle)
libapache-mod-perl-doc 1.29.0.2-5cvs20040129
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,428 kB
  • ctags: 3
  • sloc: makefile: 65; sh: 1
file content (97 lines) | stat: -rwxr-xr-x 2,748 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
#!/usr/bin/make -f

export DH_COMPAT=4

# CVS snapshot
V=20040129

source.make: source.make-stamp
source.make-stamp:
	tar zxvf modperl-docs-$(V).tar.gz > /dev/null
	touch source.make-stamp

build: source.make build-stamp
build-stamp: 
	cd modperl-docs && ./bin/build -d
	touch build-stamp

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	# installing everything
	cp -rp \
		modperl-docs/dst_html/* \
		debian/libapache-mod-perl-doc/usr/share/doc/libapache-mod-perl-doc/html/

	# cleaning up a few things
	cd debian/libapache-mod-perl-doc/usr/share/doc/libapache-mod-perl-doc/html/ && \
		rm -rf docs/1.0/guide/code/CVS/ && \
		rm -rf docs/2.0/user/porting/code/CVS/ && \
		rm -rf docs/2.0/devel/debug/code/CVS/

	cp debian/lintian debian/libapache-mod-perl-doc/usr/share/lintian/overrides/libapache-mod-perl-doc

# Build architecture-independent files here.
binary-indep: build install
	dh_testdir
	dh_testroot

	dh_installdocs
	dh_installchangelogs
	# do not use dh_compress otherwise it would break
	# links inside the documentation
	gzip -9 debian/libapache-mod-perl-doc/usr/share/doc/libapache-mod-perl-doc/changelog.Debian
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

# Build architecture-dependent files here.
binary-arch: build
# Do nothing

binary: binary-indep binary-arch

clean:
	dh_testdir
	dh_testroot
	rm -rf modperl-docs
	rm -f *-stamp
	dh_clean

# this requires cvs (that is not a builddep)
# since it is not meant to be used "for free"
autoupdate: source.make

	dh_testdir
	dh_testroot # required for cleaning the source after

	# updating from cvs
	cvs -d:pserver:anoncvs@cvs.apache.org:/home/cvspublic login
	echo use anoncvs as password
	cd modperl-docs && \
	cvs -d:pserver:anoncvs@cvs.apache.org:/home/cvspublic up
	cvs -d:pserver:anoncvs@cvs.apache.org:/home/cvspublic logout

	export TODAY=`date +%Y%m%d` && \
	tar zcvlp -f modperl-docs-$$TODAY.tar.gz modperl-docs > /dev/null && \
	cat debian/rules | sed -e 's/^V=.*/V='$$TODAY'/g' > debian/rules.new && \
	echo "libapache-mod-perl-doc (`dpkg -p libapache-mod-perl | grep ^Version | cut -d " " -f 2`cvs$$TODAY) UNRELEASED; urgency=low" > debian/changelog.new && \
	echo "" >> debian/changelog.new && \
	echo "  * New CVS snapshot" >> debian/changelog.new && \
	echo "" >> debian/changelog.new && \
	echo " -- changeme <changeme@chageme.org>  `date -R`" >> debian/changelog.new && \
	echo "" >> debian/changelog.new && \
	cat debian/changelog >> debian/changelog.new

	# dangerous things
	rm -f modperl-docs-$(V).tar.gz
	chmod 755 debian/rules.new && mv debian/rules.new debian/rules
	mv debian/changelog.new debian/changelog
	make -f debian/rules clean

.PHONY: build clean binary-indep binary-arch binary install source.make