~ubuntu-branches/ubuntu/utopic/libxml-sax-perl/utopic

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Niko Tyni
  • Date: 2008-04-04 16:00:12 UTC
  • mfrom: (1.1.4 upstream) (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080404160012-2kh7ygoy3a8l1s9g
Tags: 0.16+dfsg-3
README.Debian: replace a broken link to the CPAN FAQ entry about
uninstalling CPAN modules with its intended content. (Closes: #469958)

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
#export DH_VERBOSE=1
9
9
 
10
10
## ----------------------------------------------------------------------
11
 
TMP_DIR         = debian/tmp
 
11
PACKAGE=$(shell dh_listpackages)
 
12
 
 
13
ifndef PERL
 
14
PERL = /usr/bin/perl
 
15
endif
 
16
 
 
17
TMP_DIR =$(CURDIR)/debian/$(PACKAGE)
 
18
 
 
19
# use quilt to manage debian/patches
 
20
include /usr/share/quilt/quilt.make
12
21
 
13
22
## ----------------------------------------------------------------------
14
23
## targets
15
24
 
16
 
clean:
 
25
clean: unpatch
17
26
                dh_testdir
18
27
                dh_testroot
19
 
                [ ! -f Makefile ] || $(MAKE) realclean
20
 
                dh_clean
21
 
                rm -f build-stamp install-stamp
 
28
                dh_clean build-stamp install-stamp
 
29
                # remove generated files
 
30
                $(RM) XML-SAX-Base/lib/XML/SAX/*.pm t/lib/*
 
31
                # touch the Makefile so it won't get rebuilt after 'unpatch' 
 
32
                # has modified Makefile.PL
 
33
                [ ! -f Makefile ] || ( touch Makefile && $(MAKE) realclean )
22
34
 
23
35
build:          build-stamp
24
 
build-stamp:
 
36
build-stamp: $(QUILT_STAMPFN)
25
37
                dh_testdir
26
 
                perl Makefile.PL INSTALLDIRS=vendor
27
 
                $(MAKE) OPTIMIZE="-O2 -g -Wall"
 
38
                $(PERL) Makefile.PL INSTALLDIRS=vendor
 
39
                $(MAKE)
28
40
                $(MAKE) test
29
 
                touch build-stamp
 
41
                touch $@
30
42
 
31
43
install:        install-stamp
32
 
install-stamp:  build
 
44
install-stamp:  build-stamp
33
45
                dh_testdir
34
46
                dh_testroot
35
47
                dh_clean -k
36
48
                dh_installdirs
37
 
                $(MAKE) install PREFIX=$(PWD)/$(TMP_DIR)/usr
38
 
                touch install-stamp
 
49
                $(MAKE) install PREFIX=$(TMP_DIR)/usr
 
50
                [ ! -d $(TMP_DIR)/usr/lib/perl5 ] || \
 
51
                        rmdir --parents --ignore-fail-on-non-empty $(TMP_DIR)/usr/lib/perl5
 
52
                touch $@
39
53
 
40
54
binary-indep:   build install
41
55
                dh_testdir
42
56
                dh_testroot
43
 
                dh_install --sourcedir=$(TMP_DIR)
44
 
                dh_installman
 
57
                dh_install debian/update-perl-sax-parsers usr/bin
 
58
                dh_installman debian/update-perl-sax-parsers.8
45
59
                dh_installdocs
46
 
                dh_installexamples
 
60
                dh_installexamples debian/examples/*
47
61
                dh_installchangelogs Changes
48
 
                dh_link
 
62
                dh_link /etc/perl/XML/SAX/ParserDetails.ini \
 
63
                        /usr/share/perl5/XML/SAX/ParserDetails.ini
49
64
                dh_compress
50
65
                dh_fixperms
51
66
                dh_installdeb
58
73
 
59
74
binary:         binary-indep binary-arch
60
75
 
61
 
.PHONY:         clean build install binary-indep binary-arch binary
 
76
get-orig-source:
 
77
        # debian/repack.pl: delete the file testfiles/xmltest.xml
 
78
        chmod 755 debian/repack.pl
 
79
        uscan --rename --force
62
80
 
63
 
## ----------------------------------------------------------------------
 
81
.PHONY:         clean build install binary-indep binary-arch binary get-orig-source