| 1 |
#!/usr/bin/make -f |
| 2 |
# Sample debian/rules that uses debhelper. |
| 3 |
# GNU copyright 1997 by Joey Hess. |
| 4 |
# |
| 5 |
# This version is for a hypothetical package that builds an |
| 6 |
# architecture-dependant package, as well as an architecture-independent |
| 7 |
# package. |
| 8 |
|
| 9 |
# Uncomment this to turn on verbose mode. |
| 10 |
#export DH_VERBOSE=1 |
| 11 |
|
| 12 |
# This has to be exported to make some magic below work. |
| 13 |
# export DH_OPTIONS |
| 14 |
|
| 15 |
# see /usr/share/doc/autotools-dev/README.Debian.gz |
| 16 |
export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) |
| 17 |
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) |
| 18 |
|
| 19 |
# FOR AUTOCONF 2.52 AND NEWER ONLY |
| 20 |
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) |
| 21 |
confflags += --build $(DEB_HOST_GNU_TYPE) |
| 22 |
else |
| 23 |
confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) |
| 24 |
endif |
| 25 |
|
| 26 |
package = lifelines |
| 27 |
docdir = $(tmp)/usr/share/doc/$(package) |
| 28 |
export DESTDIR = $(shell pwd)/debian/$(package) |
| 29 |
|
| 30 |
configure: configure-stamp |
| 31 |
|
| 32 |
configure-stamp: |
| 33 |
# The 3.0.28-1 impossible to build from sources. |
| 34 |
# This autogen.sh script is probably wrong. |
| 35 |
# debian/autogen.sh |
| 36 |
|
| 37 |
cd build/autotools && \ |
| 38 |
cp -vf /usr/share/misc/config.sub /usr/share/misc/config.guess . && \ |
| 39 |
chmod u+x config.sub config.guess |
| 40 |
|
| 41 |
dh_testdir |
| 42 |
./configure $(confflags) \ |
| 43 |
--prefix=/usr \ |
| 44 |
--mandir=\$${prefix}/share/man \ |
| 45 |
--infodir=\$${prefix}/share/info |
| 46 |
touch configure-stamp |
| 47 |
|
| 48 |
clean: |
| 49 |
dh_testdir |
| 50 |
dh_testroot |
| 51 |
-rm -f build-stamp configure-stamp |
| 52 |
# Add here commands to clean up after the build process. |
| 53 |
[ ! -f Makefile ] || $(MAKE) distclean |
| 54 |
rm -f po/*.gmo |
| 55 |
rm -f config.h config.cache config.status config.log stamp-config \ |
| 56 |
build/autotools/config.sub \ |
| 57 |
build/autotools/config.guess |
| 58 |
cd docs && rm -f ll-userguide.tex ll-userguide.aux ll-userguide.log ll-userguide.out |
| 59 |
rm -f $(CURDIR)/linesrc |
| 60 |
dh_clean |
| 61 |
|
| 62 |
build: build-arch build-indep |
| 63 |
build-arch: build-stamp |
| 64 |
build-indep: build-stamp |
| 65 |
build-stamp: configure-stamp |
| 66 |
dh_testdir |
| 67 |
# Add here commands to compile the package. |
| 68 |
$(MAKE) |
| 69 |
touch build-stamp |
| 70 |
|
| 71 |
install:: DH_OPTIONS= |
| 72 |
install:: build |
| 73 |
dh_testdir |
| 74 |
dh_testroot |
| 75 |
dh_prep |
| 76 |
dh_installdirs -A |
| 77 |
# Add here commands to install the package into debian/tmp. |
| 78 |
$(MAKE) install DESTDIR=$(DESTDIR) |
| 79 |
mv $(DESTDIR)/usr/bin/llines $(DESTDIR)/usr/lib/lifelines |
| 80 |
# We don't want doc files to be installed by make. Bug #194321 |
| 81 |
rm $(DESTDIR)/usr/share/lifelines/ll-reportmanual.html || true |
| 82 |
rm $(DESTDIR)/usr/share/lifelines/ll-reportmanual-sv.html || true |
| 83 |
rm $(DESTDIR)/usr/share/lifelines/ll-reportmanual.pdf || true |
| 84 |
rm $(DESTDIR)/usr/share/lifelines/ll-reportmanual.txt || true |
| 85 |
rm $(DESTDIR)/usr/share/lifelines/ll-userguide.html || true |
| 86 |
rm $(DESTDIR)/usr/share/lifelines/ll-userguide-sv.html || true |
| 87 |
rm $(DESTDIR)/usr/share/lifelines/ll-userguide.pdf || true |
| 88 |
rm $(DESTDIR)/usr/share/lifelines/ll-userguide.txt || true |
| 89 |
rm $(DESTDIR)/usr/share/doc/lifelines/ll-reportmanual.html || true |
| 90 |
rm $(DESTDIR)/usr/share/doc/lifelines/ll-reportmanual-sv.html || true |
| 91 |
rm $(DESTDIR)/usr/share/doc/lifelines/ll-reportmanual.pdf || true |
| 92 |
rm $(DESTDIR)/usr/share/doc/lifelines/ll-reportmanual.txt || true |
| 93 |
rm $(DESTDIR)/usr/share/doc/lifelines/ll-userguide.html || true |
| 94 |
rm $(DESTDIR)/usr/share/doc/lifelines/ll-userguide-sv.html || true |
| 95 |
rm $(DESTDIR)/usr/share/doc/lifelines/ll-userguide.pdf || true |
| 96 |
rm $(DESTDIR)/usr/share/doc/lifelines/ll-userguide.txt || true |
| 97 |
rm $(DESTDIR)/usr/share/doc/lifelines/*.1 || true |
| 98 |
# For Bug #293063 |
| 99 |
rm -rf $(DESTDIR)/usr/share/lifelines || true |
| 100 |
cp $(CURDIR)/debian/add-ons/llines $(DESTDIR)/usr/bin/llines |
| 101 |
chmod 755 $(DESTDIR)/usr/bin/llines |
| 102 |
cp -r reports/* `pwd`/debian/lifelines-reports/usr/share/lifelines |
| 103 |
rm -f `pwd`/debian/lifelines-reports/usr/share/lifelines/gen_index || true |
| 104 |
find `pwd`/debian/lifelines-reports/usr/share/lifelines/* -type f | xargs chmod 644 |
| 105 |
find `pwd`/debian/lifelines-reports/usr/share/lifelines/* -type d | xargs chmod 755 |
| 106 |
cp $(CURDIR)/.linesrc $(CURDIR)/linesrc |
| 107 |
|
| 108 |
# Icon for menus |
| 109 |
cp $(CURDIR)/debian/lifelines.xpm $(DESTDIR)/usr/share/pixmaps/lifelines.xpm |
| 110 |
|
| 111 |
|
| 112 |
# Build architecture-independent files here. |
| 113 |
# Pass -i to all debhelper commands in this target to reduce clutter. |
| 114 |
binary-indep:: DH_OPTIONS=-i |
| 115 |
binary-indep:: build install |
| 116 |
# Need this version of debhelper for DH_OPTIONS to work. |
| 117 |
dh_testdir |
| 118 |
dh_testroot |
| 119 |
dh_installdocs |
| 120 |
dh_installexamples |
| 121 |
dh_installmenu |
| 122 |
dh_installcron |
| 123 |
dh_installman |
| 124 |
dh_installinfo |
| 125 |
dh_installchangelogs ChangeLog |
| 126 |
dh_link |
| 127 |
dh_compress |
| 128 |
dh_fixperms |
| 129 |
# You may want to make some executables suid here. |
| 130 |
dh_installdeb |
| 131 |
dh_gencontrol |
| 132 |
dh_md5sums |
| 133 |
dh_builddeb |
| 134 |
|
| 135 |
# Build architecture-dependent files here. |
| 136 |
# Pass -a to all debhelper commands in this target to reduce clutter. |
| 137 |
binary-arch:: DH_OPTIONS=-a |
| 138 |
binary-arch:: build install |
| 139 |
dh_testdir |
| 140 |
dh_testroot |
| 141 |
dh_installdocs |
| 142 |
dh_installexamples |
| 143 |
dh_installmenu |
| 144 |
dh_installcron |
| 145 |
dh_installman |
| 146 |
dh_installinfo |
| 147 |
dh_installchangelogs ChangeLog |
| 148 |
dh_strip |
| 149 |
dh_link |
| 150 |
dh_compress |
| 151 |
dh_fixperms |
| 152 |
dh_installdeb |
| 153 |
dh_shlibdeps |
| 154 |
dh_gencontrol |
| 155 |
dh_md5sums |
| 156 |
dh_builddeb |
| 157 |
|
| 158 |
binary: binary-indep binary-arch |
| 159 |
.PHONY: autotools build clean binary-indep binary-arch binary install |
| 160 |
|
| 161 |
export DH_OPTIONS |