]> git.donarmstrong.com Git - perltidy.git/blob - debian/rules
use DESTDIR instead of PREFIX
[perltidy.git] / debian / rules
1 #!/usr/bin/make -f
2 #-*- makefile -*-
3 # Made with the aid of dh_make, by Craig Small
4 # Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
5 # Some lines taken from debmake, by Christoph Lameter.
6
7 # Uncomment this to turn on verbose mode.
8 #export DH_VERBOSE=1
9
10 PACKAGE=$(shell dh_listpackages)
11
12 ifndef PERL
13 PERL = /usr/bin/perl
14 endif
15
16 TMP     =`pwd`/debian/$(PACKAGE)
17
18 build: build-stamp
19 build-stamp:
20         dh_testdir
21
22         $(PERL) Makefile.PL INSTALLDIRS=vendor
23         $(MAKE) OPTIMIZE="-O2 -g -Wall"
24
25         touch build-stamp
26
27 clean:
28         dh_testdir
29         dh_testroot
30         rm -f build-stamp
31
32         if [ -e Makefile ]; then \
33                 $(MAKE) distclean;\
34                 rm -f Makefile;\
35         fi
36
37         dh_clean
38
39 install: 
40         dh_testdir
41         dh_testroot
42         dh_clean -k
43         dh_installdirs
44
45         $(MAKE) install DESTDIR=$(TMP)
46         [ ! -d $(TMP)/usr/lib/perl5 ] || \
47                 rmdir -p  --ignore-fail-on-non-empty $(TMP)/usr/lib/perl5
48
49
50
51 # Build architecture-dependent files here.
52 binary-arch: build install
53 # We have nothing to do by default.
54
55 # Build architecture-independent files here.
56 binary-indep: build install
57         dh_testdir
58         dh_testroot
59         dh_installdocs BUGS TODO README examples/README docs/README
60         dh_installexamples examples/*
61         dh_installmenu
62         dh_installcron
63         dh_installman
64         dh_installchangelogs CHANGES
65         dh_compress
66         dh_fixperms
67         dh_installdeb
68         dh_perl 
69         dh_gencontrol
70         dh_md5sums
71         dh_builddeb
72
73 binary: binary-indep binary-arch
74 .PHONY: build clean binary-indep binary-arch binary