File: rules

package info (click to toggle)
libxml-sax-perl 0.16%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 556 kB
  • ctags: 175
  • sloc: perl: 2,417; xml: 121; sh: 79; makefile: 52
file content (81 lines) | stat: -rwxr-xr-x 2,124 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
#!/usr/bin/make -f
## ----------------------------------------------------------------------
## debian/rules : package script for libxml-sax-perl
## ----------------------------------------------------------------------

## ----------------------------------------------------------------------
## uncomment this to turn on verbose mode
#export DH_VERBOSE=1

## ----------------------------------------------------------------------
PACKAGE=$(shell dh_listpackages)

ifndef PERL
PERL = /usr/bin/perl
endif

TMP_DIR =$(CURDIR)/debian/$(PACKAGE)

# use quilt to manage debian/patches
include /usr/share/quilt/quilt.make

## ----------------------------------------------------------------------
## targets

clean: unpatch
		dh_testdir
		dh_testroot
		dh_clean build-stamp install-stamp
		# remove generated files
		$(RM) XML-SAX-Base/lib/XML/SAX/*.pm t/lib/*
		# touch the Makefile so it won't get rebuilt after 'unpatch' 
		# has modified Makefile.PL
		[ ! -f Makefile ] || ( touch Makefile && $(MAKE) realclean )

build:		build-stamp
build-stamp: $(QUILT_STAMPFN)
		dh_testdir
		$(PERL) Makefile.PL INSTALLDIRS=vendor
		$(MAKE)
		$(MAKE) test
		touch $@

install:	install-stamp
install-stamp:	build-stamp
		dh_testdir
		dh_testroot
		dh_clean -k
		dh_installdirs
		$(MAKE) install PREFIX=$(TMP_DIR)/usr
		[ ! -d $(TMP_DIR)/usr/lib/perl5 ] || \
			rmdir --parents --ignore-fail-on-non-empty $(TMP_DIR)/usr/lib/perl5
		touch $@

binary-indep:	build install
		dh_testdir
		dh_testroot
		dh_install debian/update-perl-sax-parsers usr/bin
		dh_installman debian/update-perl-sax-parsers.8
		dh_installdocs
		dh_installexamples debian/examples/*
		dh_installchangelogs Changes
		dh_link /etc/perl/XML/SAX/ParserDetails.ini \
		        /usr/share/perl5/XML/SAX/ParserDetails.ini
		dh_compress
		dh_fixperms
		dh_installdeb
		dh_perl
		dh_gencontrol
		dh_md5sums
		dh_builddeb

binary-arch:

binary:		binary-indep binary-arch

get-orig-source:
	# debian/repack.pl: delete the file testfiles/xmltest.xml
	chmod 755 debian/repack.pl
	uscan --rename --force

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