~ubuntu-branches/ubuntu/trusty/libcache-fastmmap-perl/trusty

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Krzysztof Krzyzaniak (eloy), Krzysztof Krzyzaniak
  • Date: 2005-10-14 10:55:04 UTC
  • Revision ID: james.westby@ubuntu.com-20051014105504-qgfa6x5qofc6xmpe
Tags: 1.09-6
[ Krzysztof Krzyzaniak]
Added debian/watch file

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
# 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
 
 
19
# Allow disabling build optimation by setting noopt in
 
20
# $DEB_BUILD_OPTIONS
 
21
CFLAGS = -Wall -g
 
22
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 
23
        CFLAGS += -O0
 
24
else
 
25
        CFLAGS += -O2
 
26
endif
 
27
 
 
28
build: build-stamp
 
29
build-stamp:
 
30
        dh_testdir
 
31
        # Add commands to compile the package here
 
32
        $(PERL) Makefile.PL INSTALLDIRS=vendor
 
33
        $(MAKE) OPTIMIZE="$(CFLAGS)" LD_RUN_PATH=""
 
34
        touch build-stamp
 
35
 
 
36
clean:
 
37
        dh_testdir
 
38
        dh_testroot
 
39
        -$(MAKE) realclean
 
40
        dh_clean build-stamp install-stamp
 
41
 
 
42
install: build install-stamp
 
43
install-stamp:
 
44
        dh_testdir
 
45
        dh_testroot
 
46
        dh_clean -k
 
47
        $(MAKE) test
 
48
        $(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
 
49
 
 
50
        # As this is a architecture dependent package, we are not
 
51
        # supposed to install stuff to /usr/share. MakeMaker creates
 
52
        # the dirs, we delete them from the deb:
 
53
        rmdir --ignore-fail-on-non-empty --parents $(TMP)/usr/share/perl5
 
54
        touch install-stamp
 
55
 
 
56
# Build architecture-independent files here.
 
57
binary-indep: build install
 
58
# We have nothing to do by default.
 
59
 
 
60
# Build architecture-dependent files here.
 
61
binary-arch: build install
 
62
        dh_testdir
 
63
        dh_testroot
 
64
#       dh_installdocs README Cache-FastMmap-CImpl/README
 
65
        dh_installexamples 
 
66
#       dh_installmenu
 
67
#       dh_installcron
 
68
#       dh_installman
 
69
        dh_installchangelogs Changes
 
70
        dh_link
 
71
        dh_strip
 
72
        dh_compress
 
73
        dh_fixperms
 
74
        dh_makeshlibs
 
75
        dh_installdeb
 
76
        dh_perl 
 
77
        dh_shlibdeps
 
78
        dh_gencontrol
 
79
        dh_md5sums
 
80
        dh_builddeb
 
81
 
 
82
source diff:                                                                  
 
83
        @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
 
84
 
 
85
binary: binary-indep binary-arch
 
86
.PHONY: build clean binary-indep binary-arch binary