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 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
|
#!/usr/bin/make -f
############################ -*- Mode: Makefile -*- ###########################
## rules ---
## Author : Manoj Srivastava ( srivasta@tiamat.datasync.com )
## Created On : Wed Jan 29 15:59:58 1997
## Created On Node : tiamat.datasync.com
## Last Modified By : Manoj Srivastava
## Last Modified On : Fri Feb 27 16:30:44 1998
## Last Machine Used: tiamat.datasync.com
## Update Count : 36
## Status : Unknown, Use with caution!
## HISTORY :
## Description :
##
###############################################################################
FILES_TO_CLEAN = debian/files debian/buildinfo debian/substvars t/Order
STAMPS_TO_CLEAN = stamp-configure stamp-build stamp-binary Order
DIRS_TO_CLEAN = debian/tmp
thisdir=$(shell pwd)
install_file= install -p -o root -g root -m 644
install_program= install -p -o root -g root -m 755
make_directory= install -p -d -o root -g root -m 755
deb_rule = $(MAKE) -f $(thisdir)/debian/rules
package = $(shell grep Source debian/control | sed 's/^Source: //')
version = $(shell perl -n0777e 'if ($$. == 1 && m/\(([\S]+)\)/o){print "$$1\n";}' debian/changelog)
PRIVLIB := $(shell perl -e 'use Config; print "$$Config{'privlibexp'}\n";')
ARCHLIB := $(shell perl -e 'use Config; print "$$Config{'archlibexp'}\n";')
DOCDIR := debian/tmp/usr/doc/$(package)
all build: configure stamp-build
stamp-build:
# Builds the binary package.
$(checkdir)
-test ! -f stamp-configure && \
$(MAKE) -f debian/rules configure
$(MAKE)
# $(MAKE) test
dpkg -l perl 'libc*' make dpkg-dev | \
awk '$$1 == "ii" { printf("%s-%s\n", $$2, $$3) }' > \
debian/buildinfo
touch stamp-build
configure: stamp-configure Makefile
Makefile stamp-configure:
$(checkdir)
echo "$$""VERSION = '$(version)';" > patchlevel
echo "1;" >> patchlevel
-test ! -f stamp-configure && \
perl Makefile.PL && touch stamp-configure
clean:
# Undoes the effect of `make -f debian/rules build'.
$(checkdir)
rm -f $(FILES_TO_CLEAN) $(STAMPS_TO_CLEAN)
rm -rf $(DIRS_TO_CLEAN)
-test -f Makefile && $(MAKE) realclean
rm -f core `find . \( -name '*.orig' -o -name '*.rej' -o \
-name '*~' -o -name '*.bak' -o -name '#*#' -o \
-name '.*.orig' -o -name '.*.rej' -o -name '.SUMS' -o \
-size 0 \) -print` TAGS
binary: binary-arch binary-indep
binary-arch: build
binary-indep: build stamp-binary
stamp-binary:
# Makes a binary package.
test root = "`whoami`" || (echo need root priviledges; exit 1)
$(checkdir)
test -f stamp-build || $(deb_rule) build
rm -rf debian/tmp
$(make_directory) debian/tmp
chmod g-s debian/tmp
$(make_directory) debian/tmp/DEBIAN
$(make_directory) debian/tmp/$(PRIVLIB)
$(make_directory) debian/tmp/$(ARCHLIB)
$(make_directory) debian/tmp/usr/bin
$(make_directory) debian/tmp/usr/man/man1
$(make_directory) debian/tmp/usr/man/man3
$(make_directory) $(DOCDIR)
$(install_file) debian/changelog $(DOCDIR)/changelog
$(install_file) README $(DOCDIR)
$(install_file) Requirements $(DOCDIR)
$(install_file) Class_Hierarchy $(DOCDIR)
$(install_file) debian/buildinfo $(DOCDIR)/buildinfo.Debian
-gzip -9qfr $(DOCDIR)/
# Make sure the copyright file is not compressed
$(install_file) debian/copyright $(DOCDIR)/copyright
$(MAKE) PREFIX=$(thisdir)/debian/tmp/usr \
INSTALLDIRS=perl \
INSTALLMAN1DIR=$(thisdir)/debian/tmp/usr/man/man1 \
INSTALLMAN3DIR=$(thisdir)/debian/tmp/usr/man/man3 \
pure_install
-rm -rf debian/tmp/usr/lib/perl5/i386-linux
-gzip -9qfr debian/tmp/usr/man/
dpkg-gencontrol
chmod -R u+w debian/tmp/usr/
chown -R root.root debian/tmp/
dpkg-deb --build debian/tmp ..
touch stamp-binary
define checkdir
test -f Debian/Package/Package.pm -a -f debian/rules
endef
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
.PHONY: binary binary-arch binary-indep clean
|