~ubuntu-branches/ubuntu/warty/libmath-bigint-gmp-perl/warty

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Laurent Fousse
  • Date: 2004-06-05 19:08:45 UTC
  • Revision ID: james.westby@ubuntu.com-20040605190845-kika56jwgc4m5qyh
Tags: 1.14-1
Initial Release (closes: #252280).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
# This debian/rules file is provided as a template for normal perl
 
3
# packages. It was created by Marc Brockschmidt <marc@dch-faq.de> for
 
4
# the Debian Perl Group (http://pkg-perl.alioth.debian.org/) but may
 
5
# be used freely wherever it is useful.
 
6
 
 
7
# Uncomment this to turn on verbose mode.
 
8
#export DH_VERBOSE=1
 
9
 
 
10
# If set to a true value then MakeMaker's prompt function will
 
11
# always return the default without waiting for user input.
 
12
export PERL_MM_USE_DEFAULT=1
 
13
 
 
14
PACKAGE=$(shell dh_listpackages)
 
15
 
 
16
ifndef PERL
 
17
PERL = /usr/bin/perl
 
18
endif
 
19
 
 
20
TMP     =$(CURDIR)/debian/$(PACKAGE)
 
21
 
 
22
# Allow disabling build optimation by setting noopt in
 
23
# $DEB_BUILD_OPTIONS
 
24
CFLAGS = -Wall -g
 
25
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 
26
        CFLAGS += -O0
 
27
else
 
28
        CFLAGS += -O2
 
29
endif
 
30
 
 
31
build: build-stamp
 
32
build-stamp:
 
33
        dh_testdir
 
34
 
 
35
        # Add commands to compile the package here
 
36
        $(PERL) Makefile.PL INSTALLDIRS=vendor
 
37
        $(MAKE) OPTIMIZE="$(CFLAGS)" LD_RUN_PATH=""
 
38
 
 
39
        touch build-stamp
 
40
 
 
41
clean:
 
42
        dh_testdir
 
43
        dh_testroot
 
44
 
 
45
        # Add commands to clean up after the build process here
 
46
        -$(MAKE) realclean
 
47
 
 
48
        dh_clean build-stamp install-stamp
 
49
 
 
50
install: install-stamp
 
51
install-stamp:
 
52
        dh_testdir
 
53
        dh_testroot
 
54
        dh_clean -k
 
55
 
 
56
        # Add here commands to install the package into debian/tmp.
 
57
        #$(MAKE) test
 
58
        $(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
 
59
        
 
60
        # As this is a architecture dependent package, we are not supposed to install
 
61
        # stuff to /usr/share/perl5. MakeMaker creates the dirs, we delete them from 
 
62
        # the deb:
 
63
        rmdir --ignore-fail-on-non-empty --parents $(TMP)/usr/share/perl5
 
64
        
 
65
        touch install-stamp
 
66
 
 
67
# Build architecture-independent files here.
 
68
binary-indep: build install
 
69
# We have nothing to do by default.
 
70
 
 
71
# Build architecture-dependent files here.
 
72
binary-arch: build install
 
73
        dh_testdir
 
74
        dh_testroot
 
75
        dh_installdocs BUGS TODO README
 
76
        dh_installexamples 
 
77
#       dh_installmenu
 
78
#       dh_installcron
 
79
#       dh_installman
 
80
        dh_installchangelogs CHANGES
 
81
        dh_link
 
82
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 
83
        dh_strip
 
84
endif
 
85
        dh_compress
 
86
        dh_fixperms
 
87
        dh_makeshlibs
 
88
        dh_installdeb
 
89
        dh_perl 
 
90
        dh_shlibdeps
 
91
        dh_gencontrol
 
92
        dh_md5sums
 
93
        dh_builddeb
 
94
 
 
95
source diff:                                                                  
 
96
        @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
 
97
 
 
98
binary: binary-indep binary-arch
 
99
.PHONY: build clean binary-indep binary-arch binary