| 1 |
#!/usr/bin/make -f |
| 2 |
# Sample debian/rules that uses debhelper. |
| 3 |
# GNU copyright 1997 to 1999 by Joey Hess. |
| 4 |
|
| 5 |
# Uncomment this to turn on verbose mode. |
| 6 |
#export DH_VERBOSE=1 |
| 7 |
|
| 8 |
ifndef PERL |
| 9 |
PERL = /usr/bin/perl |
| 10 |
endif |
| 11 |
|
| 12 |
TMP := $(shell pwd)/debian/lib#PACKAGE# |
| 13 |
archlib := $(shell $(PERL) -MConfig -e 'print $$Config{installarchlib}') |
| 14 |
|
| 15 |
config =INSTALLDIRS=perl INSTALLMAN1DIR=$(TMP)/usr/share/man/man1 INSTALLMAN3DIR=$(TMP)/usr/share/man/man3 INSTALLPRIVLIB=$(TMP)/usr/lib/perl5 INSTALLARCHLIB=$(TMP)$(archlib) INSTALLBIN=$(TMP)/usr/bin INSTALLSCRIPT=$(TMP)/usr/bin |
| 16 |
|
| 17 |
build: build-stamp |
| 18 |
build-stamp: |
| 19 |
dh_testdir |
| 20 |
|
| 21 |
# Add here commands to compile the package. |
| 22 |
$(PERL) Makefile.PL INSTALLDIRS=vendor |
| 23 |
$(MAKE) OPTIMIZE="-O2 -g -Wall" |
| 24 |
|
| 25 |
touch build-stamp |
| 26 |
|
| 27 |
clean: |
| 28 |
dh_testdir |
| 29 |
dh_testroot |
| 30 |
rm -f build-stamp |
| 31 |
|
| 32 |
# Add here commands to clean up after the build process. |
| 33 |
-#CLEAN# |
| 34 |
|
| 35 |
dh_clean |
| 36 |
|
| 37 |
install: build |
| 38 |
dh_testdir |
| 39 |
dh_testroot |
| 40 |
dh_clean -k |
| 41 |
dh_installdirs |
| 42 |
|
| 43 |
# Module::Build clause |
| 44 |
if [ -f Build.PL ] ; then \ |
| 45 |
$(PERL) Build.PL destdir=$(TMP); \ |
| 46 |
$(PERL) Build install destdir=$(TMP); \ |
| 47 |
else \ |
| 48 |
$(MAKE) install PREFIX=$(TMP)/usr; \ |
| 49 |
fi |
| 50 |
|
| 51 |
# Remove empty directory chain |
| 52 |
if [ -d $(TMP)/usr/lib/perl5 ]; then \ |
| 53 |
rmdir --ignore-fail-on-non-empty --parents $(TMP)/usr/lib/perl5; \ |
| 54 |
fi |
| 55 |
|
| 56 |
# Build architecture-independent files here. |
| 57 |
binary-indep: build install |
| 58 |
# We have nothing to do by default. |
| 59 |
|
| 60 |
# Build architecture-dependent files here. |
| 61 |
binary-arch: build install |
| 62 |
# dh_testversion |
| 63 |
dh_testdir |
| 64 |
dh_testroot |
| 65 |
# dh_installdebconf |
| 66 |
dh_installdocs |
| 67 |
dh_installexamples |
| 68 |
dh_installmenu |
| 69 |
# dh_installemacsen |
| 70 |
# dh_installpam |
| 71 |
# dh_installinit |
| 72 |
dh_installcron |
| 73 |
dh_installman |
| 74 |
dh_installinfo |
| 75 |
# dh_undocumented |
| 76 |
dh_installchangelogs #CHANGELOGS# |
| 77 |
dh_link |
| 78 |
dh_strip |
| 79 |
dh_compress |
| 80 |
dh_fixperms |
| 81 |
# dh_makeshlibs |
| 82 |
dh_installdeb |
| 83 |
dh_perl |
| 84 |
dh_shlibdeps |
| 85 |
dh_gencontrol |
| 86 |
dh_md5sums |
| 87 |
dh_builddeb |
| 88 |
|
| 89 |
binary: binary-indep binary-arch |
| 90 |
.PHONY: build clean binary-indep binary-arch binary install |