]> git.donarmstrong.com Git - debhelper.git/blob - debian/rules
r127: 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 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 |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 dh_lib dh_getopt.pl *.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_compress
47         ./dh_fixperms
48         ./dh_suidregister
49         ./dh_installdeb
50         ./dh_gencontrol
51         ./dh_md5sums
52         ./dh_builddeb
53
54 # Install in the proper location on my ftp server and web server. Not intended
55 # for use by anyone except the author.
56 OLD_VER=$(shell perl -e '<>;<>;while(<>){last if /^ --/};<>;$$_=<>;print m/\((.*?)\)/'<debian/changelog)
57 dist:
58         dpkg-buildpackage -rfakeroot -tc
59         if [ `hostname` = 'kite' ] ; then \
60                 cp ../debhelper_$(VERSION).tar.gz ../../public; \
61                 rm /home/ftp/pub/code/debhelper/* || true; \
62                 cp debian/changelog /home/pub/programs/debhelper/CHANGES; \
63                 echo $(VERSION) > /home/pub/programs/debhelper/LATEST-VERSION-IS; \
64                 cd ..; rm -rf debhelper-$(OLD_VER); \
65                 [ -f ../public/debhelper_$(OLD_VER).tar.gz ] && \
66                 tar zxf ../public/debhelper_$(OLD_VER).tar.gz || \
67                 tar zxf ../outdated/debhelper_$(OLD_VER).tar.gz; \
68                 diff -r -u --new-file debhelper-$(OLD_VER) debhelper-$(VERSION) > \
69                         /home/ftp/pub/code/debhelper/diffs/debhelper-$(VERSION).diff; \
70                 gzip -9f /home/ftp/pub/code/debhelper/diffs/debhelper-$(VERSION).diff; \
71                 cd /tmp; rm -f debhelper-$(OLD-VER); \
72         fi
73
74 binary: binary-indep binary-arch
75 .PHONY: build clean binary-indep binary-arch binary localdist