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
|
#!/usr/bin/make -f
SHELL = /bin/sh
ifndef PERL
PERL = /usr/bin/perl
endif
TMP = `pwd`/debian/`dh_listpackages`
package = eperl
build: build-stamp
build-stamp:
dh_testdir
# File etc/shtool comes from a patch and must be set executable
chmod a+x etc/shtool
./configure --prefix=/usr
# Remove unneded library flags
perl -pi -e 's/ -l\S*db\S*//g' Makefile config.status config_sc.h
$(MAKE)
#$(MAKE) test
mv Makefile Makefile.stand-alone
$(PERL) Makefile.PL INSTALLDIRS=vendor
$(MAKE) OPTIMIZE="-O2 -g -Wall" LD_RUN_PATH=
#$(MAKE) test
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp
ifeq (Makefile,$(wildcard Makefile))
$(MAKE) distclean
endif
rm -f Makefile.stand-alone
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs usr/share/perl5
# Install eperl binary
$(MAKE) -f Makefile.stand-alone install prefix=$(TMP)/usr
# ... and perl modules
$(MAKE) install PREFIX=$(TMP)/usr
# ... and move Apache/ePerl.pm
mv $(TMP)/usr/lib/perl5/Apache $(TMP)/usr/share/perl5/
find $(TMP) -type d -empty | xargs -r rmdir -p --ignore-fail-on-non-empty
rm -rf $(TMP)/usr/lib/eperl
# Build architecture-independent files here.
binary-indep: build
# There are no architecture-independent files to be uploaded
# generated by this package. If there were any they would be
# made here.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installdocs ANNOUNCE CREDITS KNOWN.BUGS NEWS PORTING \
README VERSIONS ChangeLog.* contrib/utils/
dh_installexamples eg/*
dh_installchangelogs ChangeLog
# Do not provide this link for security reason, see README.Debian
#dh_link usr/bin/eperl usr/lib/cgi-bin/nph-eperl
ifeq "$(findstring nostrip,$(DEB_BUILD_OPTIONS))" ""
dh_strip
endif
dh_compress
dh_fixperms
dh_installdeb
dh_perl
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
|