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
|
#!/usr/bin/make -f
# Made with the aid of dh_make, by Craig Small
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
# Some lines taken from debmake, by Cristoph Lameter.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
DEV_DPKG_VERSION := $(shell dpkg -s apache-dev | awk '/Version:/ {print $2}')
DEV_VERSION := $(shell echo $(DEV_DPKG_VERSION) | sed "s/^Version: \(.*\)-.*$$/\1/")
# (From the egcs packaging)
NEXTVERNO := $(shell echo $(DEV_VERSION) | awk -F. '{OFS="."; $$NF = $$NF + 1; print}')
build: build-stamp
build-stamp:
dh_testdir
perl Makefile.PL USE_APXS=1 WITH_APXS=/usr/sbin/apxs \
PERL_SECTIONS=1 PERL_SSI=1 PERL_METHOD_HANDLERS=1 ALL_HOOKS=1 \
PERL_TIE_TABLES=1 PERL_DIRECTIVE_HANDLERS=1 PERL_STACKED_HANDLERS=1 \
PERL_TRACE=0 PERL_LOG_API=1 PERL_URI_API=1 PERL_UTIL_API=1 \
PERL_TABLE_API=1 PERL_FILE_API=1
make
touch build-stamp
debian/control: debian/control.in
sed -e "s/THISDEV/$(DEV_VERSION)/g" -e "s/NEXTDEV/$(NEXTVERNO)/g" \
< debian/control.in > debian/control
clean:
dh_testdir
dh_testroot
rm -f build-stamp
dh_clean
rm -f lib/Apache/MyConfig.pm t/docs/test.shtml \
t/net/config.pl t/net/perl/cgi.pl t/report t/conf/httpd.conf{,.old} \
t/httpd.conf apaci/find_source lib/mod_perl_hooks.pm
find . -name .tmp.\* -exec rm -rf {} \;
([ -f Makefile ] && $(MAKE) distclean) || true
chmod -R u+w .
rm -f debian/control
$(MAKE) -f debian/rules debian/control
# Build architecture-independent files here.
binary-indep: build
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build
dh_testversion
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the files into debian/tmp
$(MAKE) PREFIX=`pwd`/debian/tmp/usr INSTALLMAN3DIR=`pwd`/debian/tmp/usr/man/man3 \
INSTALLMAN1DIR=`pwd`/debian/tmp/usr/man/man1 install_perl
rm -rf debian/tmp/usr/lib/perl5/i386-linux/5.004/auto/mod_perl
rm -f debian/tmp/usr/lib/perl5/i386-linux/5.004/perllocal.pod
mkdir -p debian/tmp/usr/lib/apache/1.3
cp apaci/libperl.so debian/tmp/usr/lib/apache/1.3/mod_perl.so
chmod 644 debian/tmp/usr/lib/apache/1.3/mod_perl.so
cp debian/400mod_perl.info debian/tmp/usr/lib/apache/1.3/400mod_perl.info
dh_installdocs
cp -a eg/ debian/tmp/usr/doc/libapache-mod-perl/examples
(cd debian/tmp/usr/doc/libapache-mod-perl && mv Changes changelog)
dh_installmanpages
dh_installchangelogs
# dh_strip
dh_compress
dh_fixperms
dh_shlibdeps
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
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
|