1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
|
#!/usr/bin/make -f
# -*- makefile -*-
# debian/rules file for the Debian/GNU Linux mirror package
# Copyright 1995-98 by Dirk Eddelbuettel <edd@debian.org>
package = mirror
debcwd := $(shell pwd)
debdir := $(debcwd)/debian/tmp/
debdoc := $(debdir)/usr/doc/$(package)
deblib := $(debdir)/usr/lib/$(package)
# export DH_VERBOSE=1
build: build-stamp
build-stamp:
dh_testdir
# nothing to be made here -$(MAKE)
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp
# no target clean in makefile -$(MAKE) -i clean
dh_clean debian/imc_ls-lR.tar.gz
binary-indep: build
# dh_testversion
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
#
install -p -m 0755 mirror.pl $(deblib)
install -p -m 0644 {dateconv.pl,ftp.pl,lchat.pl,lsparse.pl} \
$(deblib)
(cd $(debdir)/usr/bin; ln -s ../lib/mirror/mirror.pl mirror)
install -p -m 0755 mm.pl $(debdir)/usr/bin/mirror-master
install -p -m 0755 pkgs_to_mmin.pl $(debdir)/usr/bin/pkgs_to_mmin
install -p -m 0755 do_unlinks.pl $(debdir)/usr/bin/do_unlinks
install -p -m 0755 debian/debian-mirrors \
$(debdir)/usr/bin/.
install -p -m 0644 mirror.man $(debdir)/usr/man/man1/mirror.1
install -p -m 0644 mm.man \
$(debdir)/usr/man/man1/mirror-master.1
install -p -m 0644 debian/debian-mirrors.1 \
$(debdir)/usr/man/man1/.
#
install -p -m 0644 debian/mirror.defaults $(debdir)/etc/mirror/.
install -p -m 0644 debian/example.packages \
$(debdir)/etc/mirror/packages/ftp.debian.org
install -p -m 0644 debian/example.mm \
$(debdir)/etc/mirror/mm/ftp.debian.org
install -p -m 0644 debian/README.mirrors.txt \
$(debdoc)/.
##
## The ls-lR.patch code from Ian Maclaine-cross
(cd debian; uudecode imc_ls-lR.tar.gz.uue -o imc_ls-lR.tar.gz)
(cd $(debdir); tar xfz $(debcwd)/debian/imc_ls-lR.tar.gz)
chmod -R u+w $(debdir)/usr/lib $(debdir)/usr/doc
## Additional patches
install -p -m 0644 debian/patch-* \
$(debdir)/usr/doc/mirror/applied-patches/
##
dh_installdocs mirror.txt README.txt quickstart.txt \
*.html mirror.defaults
dh_installexamples packages/* support/* mmin \
mirror.nightly mirror-on-dusk.gif
## fix the wrong perl patch
perl -p -i -e 's|/usr/local/bin/perl|/usr/bin/perl|;' \
$(debdir)/usr/bin/do_unlinks
perl -p -i -e 's|/usr/local/bin/perl|/usr/bin/perl|;' \
$(debdoc)/examples/lstest.pl
# dh_installmenu
# dh_installinit
# dh_installcron
# dh_installmanpages
dh_undocumented pkgs_to_mmin.1 do_unlinks.1
dh_installchangelogs CHANGES-since-2.8.txt
dh_strip
dh_compress
dh_fixperms
# dh_suidregister
dh_installdeb
# dh_shlibdeps
dh_gencontrol
# dh_makeshlibs
# dh_md5sums
dh_builddeb
binary-arch: build
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary
|