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 Kelley | a24c31e | 2017-04-16 22:45:53 +0100 | [diff] [blame] | 14 | dpkg_buildflags := DEB_BUILD_MAINT_OPTIONS="hardening=+all,+pie,+bindnow" dpkg-buildflags |
Simon Ruderich | 91f4a5e | 2014-05-20 20:27:31 +0100 | [diff] [blame] | 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 | 43cdf1c | 2017-05-21 22:12:44 +0100 | [diff] [blame] | 51 | ifeq (,$(filter noidn, $(DEB_BUILD_OPTIONS))) |
| 52 | DEB_COPTS += -DHAVE_IDN |
| 53 | endif |
| 54 | |
Simon Kelley | 6277978 | 2012-02-10 21:19:25 +0000 | [diff] [blame] | 55 | ifeq (,$(filter noconntrack,$(DEB_BUILD_OPTIONS))) |
Simon Kelley | 6ac3bc0 | 2014-10-03 08:48:11 +0100 | [diff] [blame] | 56 | ifeq ($(DEB_HOST_ARCH_OS),linux) |
Simon Kelley | 8f6213c | 2014-01-28 11:16:49 +0000 | [diff] [blame] | 57 | DEB_COPTS += -DHAVE_CONNTRACK |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 58 | endif |
| 59 | endif |
| 60 | |
Simon Kelley | 3ddad24 | 2013-03-21 17:56:06 +0000 | [diff] [blame] | 61 | ifneq (,$(filter noipset,$(DEB_BUILD_OPTIONS))) |
Simon Kelley | 8f6213c | 2014-01-28 11:16:49 +0000 | [diff] [blame] | 62 | DEB_COPTS += -DNO_IPSET |
Simon Kelley | 3b323bd | 2013-02-22 21:55:29 +0000 | [diff] [blame] | 63 | endif |
| 64 | |
Simon Kelley | 96c3879 | 2012-02-16 20:07:17 +0000 | [diff] [blame] | 65 | ifneq (,$(filter nodhcp6,$(DEB_BUILD_OPTIONS))) |
Simon Kelley | 8f6213c | 2014-01-28 11:16:49 +0000 | [diff] [blame] | 66 | DEB_COPTS += -DNO_DHCP6 |
Simon Kelley | 127ea40 | 2012-02-11 22:14:52 +0000 | [diff] [blame] | 67 | endif |
| 68 | |
Simon Kelley | 6277978 | 2012-02-10 21:19:25 +0000 | [diff] [blame] | 69 | ifneq (,$(filter noipv6,$(DEB_BUILD_OPTIONS))) |
Simon Kelley | 8f6213c | 2014-01-28 11:16:49 +0000 | [diff] [blame] | 70 | DEB_COPTS += -DNO_IPV6 |
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 notftp,$(DEB_BUILD_OPTIONS))) |
Simon Kelley | 8f6213c | 2014-01-28 11:16:49 +0000 | [diff] [blame] | 74 | DEB_COPTS += -DNO_TFTP |
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 nodhcp,$(DEB_BUILD_OPTIONS))) |
Simon Kelley | 8f6213c | 2014-01-28 11:16:49 +0000 | [diff] [blame] | 78 | DEB_COPTS += -DNO_DHCP |
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 noscript,$(DEB_BUILD_OPTIONS))) |
Simon Kelley | 8f6213c | 2014-01-28 11:16:49 +0000 | [diff] [blame] | 82 | DEB_COPTS += -DNO_SCRIPT |
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 nortc,$(DEB_BUILD_OPTIONS))) |
Simon Kelley | 8f6213c | 2014-01-28 11:16:49 +0000 | [diff] [blame] | 86 | DEB_COPTS += -DHAVE_BROKEN_RTC |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 87 | endif |
| 88 | |
Simon Kelley | 6277978 | 2012-02-10 21:19:25 +0000 | [diff] [blame] | 89 | ifneq (,$(filter noi18n,$(DEB_BUILD_OPTIONS))) |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 90 | TARGET = install |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 91 | endif |
| 92 | |
Simon Kelley | 6277978 | 2012-02-10 21:19:25 +0000 | [diff] [blame] | 93 | ifneq (,$(filter uselua,$(DEB_BUILD_OPTIONS))) |
Simon Kelley | 8f6213c | 2014-01-28 11:16:49 +0000 | [diff] [blame] | 94 | DEB_COPTS += -DHAVE_LUASCRIPT |
Simon Kelley | 6277978 | 2012-02-10 21:19:25 +0000 | [diff] [blame] | 95 | endif |
| 96 | |
Simon Kelley | 160f650 | 2014-02-04 16:49:41 +0000 | [diff] [blame] | 97 | ifeq (,$(filter nodnssec,$(DEB_BUILD_OPTIONS))) |
Simon Kelley | 8f6213c | 2014-01-28 11:16:49 +0000 | [diff] [blame] | 98 | DEB_COPTS += -DHAVE_DNSSEC |
Simon Kelley | 00ec693 | 2014-01-28 11:08:57 +0000 | [diff] [blame] | 99 | endif |
| 100 | |
Simon Kelley | 6ac3bc0 | 2014-10-03 08:48:11 +0100 | [diff] [blame] | 101 | ifneq ($(DEB_HOST_ARCH_OS),linux) |
| 102 | # For strlcpy in FreeBSD |
| 103 | LDFLAGS += -lbsd |
| 104 | endif |
| 105 | |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 106 | clean: |
| 107 | $(checkdir) |
| 108 | rm -rf debian/daemon debian/base debian/utils debian/*~ debian/files debian/substvars debian/utils-substvars |
| 109 | make clean |
Simon Kelley | c6cdf6b | 2016-05-03 21:14:14 +0100 | [diff] [blame] | 110 | make -C contrib/lease-tools clean |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 111 | |
| 112 | binary-indep: checkroot |
| 113 | $(checkdir) |
| 114 | rm -rf debian/daemon |
| 115 | install -m 755 \ |
| 116 | -d debian/daemon/DEBIAN \ |
| 117 | -d debian/daemon/usr/share/doc \ |
| 118 | -d debian/daemon/etc/init.d \ |
| 119 | -d debian/daemon/etc/dnsmasq.d \ |
| 120 | -d debian/daemon/etc/resolvconf/update.d \ |
| 121 | -d debian/daemon/usr/lib/resolvconf/dpkg-event.d \ |
Simon Kelley | 9bb3998 | 2016-07-16 22:06:01 +0100 | [diff] [blame] | 122 | -d debian/daemon/usr/share/dnsmasq \ |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 123 | -d debian/daemon/etc/default \ |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 124 | -d debian/daemon/lib/systemd/system \ |
| 125 | -d debian/daemon/etc/insserv.conf.d |
| 126 | install -m 644 debian/conffiles debian/daemon/DEBIAN |
| 127 | install -m 755 debian/postinst debian/postrm debian/prerm debian/daemon/DEBIAN |
| 128 | install -m 755 debian/init debian/daemon/etc/init.d/dnsmasq |
| 129 | install -m 755 debian/resolvconf debian/daemon/etc/resolvconf/update.d/dnsmasq |
| 130 | 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] | 131 | install -m 644 debian/installed-marker debian/daemon/usr/share/dnsmasq |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 132 | install -m 644 debian/default debian/daemon/etc/default/dnsmasq |
| 133 | install -m 644 dnsmasq.conf.example debian/daemon/etc/dnsmasq.conf |
| 134 | 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] | 135 | install -m 644 debian/systemd.service debian/daemon/lib/systemd/system/dnsmasq.service |
| 136 | install -m 644 debian/insserv debian/daemon/etc/insserv.conf.d/dnsmasq |
| 137 | ln -s $(package) debian/daemon/usr/share/doc/dnsmasq |
Simon Kelley | 24e9207 | 2015-06-04 22:32:43 +0100 | [diff] [blame] | 138 | 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] | 139 | dpkg-gencontrol $(PACKAGE_VERSION) -T -pdnsmasq -Pdebian/daemon |
Simon Kelley | 24e9207 | 2015-06-04 22:32:43 +0100 | [diff] [blame] | 140 | 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] | 141 | chown -R root.root debian/daemon |
| 142 | chmod -R g-ws debian/daemon |
| 143 | dpkg --build debian/daemon .. |
| 144 | |
| 145 | binary-arch: checkroot |
| 146 | $(checkdir) |
| 147 | rm -rf debian/base |
| 148 | install -m 755 \ |
| 149 | -d debian/base/DEBIAN \ |
Simon Kelley | 4ba9b38 | 2012-07-29 17:07:48 +0100 | [diff] [blame] | 150 | -d debian/base/etc/dbus-1/system.d \ |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 151 | -d debian/base/usr/share/doc/$(package) \ |
| 152 | -d debian/base/usr/share/doc/$(package)/examples \ |
Simon Kelley | da4f372 | 2014-02-06 15:21:37 +0000 | [diff] [blame] | 153 | -d debian/base/usr/share/$(package) \ |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 154 | -d debian/base/var/lib/misc |
Simon Kelley | c6af3a3 | 2016-08-31 22:38:48 +0100 | [diff] [blame] | 155 | 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] | 156 | ifeq (,$(findstring nodocs,$(DEB_BUILD_OPTIONS))) |
Simon Kelley | 933878f | 2014-09-09 14:28:01 +0100 | [diff] [blame] | 157 | # Need to remove paypal links in Debian Package for policy reasons. |
| 158 | sed -e /\<H2\>Donations/Q -e /icon.png/d doc.html -e /favicon.ico/d >debian/base/usr/share/doc/$(package)/doc.html |
| 159 | echo "</BODY>" >>debian/base/usr/share/doc/$(package)/doc.html |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 160 | install -m 644 setup.html debian/base/usr/share/doc/$(package)/. |
| 161 | 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] | 162 | install -m 644 trust-anchors.conf debian/base/usr/share/$(package)/. |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 163 | install -m 644 FAQ debian/base/usr/share/doc/$(package)/. |
Chris Lamb | b467a45 | 2015-02-09 11:52:30 +0000 | [diff] [blame] | 164 | gzip -9n debian/base/usr/share/doc/$(package)/FAQ |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 165 | install -m 644 CHANGELOG debian/base/usr/share/doc/$(package)/changelog |
Chris Lamb | b467a45 | 2015-02-09 11:52:30 +0000 | [diff] [blame] | 166 | gzip -9n debian/base/usr/share/doc/$(package)/changelog |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 167 | 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] | 168 | gzip -9n debian/base/usr/share/doc/$(package)/changelog.archive |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 169 | install -m 644 dbus/DBus-interface debian/base/usr/share/doc/$(package)/. |
Chris Lamb | b467a45 | 2015-02-09 11:52:30 +0000 | [diff] [blame] | 170 | gzip -9n debian/base/usr/share/doc/$(package)/DBus-interface |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 171 | endif |
Simon Kelley | 4ba9b38 | 2012-07-29 17:07:48 +0100 | [diff] [blame] | 172 | install -m 644 debian/dnsmasq-base.conffiles debian/base/DEBIAN/conffiles |
Simon Kelley | bc54ae3 | 2012-08-28 21:26:56 +0100 | [diff] [blame] | 173 | install -m 755 debian/dnsmasq-base.postinst debian/base/DEBIAN/postinst |
| 174 | install -m 755 debian/dnsmasq-base.postrm debian/base/DEBIAN/postrm |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 175 | 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] | 176 | gzip -9n debian/base/usr/share/doc/$(package)/changelog.Debian |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 177 | install -m 644 debian/readme debian/base/usr/share/doc/$(package)/README.Debian |
| 178 | install -m 644 debian/copyright debian/base/usr/share/doc/$(package)/copyright |
Simon Kelley | 4ba9b38 | 2012-07-29 17:07:48 +0100 | [diff] [blame] | 179 | 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] | 180 | gzip -9n debian/base/usr/share/man/man8/dnsmasq.8 |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 181 | for f in debian/base/usr/share/man/*; do \ |
| 182 | if [ -f $$f/man8/dnsmasq.8 ]; then \ |
Chris Lamb | b467a45 | 2015-02-09 11:52:30 +0000 | [diff] [blame] | 183 | gzip -9n $$f/man8/dnsmasq.8 ; \ |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 184 | fi \ |
| 185 | done |
| 186 | ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) |
Simon Kelley | c6af3a3 | 2016-08-31 22:38:48 +0100 | [diff] [blame] | 187 | $(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] | 188 | endif |
Simon Kelley | 24e9207 | 2015-06-04 22:32:43 +0100 | [diff] [blame] | 189 | 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] | 190 | dpkg-shlibdeps --warnings=1 debian/base/usr/sbin/dnsmasq |
Simon Kelley | 02ed24d | 2013-09-09 18:06:45 +0100 | [diff] [blame] | 191 | dpkg-gencontrol $(PACKAGE_VERSION) -pdnsmasq-base -Pdebian/base |
Simon Kelley | 24e9207 | 2015-06-04 22:32:43 +0100 | [diff] [blame] | 192 | 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] | 193 | chown -R root.root debian/base |
| 194 | chmod -R g-ws debian/base |
| 195 | dpkg --build debian/base .. |
| 196 | |
Simon Kelley | 6ac3bc0 | 2014-10-03 08:48:11 +0100 | [diff] [blame] | 197 | ifeq ($(DEB_HOST_ARCH_OS),linux) |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 198 | rm -rf debian/utils |
| 199 | install -m 755 -d debian/utils/DEBIAN \ |
| 200 | -d debian/utils/usr/share/man/man1 \ |
| 201 | -d debian/utils/usr/bin \ |
| 202 | -d debian/utils/usr/share/doc/dnsmasq-utils |
Simon Kelley | c6af3a3 | 2016-08-31 22:38:48 +0100 | [diff] [blame] | 203 | 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] | 204 | install -m 755 contrib/lease-tools/dhcp_release debian/utils/usr/bin/dhcp_release |
| 205 | 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] | 206 | gzip -9n debian/utils/usr/share/man/man1/dhcp_release.1 |
Simon Kelley | 69cbf78 | 2016-05-03 21:33:38 +0100 | [diff] [blame] | 207 | install -m 755 contrib/lease-tools/dhcp_release6 debian/utils/usr/bin/dhcp_release6 |
| 208 | install -m 644 contrib/lease-tools/dhcp_release6.1 debian/utils/usr/share/man/man1/dhcp_release6.1 |
| 209 | gzip -9n debian/utils/usr/share/man/man1/dhcp_release6.1 |
Simon Kelley | c6cdf6b | 2016-05-03 21:14:14 +0100 | [diff] [blame] | 210 | install -m 755 contrib/lease-tools/dhcp_lease_time debian/utils/usr/bin/dhcp_lease_time |
| 211 | 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] | 212 | install -m 644 debian/copyright debian/utils/usr/share/doc/dnsmasq-utils/copyright |
| 213 | 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] | 214 | gzip -9n debian/utils/usr/share/doc/dnsmasq-utils/changelog.Debian |
| 215 | gzip -9n debian/utils/usr/share/man/man1/dhcp_lease_time.1 |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 216 | ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) |
Simon Kelley | c6af3a3 | 2016-08-31 22:38:48 +0100 | [diff] [blame] | 217 | $(DEB_HOST_GNU_TYPE)-strip -R .note -R .comment debian/utils/usr/bin/dhcp_release |
Simon Kelley | b1cefa5 | 2017-04-11 15:55:26 +0100 | [diff] [blame] | 218 | $(DEB_HOST_GNU_TYPE)-strip -R .note -R .comment debian/utils/usr/bin/dhcp_release6 |
Simon Kelley | c6af3a3 | 2016-08-31 22:38:48 +0100 | [diff] [blame] | 219 | $(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] | 220 | endif |
Simon Kelley | 24e9207 | 2015-06-04 22:32:43 +0100 | [diff] [blame] | 221 | 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] | 222 | 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] | 223 | dpkg-gencontrol $(PACKAGE_VERSION) -Tdebian/utils-substvars -pdnsmasq-utils -Pdebian/utils |
Simon Kelley | 24e9207 | 2015-06-04 22:32:43 +0100 | [diff] [blame] | 224 | 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] | 225 | chown -R root.root debian/utils |
| 226 | chmod -R g-ws debian/utils |
| 227 | dpkg --build debian/utils .. |
| 228 | endif |
| 229 | |
| 230 | define checkdir |
| 231 | test -f Makefile -a -f debian/rules |
| 232 | endef |
| 233 | |
| 234 | # Below here is fairly generic really |
| 235 | |
| 236 | binary: binary-arch binary-indep |
Simon Kelley | 760169f | 2012-03-09 14:27:49 +0000 | [diff] [blame] | 237 | |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 238 | build: |
Simon Kelley | 760169f | 2012-03-09 14:27:49 +0000 | [diff] [blame] | 239 | build-arch: |
| 240 | build-indep: |
Simon Kelley | c72daea | 2012-01-05 21:33:27 +0000 | [diff] [blame] | 241 | |
| 242 | checkroot: |
| 243 | test root = "`whoami`" |
| 244 | |
| 245 | .PHONY: binary binary-arch binary-indep clean checkroot |
| 246 | |
| 247 | |