]> git.donarmstrong.com Git - class_modular.git/.git/blob - debian/rules
start 0.06SVN version
[class_modular.git/.git] / debian / rules
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         $(PERL) Makefile.PL INSTALLDIRS=vendor
36         $(MAKE)
37         $(MAKE) test
38
39         touch build-stamp
40
41 clean:
42         dh_testdir
43         dh_testroot
44
45         -$(MAKE) distclean
46
47         dh_clean build-stamp install-stamp
48
49 install: install-stamp
50 install-stamp: build-stamp
51         dh_testdir
52         dh_testroot
53         dh_clean -k
54
55         $(MAKE) install PREFIX=$(TMP)/usr
56
57         # As this is a architecture independent package, we are not supposed to install
58         # stuff to /usr/lib. MakeMaker creates the dirs, we delete them from the deb:
59         rmdir --ignore-fail-on-non-empty --parents $(TMP)/usr/lib/perl5
60
61         touch install-stamp
62
63 binary-arch:
64 # We have nothing to do by default.
65
66 binary-indep: build install
67         dh_testdir
68         dh_testroot
69 #       dh_installcron
70 #       dh_installmenu
71 #       dh_installexamples
72         dh_installdocs
73         dh_installchangelogs CHANGES
74         dh_perl
75         dh_link
76         dh_strip
77         dh_compress
78         dh_fixperms
79         dh_installdeb
80         dh_gencontrol
81         dh_md5sums
82         dh_builddeb
83
84 source diff:                                                                  
85         @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
86
87 binary: binary-indep binary-arch
88 .PHONY: build clean binary-indep binary-arch binary