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 85 86 87 88 89 90 91 92 93 94
|
#!/usr/bin/make -f
# -*- makefile -*-
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.
export LC_ALL=C
package=plan
debdir=$(shell pwd)/debian
patchdir=${debdir}/patches
tmpdir=${debdir}/tmp
libdir=${tmpdir}/usr/lib/plan
_MANDIR=usr/share/man
mandir=${tmpdir}/${_MANDIR}
configure: configure-stamp
configure-stamp:
dh_testdir
cd src && ./configure 4
touch configure-stamp
build: build-stamp
build-stamp: configure-stamp
dh_testdir
make -C src DEBUG="-O2 -g -Wall"
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp src/Makefile.back
make -C src clean
dh_clean
PATCHES=$(shell cd ${debdir}/patches && /bin/ls *.diff)
RPATCHES=$(shell cd ${debdir}/patches && /bin/ls *.diff | tac)
check:
dh_testdir
for i in ${PATCHES} ; do echo $$i: ; patch --dry-run -p1 <${patchdir}/$$i ; done
patch:
dh_testdir
for i in ${PATCHES} ; do patch -p1 <${patchdir}/$$i ; done
unpatch:
dh_testdir
for i in ${RPATCHES} ; do patch -R -p1 <${patchdir}/$$i ; done
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.
binary-arch: build
dh_testdir
dh_testroot
dh_clean
dh_installdirs
make -C src install DESTDIR=${tmpdir}
dh_link ${_MANDIR}/man1/plan.1.gz ${_MANDIR}/man1/pland.1.gz \
usr/lib/plan/pland /usr/bin/pland
# FHS
mkdir -p ${tmpdir}/usr/lib/plan ${tmpdir}/var/lib/plan/netplan.dir ${tmpdir}/etc/plan
dh_link etc/plan/holiday usr/lib/plan/holiday \
etc/plan/netplan-acl var/lib/plan/netplan.dir/.netplan-acl
mkdir -p ${debdir}/netplan/etc/plan
dh_movefiles
cd ${tmpdir} && rmdir usr/sbin usr/share/man/man8
cd ${tmpdir} && rmdir -p var/lib/plan/netplan.dir
dh_installdocs
dh_installexamples
dh_installmenu
dh_installinit
dh_installchangelogs HISTORY
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
# Below here is fairly generic really
binary: binary-indep binary-arch
.PHONY: binary binary-arch binary-indep clean
|