]> git.donarmstrong.com Git - debhelper.git/blob - debian/rules
c1009b7f063ca6563c6dd7e4c7be2179bec8603c
[debhelper.git] / debian / rules
1 #!/usr/bin/make -f
2 # Note that I have to refer to debhelper programs with ./, to make sure
3 # I run the most current ones. That's also why there is a symlink to the 
4 # current dh_lib and the current dh_getopt.pl in this debian/ directory.
5
6 # If any automatic script generation is done in building this package, 
7 # be sure to use the new templates from this package.
8 export DH_AUTOSCRIPTDIR=autoscripts
9
10 # Figure out the current debhelper version.
11 VERSION=$(shell expr "`dpkg-parsechangelog 2>/dev/null`" : \
12         '.*Version: \(.*\).*Distribution:')
13
14 export DH_VERBOSE=1
15
16 test_files=dh_lib
17
18 build:
19         # Important symlinks.
20         cd autoscripts && ln -sf postinst-menu postrm-menu
21         cd debian && ln -sf ../dh_lib dh_lib
22         cd debian && ln -sf ../dh_getopt.pl dh_getopt.pl
23
24         ./dh_testdir $(test_files)
25         sed "s/#DEBHELPER_VERSION#/$(VERSION)/" < dh_testversion.in \
26                 > dh_testversion
27         chmod 755 dh_testversion
28
29 clean:
30         ./dh_testdir $(test_files)
31         ./dh_testroot
32         ./dh_clean dh_testversion
33
34 # Build architecture-dependent files here.
35 binary-arch: build
36 # We have nothing to do by default.
37
38 # Build architecture-independent files here.
39 binary-indep: build
40         ./dh_testdir $(test_files)
41         ./dh_testroot
42         ./dh_clean -k
43         ./dh_installdirs usr/bin usr/lib/debhelper
44
45         find . -perm +111 -maxdepth 1 -type f -not -name "*.pl" \
46                 -exec install -p {} debian/tmp/usr/bin \;
47         cp -a dh_lib dh_getopt.pl debian/tmp/usr/lib/debhelper
48         cp -a autoscripts debian/tmp/usr/lib/debhelper
49
50         ./dh_installdocs TODO README PROGRAMMING
51         ./dh_installexamples examples/*
52         ./dh_installmenu
53         ./dh_installmanpages
54         ./dh_installchangelogs
55         ./dh_movefiles
56         ./dh_compress
57         ./dh_fixperms
58         ./dh_suidregister
59         ./dh_installdeb
60         ./dh_gencontrol
61         ./dh_md5sums
62         ./dh_builddeb
63
64 binary: binary-indep binary-arch
65 .PHONY: build clean binary-indep binary-arch binary