]> git.donarmstrong.com Git - debhelper.git/blob - debian/rules
r146: Initial Import
[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.pm and the current Dh_getopt.pm 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 |grep Version:`" : '.*Version: \(.*\)')
12
13 export DH_VERBOSE=1
14
15 build:
16 # Nothing to do.
17
18 clean:
19         ./dh_testdir
20         ./dh_testroot
21         ./dh_clean
22
23 # Build architecture-dependent files here.
24 binary-arch: build
25 # Nothing to do.
26
27 # Build architecture-independent files here.
28 binary-indep: build
29         ./dh_testdir
30         ./dh_testroot
31         ./dh_clean -k
32         ./dh_installdirs usr/bin usr/lib/debhelper
33
34         echo -e "package Dh_Version;\n\$$version='$(VERSION)';" > debian/tmp/usr/lib/debhelper/Dh_Version.pm
35         find . -perm +111 -maxdepth 1 -type f -not -name "*.pl" \
36                 -exec install -p {} debian/tmp/usr/bin \;
37         cp -a *.pm debian/tmp/usr/lib/debhelper
38         cp -a autoscripts debian/tmp/usr/lib/debhelper
39
40         ./dh_installdocs doc/TODO doc/README doc/PROGRAMMING doc/from-debstd
41         ./dh_installexamples examples/*
42         ./dh_installmenu
43         ./dh_installmanpages
44         ./dh_installchangelogs
45         ./dh_movefiles
46         ./dh_link
47         ./dh_compress
48         ./dh_fixperms
49         ./dh_suidregister
50         ./dh_installdeb
51         ./dh_gencontrol
52         ./dh_md5sums
53         ./dh_builddeb
54
55 # Install in the proper location on my ftp server and web server. Not intended
56 # for use by anyone except the author.
57 OLD_VER=$(shell perl -e '<>;<>;while(<>){last if /^ --/};<>;$$_=<>;print m/\((.*?)\)/'<debian/changelog)
58 dist:
59         dpkg-buildpackage -rfakeroot -tc
60         if [ `hostname` = 'kite' ] ; then \
61                 cp ../debhelper_$(VERSION).tar.gz ../../public; \
62                 rm /home/ftp/pub/code/debhelper/* || true; \
63                 cp debian/changelog /home/pub/programs/debhelper/CHANGES; \
64                 echo $(VERSION) > /home/pub/programs/debhelper/LATEST-VERSION-IS; \
65                 cd ..; rm -rf debhelper-$(OLD_VER); \
66                 [ -f ../public/debhelper_$(OLD_VER).tar.gz ] && \
67                 tar zxf ../public/debhelper_$(OLD_VER).tar.gz || \
68                 tar zxf ../outdated/debhelper_$(OLD_VER).tar.gz; \
69                 diff -r -u --new-file debhelper-$(OLD_VER) debhelper-$(VERSION) > \
70                         /home/ftp/pub/code/debhelper/diffs/debhelper-$(VERSION).diff; \
71                 gzip -9f /home/ftp/pub/code/debhelper/diffs/debhelper-$(VERSION).diff; \
72                 cd /tmp; rm -f debhelper-$(OLD-VER); \
73         fi
74
75 binary: binary-indep binary-arch
76 .PHONY: build clean binary-indep binary-arch binary localdist