Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 1 | #!/usr/bin/make -f |
| 2 | # debian/rules file - for dnsmasq. |
| 3 | # Copyright 2001-2011 by Simon Kelley |
| 4 | # Based on the sample in the debian hello package which carries the following: |
| 5 | # Copyright 1994,1995 by Ian Jackson. |
| 6 | # I hereby give you perpetual unlimited permission to copy, |
| 7 | # modify and relicense this file, provided that you do not remove |
| 8 | # my name from the file itself. (I assert my moral right of |
| 9 | # paternity under the Copyright, Designs and Patents Act 1988.) |
| 10 | # This file may have to be extensively modified |
| 11 | |
| 12 | package=dnsmasq-base |
| 13 | |
Simon Ruderich | 91f4a5e | 2014-05-20 20:27:31 +0100 | [diff] [blame] | 14 | dpkg_buildflags := DEB_BUILD_MAINT_OPTIONS="hardening=+all" dpkg-buildflags |
| 15 | |
| 16 | CFLAGS = $(shell $(dpkg_buildflags) --get CFLAGS) |
| 17 | CFLAGS += $(shell $(dpkg_buildflags) --get CPPFLAGS) |
Simon Kelley | 97c83bb | 2012-05-28 18:21:59 +0100 | [diff] [blame] | 18 | CFLAGS += -Wall -W |
| 19 | |
Simon Ruderich | 91f4a5e | 2014-05-20 20:27:31 +0100 | [diff] [blame] | 20 | LDFLAGS = $(shell $(dpkg_buildflags) --get LDFLAGS) |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 21 | |
Simon Kelley | 8f6213c | 2014-01-28 11:16:49 +0000 | [diff] [blame] | 22 | DEB_COPTS = $(COPTS) |
Simon Kelley | 97c83bb | 2012-05-28 18:21:59 +0100 | [diff] [blame] | 23 | |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 24 | TARGET = install-i18n |
| 25 | |
Simon Kelley | 6ac3bc0 | 2014-10-03 08:48:11 +0100 | [diff] [blame] | 26 | DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS) |
Simon Kelley | c6af3a3 | 2016-08-31 22:38:48 +0100 | [diff] [blame] | 27 | DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) |
| 28 | DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) |
Simon Kelley | 24e9207 | 2015-06-04 22:32:43 +0100 | [diff] [blame] | 29 | BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date) |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 30 | |
Simon Kelley | c6af3a3 | 2016-08-31 22:38:48 +0100 | [diff] [blame] | 31 | ifeq ($(origin CC),default) |
| 32 | CC = $(DEB_HOST_GNU_TYPE)-gcc |
| 33 | endif |
| 34 | |
| 35 | # Support non-cross-builds on systems without gnu-triplet-binaries for pkg-config. |
| 36 | ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) |
| 37 | PKG_CONFIG=pkg-config |
| 38 | else |
| 39 | PKG_CONFIG=$(DEB_HOST_GNU_TYPE)-pkg-config |
| 40 | endif |
| 41 | |
Simon Kelley | 02ed24d | 2013-09-09 18:06:45 +0100 | [diff] [blame] | 42 | # Force package version based on git tags. |
| 43 | ifneq (,$(filter gitversion,$(DEB_BUILD_OPTIONS))) |
Simon Kelley | 1d1c795 | 2013-10-02 14:52:23 +0100 | [diff] [blame] | 44 | PACKAGE_VERSION = $(shell bld/get-version `pwd` | sed 's/test/~&/; s/[a-z]/~&/; s/-/./g; s/$$/-1/; s/^/-v/';) |
Simon Kelley | 02ed24d | 2013-09-09 18:06:45 +0100 | [diff] [blame] | 45 | endif |
| 46 | |
Simon Kelley | 6277978 | 2012-02-10 21:19:25 +0000 | [diff] [blame] | 47 | ifeq (,$(filter nodbus,$(DEB_BUILD_OPTIONS))) |
Simon Kelley | 8f6213c | 2014-01-28 11:16:49 +0000 | [diff] [blame] | 48 | DEB_COPTS += -DHAVE_DBUS |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 49 | endif |
| 50 | |
Simon Kelley | 6277978 | 2012-02-10 21:19:25 +0000 | [diff] [blame] | 51 | ifeq (,$(filter noconntrack,$(DEB_BUILD_OPTIONS))) |
Simon Kelley | 6ac3bc0 | 2014-10-03 08:48:11 +0100 | [diff] [blame] | 52 | ifeq ($(DEB_HOST_ARCH_OS),linux) |
Simon Kelley | 8f6213c | 2014-01-28 11:16:49 +0000 | [diff] [blame] | 53 | DEB_COPTS += -DHAVE_CONNTRACK |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 54 | endif |
| 55 | endif |
| 56 | |
Simon Kelley | 3ddad24 | 2013-03-21 17:56:06 +0000 | [diff] [blame] | 57 | ifneq (,$(filter noipset,$(DEB_BUILD_OPTIONS))) |
Simon Kelley | 8f6213c | 2014-01-28 11:16:49 +0000 | [diff] [blame] | 58 | DEB_COPTS += -DNO_IPSET |
Simon Kelley | 3b323bd | 2013-02-22 21:55:29 +0000 | [diff] [blame] | 59 | endif |
| 60 | |
Simon Kelley | 96c3879 | 2012-02-16 20:07:17 +0000 | [diff] [blame] | 61 | ifneq (,$(filter nodhcp6,$(DEB_BUILD_OPTIONS))) |
Simon Kelley | 8f6213c | 2014-01-28 11:16:49 +0000 | [diff] [blame] | 62 | DEB_COPTS += -DNO_DHCP6 |
Simon Kelley | 127ea40 | 2012-02-11 22:14:52 +0000 | [diff] [blame] | 63 | endif |
| 64 | |
Simon Kelley | 6277978 | 2012-02-10 21:19:25 +0000 | [diff] [blame] | 65 | ifneq (,$(filter noipv6,$(DEB_BUILD_OPTIONS))) |
Simon Kelley | 8f6213c | 2014-01-28 11:16:49 +0000 | [diff] [blame] | 66 | DEB_COPTS += -DNO_IPV6 |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 67 | endif |
| 68 | |
Simon Kelley | 6277978 | 2012-02-10 21:19:25 +0000 | [diff] [blame] | 69 | ifneq (,$(filter notftp,$(DEB_BUILD_OPTIONS))) |
Simon Kelley | 8f6213c | 2014-01-28 11:16:49 +0000 | [diff] [blame] | 70 | DEB_COPTS += -DNO_TFTP |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 71 | endif |
| 72 | |
Simon Kelley | 6277978 | 2012-02-10 21:19:25 +0000 | [diff] [blame] | 73 | ifneq (,$(filter nodhcp,$(DEB_BUILD_OPTIONS))) |
Simon Kelley | 8f6213c | 2014-01-28 11:16:49 +0000 | [diff] [blame] | 74 | DEB_COPTS += -DNO_DHCP |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 75 | endif |
| 76 | |
Simon Kelley | 6277978 | 2012-02-10 21:19:25 +0000 | [diff] [blame] | 77 | ifneq (,$(filter noscript,$(DEB_BUILD_OPTIONS))) |
Simon Kelley | 8f6213c | 2014-01-28 11:16:49 +0000 | [diff] [blame] | 78 | DEB_COPTS += -DNO_SCRIPT |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 79 | endif |
| 80 | |
Simon Kelley | 6277978 | 2012-02-10 21:19:25 +0000 | [diff] [blame] | 81 | ifneq (,$(filter nortc,$(DEB_BUILD_OPTIONS))) |
Simon Kelley | 8f6213c | 2014-01-28 11:16:49 +0000 | [diff] [blame] | 82 | DEB_COPTS += -DHAVE_BROKEN_RTC |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 83 | endif |
| 84 | |
Simon Kelley | 6277978 | 2012-02-10 21:19:25 +0000 | [diff] [blame] | 85 | ifneq (,$(filter noi18n,$(DEB_BUILD_OPTIONS))) |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 86 | TARGET = install |
Simon Kelley | 6277978 | 2012-02-10 21:19:25 +0000 | [diff] [blame] | 87 | ifeq (,$(filter noidn, $(DEB_BUILD_OPTIONS))) |
Simon Kelley | 8f6213c | 2014-01-28 11:16:49 +0000 | [diff] [blame] | 88 | DEB_COPTS += -DHAVE_IDN |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 89 | endif |
| 90 | endif |
| 91 | |
Simon Kelley | 6277978 | 2012-02-10 21:19:25 +0000 | [diff] [blame] | 92 | ifneq (,$(filter uselua,$(DEB_BUILD_OPTIONS))) |
Simon Kelley | 8f6213c | 2014-01-28 11:16:49 +0000 | [diff] [blame] | 93 | DEB_COPTS += -DHAVE_LUASCRIPT |
Simon Kelley | 6277978 | 2012-02-10 21:19:25 +0000 | [diff] [blame] | 94 | endif |
| 95 | |
Simon Kelley | 160f650 | 2014-02-04 16:49:41 +0000 | [diff] [blame] | 96 | ifeq (,$(filter nodnssec,$(DEB_BUILD_OPTIONS))) |
Simon Kelley | 8f6213c | 2014-01-28 11:16:49 +0000 | [diff] [blame] | 97 | DEB_COPTS += -DHAVE_DNSSEC |
Simon Kelley | 00ec693 | 2014-01-28 11:08:57 +0000 | [diff] [blame] | 98 | endif |
| 99 | |
Simon Kelley | 6ac3bc0 | 2014-10-03 08:48:11 +0100 | [diff] [blame] | 100 | ifneq ($(DEB_HOST_ARCH_OS),linux) |
| 101 | # For strlcpy in FreeBSD |
| 102 | LDFLAGS += -lbsd |
| 103 | endif |
| 104 | |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 105 | clean: |
| 106 | $(checkdir) |
| 107 | rm -rf debian/daemon debian/base debian/utils debian/*~ debian/files debian/substvars debian/utils-substvars |
| 108 | make clean |
Simon Kelley | c6cdf6b | 2016-05-03 21:14:14 +0100 | [diff] [blame] | 109 | make -C contrib/lease-tools clean |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 110 | |
| 111 | binary-indep: checkroot |
| 112 | $(checkdir) |
| 113 | rm -rf debian/daemon |
| 114 | install -m 755 \ |
| 115 | -d debian/daemon/DEBIAN \ |
| 116 | -d debian/daemon/usr/share/doc \ |
| 117 | -d debian/daemon/etc/init.d \ |
| 118 | -d debian/daemon/etc/dnsmasq.d \ |
| 119 | -d debian/daemon/etc/resolvconf/update.d \ |
| 120 | -d debian/daemon/usr/lib/resolvconf/dpkg-event.d \ |
Simon Kelley | 9bb3998 | 2016-07-16 22:06:01 +0100 | [diff] [blame] | 121 | -d debian/daemon/usr/share/dnsmasq \ |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 122 | -d debian/daemon/etc/default \ |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 123 | -d debian/daemon/lib/systemd/system \ |
| 124 | -d debian/daemon/etc/insserv.conf.d |
| 125 | install -m 644 debian/conffiles debian/daemon/DEBIAN |
| 126 | install -m 755 debian/postinst debian/postrm debian/prerm debian/daemon/DEBIAN |
| 127 | install -m 755 debian/init debian/daemon/etc/init.d/dnsmasq |
| 128 | install -m 755 debian/resolvconf debian/daemon/etc/resolvconf/update.d/dnsmasq |
| 129 | install -m 755 debian/resolvconf-package debian/daemon/usr/lib/resolvconf/dpkg-event.d/dnsmasq |
Simon Kelley | 9bb3998 | 2016-07-16 22:06:01 +0100 | [diff] [blame] | 130 | install -m 644 debian/installed-marker debian/daemon/usr/share/dnsmasq |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 131 | install -m 644 debian/default debian/daemon/etc/default/dnsmasq |
| 132 | install -m 644 dnsmasq.conf.example debian/daemon/etc/dnsmasq.conf |
| 133 | install -m 644 debian/readme.dnsmasq.d debian/daemon/etc/dnsmasq.d/README |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 134 | install -m 644 debian/systemd.service debian/daemon/lib/systemd/system/dnsmasq.service |
| 135 | install -m 644 debian/insserv debian/daemon/etc/insserv.conf.d/dnsmasq |
| 136 | ln -s $(package) debian/daemon/usr/share/doc/dnsmasq |
Simon Kelley | 24e9207 | 2015-06-04 22:32:43 +0100 | [diff] [blame] | 137 | cd debian/daemon && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | LC_ALL=C sort -z | xargs -r0 md5sum > DEBIAN/md5sums |
Simon Kelley | aa985be | 2013-09-11 10:28:39 +0100 | [diff] [blame] | 138 | dpkg-gencontrol $(PACKAGE_VERSION) -T -pdnsmasq -Pdebian/daemon |
Simon Kelley | 24e9207 | 2015-06-04 22:32:43 +0100 | [diff] [blame] | 139 | find debian/daemon -depth -newermt '$(BUILD_DATE)' -print0 | xargs -0r touch --no-dereference --date='$(BUILD_DATE)' |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 140 | chown -R root.root debian/daemon |
| 141 | chmod -R g-ws debian/daemon |
| 142 | dpkg --build debian/daemon .. |
| 143 | |
| 144 | binary-arch: checkroot |
| 145 | $(checkdir) |
| 146 | rm -rf debian/base |
| 147 | install -m 755 \ |
| 148 | -d debian/base/DEBIAN \ |
Simon Kelley | 4ba9b38 | 2012-07-29 17:07:48 +0100 | [diff] [blame] | 149 | -d debian/base/etc/dbus-1/system.d \ |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 150 | -d debian/base/usr/share/doc/$(package) \ |
| 151 | -d debian/base/usr/share/doc/$(package)/examples \ |
Simon Kelley | da4f372 | 2014-02-06 15:21:37 +0000 | [diff] [blame] | 152 | -d debian/base/usr/share/$(package) \ |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 153 | -d debian/base/var/lib/misc |
Simon Kelley | c6af3a3 | 2016-08-31 22:38:48 +0100 | [diff] [blame] | 154 | make $(TARGET) PREFIX=/usr DESTDIR=`pwd`/debian/base CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" COPTS="$(DEB_COPTS)" CC=$(CC) PKG_CONFIG=$(PKG_CONFIG) |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 155 | ifeq (,$(findstring nodocs,$(DEB_BUILD_OPTIONS))) |
Simon Kelley | 933878f | 2014-09-09 14:28:01 +0100 | [diff] [blame] | 156 | # Need to remove paypal links in Debian Package for policy reasons. |
| 157 | sed -e /\<H2\>Donations/Q -e /icon.png/d doc.html -e /favicon.ico/d >debian/base/usr/share/doc/$(package)/doc.html |
| 158 | echo "</BODY>" >>debian/base/usr/share/doc/$(package)/doc.html |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 159 | install -m 644 setup.html debian/base/usr/share/doc/$(package)/. |
| 160 | install -m 644 dnsmasq.conf.example debian/base/usr/share/doc/$(package)/examples/. |
Simon Kelley | da4f372 | 2014-02-06 15:21:37 +0000 | [diff] [blame] | 161 | install -m 644 trust-anchors.conf debian/base/usr/share/$(package)/. |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 162 | install -m 644 FAQ debian/base/usr/share/doc/$(package)/. |
Chris Lamb | b467a45 | 2015-02-09 11:52:30 +0000 | [diff] [blame] | 163 | gzip -9n debian/base/usr/share/doc/$(package)/FAQ |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 164 | install -m 644 CHANGELOG debian/base/usr/share/doc/$(package)/changelog |
Chris Lamb | b467a45 | 2015-02-09 11:52:30 +0000 | [diff] [blame] | 165 | gzip -9n debian/base/usr/share/doc/$(package)/changelog |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 166 | install -m 644 CHANGELOG.archive debian/base/usr/share/doc/$(package)/changelog.archive |
Chris Lamb | b467a45 | 2015-02-09 11:52:30 +0000 | [diff] [blame] | 167 | gzip -9n debian/base/usr/share/doc/$(package)/changelog.archive |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 168 | install -m 644 dbus/DBus-interface debian/base/usr/share/doc/$(package)/. |
Chris Lamb | b467a45 | 2015-02-09 11:52:30 +0000 | [diff] [blame] | 169 | gzip -9n debian/base/usr/share/doc/$(package)/DBus-interface |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 170 | endif |
Simon Kelley | 4ba9b38 | 2012-07-29 17:07:48 +0100 | [diff] [blame] | 171 | install -m 644 debian/dnsmasq-base.conffiles debian/base/DEBIAN/conffiles |
Simon Kelley | bc54ae3 | 2012-08-28 21:26:56 +0100 | [diff] [blame] | 172 | install -m 755 debian/dnsmasq-base.postinst debian/base/DEBIAN/postinst |
| 173 | install -m 755 debian/dnsmasq-base.postrm debian/base/DEBIAN/postrm |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 174 | install -m 644 debian/changelog debian/base/usr/share/doc/$(package)/changelog.Debian |
Chris Lamb | b467a45 | 2015-02-09 11:52:30 +0000 | [diff] [blame] | 175 | gzip -9n debian/base/usr/share/doc/$(package)/changelog.Debian |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 176 | install -m 644 debian/readme debian/base/usr/share/doc/$(package)/README.Debian |
| 177 | install -m 644 debian/copyright debian/base/usr/share/doc/$(package)/copyright |
Simon Kelley | 4ba9b38 | 2012-07-29 17:07:48 +0100 | [diff] [blame] | 178 | install -m 644 debian/dbus.conf debian/base/etc/dbus-1/system.d/dnsmasq.conf |
Chris Lamb | b467a45 | 2015-02-09 11:52:30 +0000 | [diff] [blame] | 179 | gzip -9n debian/base/usr/share/man/man8/dnsmasq.8 |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 180 | for f in debian/base/usr/share/man/*; do \ |
| 181 | if [ -f $$f/man8/dnsmasq.8 ]; then \ |
Chris Lamb | b467a45 | 2015-02-09 11:52:30 +0000 | [diff] [blame] | 182 | gzip -9n $$f/man8/dnsmasq.8 ; \ |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 183 | fi \ |
| 184 | done |
| 185 | ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) |
Simon Kelley | c6af3a3 | 2016-08-31 22:38:48 +0100 | [diff] [blame] | 186 | $(DEB_HOST_GNU_TYPE)-strip -R .note -R .comment debian/base/usr/sbin/dnsmasq |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 187 | endif |
Simon Kelley | 24e9207 | 2015-06-04 22:32:43 +0100 | [diff] [blame] | 188 | cd debian/base && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | LC_ALL=C sort -z | xargs -r0 md5sum > DEBIAN/md5sums |
Simon Kelley | aa985be | 2013-09-11 10:28:39 +0100 | [diff] [blame] | 189 | dpkg-shlibdeps --warnings=1 debian/base/usr/sbin/dnsmasq |
Simon Kelley | 02ed24d | 2013-09-09 18:06:45 +0100 | [diff] [blame] | 190 | dpkg-gencontrol $(PACKAGE_VERSION) -pdnsmasq-base -Pdebian/base |
Simon Kelley | 24e9207 | 2015-06-04 22:32:43 +0100 | [diff] [blame] | 191 | find debian/base -depth -newermt '$(BUILD_DATE)' -print0 | xargs -0r touch --no-dereference --date='$(BUILD_DATE)' |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 192 | chown -R root.root debian/base |
| 193 | chmod -R g-ws debian/base |
| 194 | dpkg --build debian/base .. |
| 195 | |
Simon Kelley | 6ac3bc0 | 2014-10-03 08:48:11 +0100 | [diff] [blame] | 196 | ifeq ($(DEB_HOST_ARCH_OS),linux) |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 197 | rm -rf debian/utils |
| 198 | install -m 755 -d debian/utils/DEBIAN \ |
| 199 | -d debian/utils/usr/share/man/man1 \ |
| 200 | -d debian/utils/usr/bin \ |
| 201 | -d debian/utils/usr/share/doc/dnsmasq-utils |
Simon Kelley | c6af3a3 | 2016-08-31 22:38:48 +0100 | [diff] [blame] | 202 | make -C contrib/lease-tools PREFIX=/usr DESTDIR=`pwd`/debian/utils CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" COPTS="$(DEB_COPTS)" CC=$(CC) PKG_CONFIG=$(PKG_CONFIG) |
Simon Kelley | c6cdf6b | 2016-05-03 21:14:14 +0100 | [diff] [blame] | 203 | install -m 755 contrib/lease-tools/dhcp_release debian/utils/usr/bin/dhcp_release |
| 204 | install -m 644 contrib/lease-tools/dhcp_release.1 debian/utils/usr/share/man/man1/dhcp_release.1 |
Chris Lamb | b467a45 | 2015-02-09 11:52:30 +0000 | [diff] [blame] | 205 | gzip -9n debian/utils/usr/share/man/man1/dhcp_release.1 |
Simon Kelley | 69cbf78 | 2016-05-03 21:33:38 +0100 | [diff] [blame] | 206 | install -m 755 contrib/lease-tools/dhcp_release6 debian/utils/usr/bin/dhcp_release6 |
| 207 | install -m 644 contrib/lease-tools/dhcp_release6.1 debian/utils/usr/share/man/man1/dhcp_release6.1 |
| 208 | gzip -9n debian/utils/usr/share/man/man1/dhcp_release6.1 |
Simon Kelley | c6cdf6b | 2016-05-03 21:14:14 +0100 | [diff] [blame] | 209 | install -m 755 contrib/lease-tools/dhcp_lease_time debian/utils/usr/bin/dhcp_lease_time |
| 210 | install -m 644 contrib/lease-tools/dhcp_lease_time.1 debian/utils/usr/share/man/man1/dhcp_lease_time.1 |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 211 | install -m 644 debian/copyright debian/utils/usr/share/doc/dnsmasq-utils/copyright |
| 212 | install -m 644 debian/changelog debian/utils/usr/share/doc/dnsmasq-utils/changelog.Debian |
Chris Lamb | b467a45 | 2015-02-09 11:52:30 +0000 | [diff] [blame] | 213 | gzip -9n debian/utils/usr/share/doc/dnsmasq-utils/changelog.Debian |
| 214 | gzip -9n debian/utils/usr/share/man/man1/dhcp_lease_time.1 |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 215 | ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) |
Simon Kelley | c6af3a3 | 2016-08-31 22:38:48 +0100 | [diff] [blame] | 216 | $(DEB_HOST_GNU_TYPE)-strip -R .note -R .comment debian/utils/usr/bin/dhcp_release |
| 217 | $(DEB_HOST_GNU_TYPE)-strip -R .note -R .comment debian/utils/usr/bin/dhcp_lease_time |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 218 | endif |
Simon Kelley | 24e9207 | 2015-06-04 22:32:43 +0100 | [diff] [blame] | 219 | cd debian/utils && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | LC_ALL=C sort -z | xargs -r0 md5sum > DEBIAN/md5sums |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 220 | dpkg-shlibdeps -Tdebian/utils-substvars debian/utils/usr/bin/dhcp_release debian/utils/usr/bin/dhcp_lease_time |
Simon Kelley | 02ed24d | 2013-09-09 18:06:45 +0100 | [diff] [blame] | 221 | dpkg-gencontrol $(PACKAGE_VERSION) -Tdebian/utils-substvars -pdnsmasq-utils -Pdebian/utils |
Simon Kelley | 24e9207 | 2015-06-04 22:32:43 +0100 | [diff] [blame] | 222 | find debian/utils -depth -newermt '$(BUILD_DATE)' -print0 | xargs -0r touch --no-dereference --date='$(BUILD_DATE)' |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 223 | chown -R root.root debian/utils |
| 224 | chmod -R g-ws debian/utils |
| 225 | dpkg --build debian/utils .. |
| 226 | endif |
| 227 | |
| 228 | define checkdir |
| 229 | test -f Makefile -a -f debian/rules |
| 230 | endef |
| 231 | |
| 232 | # Below here is fairly generic really |
| 233 | |
| 234 | binary: binary-arch binary-indep |
Simon Kelley | 760169f | 2012-03-09 14:27:49 +0000 | [diff] [blame] | 235 | |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 236 | build: |
Simon Kelley | 760169f | 2012-03-09 14:27:49 +0000 | [diff] [blame] | 237 | build-arch: |
| 238 | build-indep: |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 239 | |
| 240 | checkroot: |
| 241 | test root = "`whoami`" |
| 242 | |
| 243 | .PHONY: binary binary-arch binary-indep clean checkroot |
| 244 | |
| 245 | |