File: rules

package info (click to toggle)
pica 0.4.1-9
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny, sarge
  • size: 516 kB
  • ctags: 78
  • sloc: perl: 2,499; makefile: 102
file content (44 lines) | stat: -rwxr-xr-x 1,549 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
#!/usr/bin/make -f
PREFIX=debian/pica
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/makefile.mk
DEB_MAKE_INSTALL_TARGET := install PREFIX=$(PREFIX) LIBDIR=$(PREFIX)/usr/share/pica
DEB_INSTALL_MANPAGES_pica := doc/pica.1
DEB_INSTALL_EXAMPLES_pica := doc/*.sample

common-build-indep::
	[ -f config.pm-dist ]  || mv -f config.pm{,-dist}  || true
	[ -f hosts.pm-dist ]   || mv -f hosts.pm{,-dist}   || true
	[ -f objects.pm-dist ] || mv -f objects.pm{,-dist} || true
	mkdir -p doc/manual.html
	hevea doc/manual.tex -o doc/manual.html/manual.html
	hevea doc/manual.tex -o doc/manual.html/manual.html
	cd doc/manual.html && hacha manual.html

common-install-indep::
	$(DEB_MAKE_INVOKE) installconf PREFIX=$(PREFIX)
	# Treat user.pm as a configuration file
	mv $(PREFIX)/var/lib/pica/user.pm $(PREFIX)/etc/pica/user.pm
	ln -s /etc/pica/user.pm $(PREFIX)/var/lib/pica
	# Get rid of the configuration files
	rm -f $(PREFIX)/etc/pica/*.sample
	# Force parser module generation
	rm -f config.pm hosts.pm objects.pm

	# Leave alone manual.ps, as it comes from upstream
	gzip -9c doc/manual.ps >doc/manual.ps.gz

	# Remove CVS/ directories
	find $(PREFIX) -type d -name CVS | xargs rm -rf

clean::
	rm -f doc/manual.dvi
	rm -f doc/manual.aux
	rm -f doc/manual.log
	rm -f doc/manual.ps.gz
	rm -rf doc/manual.html
	rm -f doc/pica.1
	# Move files again
	[ -f config.pm-dist ]  && mv -f config.pm{-dist,}  || true
	[ -f hosts.pm-dist ]   && mv -f hosts.pm{-dist,}   || true
	[ -f objects.pm-dist ] && mv -f objects.pm{-dist,} || true