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 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
|
#!/usr/bin/make -f
# Made with the iad of dh_make, by Craig Small
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
# Also some stuff taken from debmake scripts, by Cristopt Lameter.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export DH_COMPAT=3
DESTDIR = `pwd`/debian/tmp
IVARS = DESTDIR=$(DESTDIR)
BVARS = PREDEFINES='-D_PATH_DHCPD_DB=\"/var/lib/dhcp3/dhcpd.leases\" \
-D_PATH_DHCLIENT_DB=\"/var/lib/dhcp3/dhclient.leases\" \
-D_PATH_DHCLIENT_SCRIPT=\"/etc/dhcp3/dhclient-script\" \
-D_PATH_DHCPD_CONF=\"/etc/dhcp3/dhcpd.conf\" \
-D_PATH_DHCLIENT_CONF=\"/etc/dhcp3/dhclient.conf\"'
patch: patch-stamp
patch-stamp:
dh_testdir
if [ ! -f patch-stamp ]; then /bin/sh debian/scripts/patch-source; fi
touch patch-stamp
unpatch:
dh_testdir
if [ -f patch-stamp ]; then /bin/sh debian/scripts/unpatch-source; fi
rm -f patch-stamp
build: patch-stamp build-stamp
build-stamp:
dh_testdir
./configure
$(MAKE) $(BVARS)
install debian/dhclient-script client/scripts/debian
touch build-stamp
clean: unpatch
dh_testdir
rm -f build-stamp install-stamp
# Add here commands to clean up after the build process.
-$(MAKE) distclean
# Remove leftover junk...
rm -Rf work.linux-2.2/
dh_clean
install: install-stamp
install-stamp: build-stamp
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the package into debian/tmp.
$(MAKE) install $(IVARS)
mkdir -p $(DESTDIR)/etc/dhcp3
mv $(DESTDIR)/etc/dhclient-script $(DESTDIR)/etc/dhcp3
# Install dhcp's conffile.
install -m 644 debian/dhcpd.conf $(DESTDIR)/etc/dhcp3
# Install dhcp-client's conffiles.
install -m 644 debian/dhclient.conf $(DESTDIR)/etc/dhcp3
# install the udeb binary
install -m 755 $(DESTDIR)/sbin/dhclient \
`pwd`/debian/dhcp3-client-udeb/sbin/
# udeb needs the os-specific script too
cp `pwd`/debian/tmp/etc/dhcp3/dhclient-script \
`pwd`/debian/dhcp3-client-udeb/etc/dhcp3
# Rename binaries so they do not conflict with the binaries in the
# v2 packages.
for f in /usr/sbin/dhcpd /usr/sbin/dhcrelay /sbin/dhclient; do \
mv $(DESTDIR)$$f $(DESTDIR)$${f}3; \
done
# Rename man page so the have the same name as the binaries.
for f in dhcpd dhcrelay dhclient; do \
mv $(DESTDIR)/usr/share/man/man8/$$f.8 \
$(DESTDIR)/usr/share/man/man8/$${f}3.8; \
done
# Create symlink so we don't break ifupdown
ln -s /sbin/dhclient3 $(DESTDIR)/sbin/dhclient
cp debian/debug-enter debian/dhcp3-client/etc/dhcp3/dhclient-enter-hooks.d/debug
cp debian/debug-exit debian/dhcp3-client/etc/dhcp3/dhclient-exit-hooks.d/debug
dh_movefiles
# Remove unwanted directories that dh_movefiles leaves around
rmdir $(DESTDIR)/sbin/
rmdir $(DESTDIR)/usr/lib/
rm -Rf $(DESTDIR)/usr/include/
touch install-stamp
UDEBPACKAGE=dhcp3-client-udeb
VERSION=$(shell dpkg-parsechangelog | grep ^Version:.* | cut -d ' ' -f 2)
ARCH=$(shell dpkg --print-architecture)
UDEBFILENAME=$(UDEBPACKAGE)_$(VERSION)_$(ARCH).udeb
PRIORITY=$(shell grep ^Priority: debian/control | cut -d ' ' -f 2)
# Build architecture-dependent files here (this package does not contain
# architecture-independent files).
binary-arch: build install
# dh_testversion
dh_testdir -a
dh_testroot -a
dh_installdebconf
dh_installdocs -a -A --no-package=dhcp3-client-udeb debian/README.Debian
dh_installexamples -a
# dh_installmenu -a
# dh_installemacsen -a
dh_installinit -a -n
# dh_installcron -a
# dh_installmanpages -a
# dh_undocumented
dh_installchangelogs -a --no-package=dhcp3-client-udeb
dh_strip -a
dh_compress -a
dh_fixperms -a
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a --no-package=dhcp3-client-udeb
# Don't write your stupid guesses to debian/files.
dh_gencontrol --package=dhcp3-client-udeb -- -fdebian/files~
# Register file manually.
dpkg-distaddfile $(UDEBFILENAME) debian-installer $(PRIORITY)
# dh_makeshlibs -a
dh_md5sums -a --no-package=dhcp3-client-udeb
dh_builddeb -a --no-package=dhcp3-client-udeb
dh_builddeb --package=dhcp3-client-udeb --filename=$(UDEBFILENAME)
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
binary: binary-arch
.PHONY: build clean binary-indep binary-arch binary
|