| 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 |
# This is the debhelper compatability version to use. |
| 9 |
#export DH_COMPAT=1 |
| 10 |
|
| 11 |
ifndef PERL |
| 12 |
PERL = /usr/bin/perl |
| 13 |
endif |
| 14 |
|
| 15 |
VERSION=`dpkg-parsechangelog | grep '^Version: ' | sed -e "s/^Version: //g"` |
| 16 |
#TMP =`pwd`/debian/tmp |
| 17 |
archlib =`$(PERL) -MConfig -e 'print $$Config{installarchlib}'` |
| 18 |
|
| 19 |
build: build-arch build-indep |
| 20 |
build-arch: build-stamp |
| 21 |
build-indep: build-stamp |
| 22 |
build-stamp: |
| 23 |
dh_testdir |
| 24 |
|
| 25 |
# Add here commands to compile the package. |
| 26 |
sed -e "s/@VERSION@/${VERSION}/g" \ |
| 27 |
apt-show-source.in > apt-show-source |
| 28 |
$(PERL) Makefile.PL INSTALLDIRS=vendor |
| 29 |
$(MAKE) OPTIMIZE="-O2 -g -Wall" |
| 30 |
|
| 31 |
touch build-stamp |
| 32 |
|
| 33 |
clean: |
| 34 |
dh_testdir |
| 35 |
dh_testroot |
| 36 |
rm -f build-stamp |
| 37 |
|
| 38 |
# Add here commands to clean up after the build process. |
| 39 |
rm -f apt-show-source.1 apt-show-source.fr.1 \ |
| 40 |
apt-show-source.es.1 apt-show-source.ja.1 \ |
| 41 |
apt-show-source |
| 42 |
dh_clean |
| 43 |
[ ! -f Makefile ] || $(MAKE) distclean |
| 44 |
|
| 45 |
install: build |
| 46 |
dh_testdir |
| 47 |
dh_testroot |
| 48 |
dh_prep |
| 49 |
dh_installdirs |
| 50 |
|
| 51 |
# Add here commands to install the package into debian/tmp. |
| 52 |
if grep ^install_vendor Makefile; then \ |
| 53 |
$(MAKE) install DESTDIR=$(CURDIR)/debian/apt-show-source; \ |
| 54 |
else \ |
| 55 |
$(MAKE) pure_install DESTDIR=$(CURDIR)/debian/apt-show-source; \ |
| 56 |
fi |
| 57 |
|
| 58 |
# Build architecture-dependent files here. |
| 59 |
binary-arch: |
| 60 |
# We have nothing to do by default. |
| 61 |
|
| 62 |
# Build architecture-independent files here. |
| 63 |
binary-indep: build install |
| 64 |
# dh_testversion |
| 65 |
dh_testdir |
| 66 |
dh_testroot |
| 67 |
# dh_installdebconf |
| 68 |
dh_installdocs TODO |
| 69 |
# dh_installexamples |
| 70 |
# dh_installmenu |
| 71 |
# dh_installemacsen |
| 72 |
# dh_installpam |
| 73 |
# dh_installinit |
| 74 |
# dh_installcron |
| 75 |
dh_installman apt-show-source.1 apt-show-source.es.1 apt-show-source.fr.1 apt-show-source.ja.1 |
| 76 |
# dh_installinfo |
| 77 |
dh_installchangelogs Changes |
| 78 |
# dh_link |
| 79 |
# dh_strip |
| 80 |
dh_compress |
| 81 |
dh_fixperms |
| 82 |
# You may want to make some executables suid here. |
| 83 |
# dh_suidregister |
| 84 |
# dh_makeshlibs |
| 85 |
dh_installdeb |
| 86 |
dh_perl |
| 87 |
# dh_shlibdeps |
| 88 |
dh_gencontrol |
| 89 |
dh_md5sums |
| 90 |
dh_builddeb |
| 91 |
|
| 92 |
binary: binary-indep binary-arch |
| 93 |
.PHONY: build clean binary-indep binary-arch binary install |