root/debian/rules

Revision 84:468a3641d43a, 2.1 KB (checked in by anselm, 7 years ago)

First stab at Debian packaging, for the benefit of Our-ISP and Linup
Front GmbH.

  • Property exe set to *
Line 
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.
12export PERL_MM_USE_DEFAULT=1
13
14PACKAGE=$(shell dh_listpackages)
15
16ifndef PERL
17PERL = /usr/bin/perl
18endif
19
20TMP     =$(CURDIR)/debian/$(PACKAGE)
21
22# Allow disabling build optimation by setting noopt in
23# $DEB_BUILD_OPTIONS
24CFLAGS = -Wall -g
25ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
26        CFLAGS += -O0
27else
28        CFLAGS += -O2
29endif
30
31build: build-stamp
32build-stamp:
33        dh_testdir
34
35        # Add commands to compile the package here
36        $(PERL) Makefile.PL INSTALLDIRS=vendor
37        $(MAKE) OPTIMIZE="$(CFLAGS)"
38       
39        touch build-stamp
40
41clean:
42        dh_testdir
43        dh_testroot
44
45        # Add commands to clean up after the build process here
46        [ ! -e Makefile ] || $(MAKE) distclean
47       
48        dh_clean build-stamp install-stamp
49
50install: install-stamp
51install-stamp: build-stamp
52        dh_testdir
53        dh_testroot
54        dh_clean -k
55
56        #$(MAKE) test
57        $(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
58       
59        # As this is a architecture independent package, we are not supposed to install
60        # stuff to /usr/lib. MakeMaker creates the dirs, we delete them from the deb:
61        rmdir --ignore-fail-on-non-empty --parents $(TMP)/usr/lib/perl5
62
63        touch install-stamp
64
65binary-arch:
66# We have nothing to do by default.
67
68binary-indep: build install
69        dh_testdir
70        dh_testroot
71#       dh_installcron
72#       dh_installmenu
73#       dh_installexamples
74        dh_installdocs README doc/Lancelot-HOWTO.txt
75        dh_installchangelogs
76        dh_perl
77        dh_link
78        dh_strip
79        dh_compress
80        dh_fixperms
81        dh_installdeb
82        dh_gencontrol
83        dh_md5sums
84        dh_builddeb
85
86source diff:                                                                 
87        @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
88
89binary: binary-indep binary-arch
90.PHONY: build clean binary-indep binary-arch binary
Note: See TracBrowser for help on using the browser.