~ubuntu-branches/ubuntu/lucid/libextutils-autoinstall-perl/lucid

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Bastian Blank
  • Date: 2008-04-20 20:58:37 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080420205837-vg72sld0wv581iz3
Tags: 0.63-1
* New upstream version.
* Use external orig.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
2
 
3
 
# Uncomment this to turn on verbose mode.
4
 
#export DH_VERBOSE=1
 
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,-[^-]*$$,,')
5
6
 
6
7
# If set to a true value then MakeMaker's prompt function will
7
8
# always return the default without waiting for user input.
29
30
 
30
31
clean:
31
32
        dh_testdir
32
 
        dh_testroot
33
33
        rm -rf $(TESTDIR)
34
34
        rm -f build-stamp
35
35
 
44
44
 
45
45
        $(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
46
46
        
47
 
        rmdir --ignore-fail-on-non-empty --parents $(TMP)/usr/lib/perl5
 
47
        [ ! -d $(TMP)/usr/lib/perl5 ] || rmdir --ignore-fail-on-non-empty --parents $(TMP)/usr/lib/perl5
48
48
 
49
49
# Build architecture-dependent files here.
50
50
binary-arch: build install
70
70
        dh_builddeb
71
71
 
72
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
 
73
92
.PHONY: build clean binary-indep binary-arch binary