~ubuntu-branches/ubuntu/trusty/libextutils-autoinstall-perl/trusty-proposed

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Package Import Robot
  • Author(s): gregor herrmann
  • Date: 2013-09-13 16:14:30 UTC
  • Revision ID: package-import@ubuntu.com-20130913161430-o6hewbxlgplxaebx
Tags: 0.63-2
* Take over for the Debian Perl Group with maintainer's permission
  (https://lists.debian.org/debian-perl/2013/08/msg00050.html)
* debian/control: Added: Vcs-Git field (source stanza); Vcs-Browser
  field (source stanza); Homepage field (source stanza). Changed:
  Maintainer set to Debian Perl Group <pkg-perl-
  maintainers@lists.alioth.debian.org> (was: Bastian Blank
  <waldi@debian.org>); Bastian Blank <waldi@debian.org> moved to
  Uploaders.
* debian/watch: use metacpan-based URL.
* Switch to "3.0 (quilt)" source format.
* Use debhelper 8 and tiny dh(1) debian/rules.
* Convert debian/copyright to Copyright Format 1.0.
* Drop version from perl build dependency.
* Add /me to Uploaders.
* Update short/long description.
* Declare compliance with Debian Policy 3.9.4.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
2
 
3
 
SOURCE := $(shell dpkg-parsechangelog | sed -ne 's,^Source: *\(.*\)$$,\1,p')
4
 
VERSION_DEBIAN := $(shell dpkg-parsechangelog | sed -ne 's,^Version: *\(.*\)$$,\1,p')
5
 
VERSION := $(shell echo "$(VERSION_DEBIAN)" | sed -e 's,^[0-9]*:,,' -e 's,-[^-]*$$,,')
6
 
 
7
 
# If set to a true value then MakeMaker's prompt function will
8
 
# always return the default without waiting for user input.
9
 
export PERL_MM_USE_DEFAULT=1
10
 
 
11
 
PACKAGE = $(shell dh_listpackages)
12
 
 
13
 
ifndef PERL
14
 
PERL = /usr/bin/perl
15
 
endif
16
 
 
17
 
TMP = $(CURDIR)/debian/$(PACKAGE)
18
 
TESTDIR =$(CURDIR)/debian/testdir
19
 
 
20
 
build: build-stamp
21
 
build-stamp:
22
 
        dh_testdir
23
 
 
24
 
        $(PERL) Makefile.PL INSTALLDIRS=vendor
25
 
        $(MAKE)
26
 
        mkdir $(TESTDIR)
27
 
        HOME=$(TESTDIR) $(MAKE) test
28
 
        
29
 
        touch $@
30
 
 
31
 
clean:
32
 
        dh_testdir
33
 
        rm -rf $(TESTDIR)
34
 
        rm -f build-stamp
35
 
 
36
 
        -$(MAKE) distclean
37
 
        
 
3
BUILDHOME = $(CURDIR)/debian/build
 
4
 
 
5
%:
 
6
        dh $@
 
7
 
 
8
override_dh_clean:
38
9
        dh_clean
39
 
 
40
 
install: build
41
 
        dh_testdir
42
 
        dh_testroot
43
 
        dh_clean -k
44
 
 
45
 
        $(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
46
 
        
47
 
        [ ! -d $(TMP)/usr/lib/perl5 ] || rmdir --ignore-fail-on-non-empty --parents $(TMP)/usr/lib/perl5
48
 
 
49
 
# Build architecture-dependent files here.
50
 
binary-arch: build install
51
 
# We have nothing to do by default.
52
 
 
53
 
# Build architecture-independent files here.
54
 
binary-indep: build install
55
 
        dh_testdir
56
 
        dh_testroot
57
 
#       dh_installcron
58
 
#       dh_installmenu
59
 
#       dh_installexamples
60
 
        dh_installdocs TODO README
61
 
        dh_installchangelogs Changes
62
 
        dh_perl
63
 
        dh_link
64
 
        dh_strip
65
 
        dh_compress
66
 
        dh_fixperms
67
 
        dh_installdeb
68
 
        dh_gencontrol
69
 
        dh_md5sums
70
 
        dh_builddeb
71
 
 
72
 
binary: binary-indep binary-arch
73
 
 
74
 
maintainerclean:
75
 
        rm -rf $(filter-out .svn .svk debian, $(wildcard * .[^.]*))
76
 
 
77
 
DIR_ORIG = ../orig/$(SOURCE)-$(VERSION)
78
 
TAR_ORIG_NAME = $(SOURCE)_$(VERSION).orig.tar.gz
79
 
TAR_ORIG = $(firstword $(wildcard ../$(TAR_ORIG_NAME)) $(wildcard ../orig/$(TAR_ORIG_NAME)))
80
 
 
81
 
orig: $(DIR_ORIG)
82
 
        rsync --delete --exclude debian --exclude .svk --exclude .svn --link-dest=$(DIR_ORIG)/ -a $(DIR_ORIG)/ .
83
 
 
84
 
$(DIR_ORIG):
85
 
ifeq ($(TAR_ORIG),)
86
 
        $(error Cannot find orig tarball $(TAR_ORIG_NAME))
87
 
else
88
 
        mkdir -p ../orig
89
 
        tar -C ../orig -xzf $(TAR_ORIG)
90
 
endif
91
 
 
92
 
.PHONY: build clean binary-indep binary-arch binary
 
10
        rm -rf $(BUILDHOME)
 
11
 
 
12
override_dh_auto_test:
 
13
        mkdir -p $(BUILDHOME)
 
14
        HOME=$(BUILDHOME) dh_auto_test