Commit 30e4a944 authored by Simon Kelley's avatar Simon Kelley

Debian package: add dnsmasq-base-lua binary package.

parent 232a8f35
...@@ -7,9 +7,8 @@ src/.copts_* ...@@ -7,9 +7,8 @@ src/.copts_*
contrib/lease-tools/dhcp_lease_time contrib/lease-tools/dhcp_lease_time
contrib/lease-tools/dhcp_release contrib/lease-tools/dhcp_release
contrib/lease-tools/dhcp_release6 contrib/lease-tools/dhcp_release6
debian/base/
debian/daemon/
debian/files debian/files
debian/substvars debian/substvars
debian/utils-substvars debian/utils-substvars
debian/utils/ debian/trees/
debian/build/
...@@ -4,8 +4,9 @@ dnsmasq (2.79-1) unstable; urgency=low ...@@ -4,8 +4,9 @@ dnsmasq (2.79-1) unstable; urgency=low
* Fix trust-anchor regex in init script. (closes: #884347) * Fix trust-anchor regex in init script. (closes: #884347)
* Fix exit code for dhcp_release6 (closes: #833596) * Fix exit code for dhcp_release6 (closes: #833596)
* Add project homepage to control file. (closes: #887764) * Add project homepage to control file. (closes: #887764)
* New binary package dnsmasq-base-lua, includes Lua support.
-- Simon Kelley <simon@thekelleys.org.uk> Thu, 8 Feb 2018 21:27:22 +0000 -- Simon Kelley <simon@thekelleys.org.uk> Fri, 16 Feb 2018 19:54:22 +0000
dnsmasq (2.78-3) unstable; urgency=high dnsmasq (2.78-3) unstable; urgency=high
......
...@@ -35,6 +35,19 @@ Description: Small caching DNS proxy and DHCP/TFTP server ...@@ -35,6 +35,19 @@ Description: Small caching DNS proxy and DHCP/TFTP server
not the infrastructure required to run it as a system daemon. For not the infrastructure required to run it as a system daemon. For
that, install the dnsmasq package. that, install the dnsmasq package.
Package: dnsmasq-base-lua
Architecture: any
Depends: adduser, ${shlibs:Depends}
Breaks: dnsmasq (<< 2.63-1~)
Replaces: dnsmasq (<< 2.63-1~)
Recommends: dns-root-data
Provides: dnsmasq-base
Description: Small caching DNS proxy and DHCP/TFTP server
This package contains the dnsmasq executable and documentation, but
not the infrastructure required to run it as a system daemon. For
that, install the dnsmasq package. This package is an alternative
to dnsmasq-base which includes the LUA interpreter.
Package: dnsmasq-utils Package: dnsmasq-utils
Architecture: linux-any Architecture: linux-any
Depends: ${shlibs:Depends} Depends: ${shlibs:Depends}
......
#!/usr/bin/make -f #!/usr/bin/make -f
# debian/rules file - for dnsmasq. # debian/rules file - for dnsmasq.
# Copyright 2001-2011 by Simon Kelley # Copyright 2001-2018 by Simon Kelley
# Based on the sample in the debian hello package which carries the following: # Based on the sample in the debian hello package which carries the following:
# Copyright 1994,1995 by Ian Jackson. # Copyright 1994,1995 by Ian Jackson.
# I hereby give you perpetual unlimited permission to copy, # I hereby give you perpetual unlimited permission to copy,
...@@ -103,128 +103,167 @@ ifneq ($(DEB_HOST_ARCH_OS),linux) ...@@ -103,128 +103,167 @@ ifneq ($(DEB_HOST_ARCH_OS),linux)
LDFLAGS += -lbsd LDFLAGS += -lbsd
endif endif
define build_tree
rm -rf $1
install -m 755 \
-d $1/DEBIAN \
-d $1/etc/dbus-1/system.d \
-d $1/usr/share/doc/$(package) \
-d $1/usr/share/doc/$(package)/examples \
-d $1/usr/share/$(package) \
-d $1/var/lib/misc
endef
define add_docs
# Need to remove paypal links in Debian Package for policy reasons.
sed -e /\<H2\>Donations/Q -e /icon.png/d doc.html -e /favicon.ico/d >$1/usr/share/doc/$(package)/doc.html
echo "</BODY>" >>$1/usr/share/doc/$(package)/doc.html
install -m 644 setup.html $1/usr/share/doc/$(package)/.
install -m 644 dnsmasq.conf.example $1/usr/share/doc/$(package)/examples/.
install -m 644 FAQ $1/usr/share/doc/$(package)/.
gzip -9n $1/usr/share/doc/$(package)/FAQ
install -m 644 CHANGELOG $1/usr/share/doc/$(package)/changelog
gzip -9n $1/usr/share/doc/$(package)/changelog
install -m 644 CHANGELOG.archive $1/usr/share/doc/$(package)/changelog.archive
gzip -9n $1/usr/share/doc/$(package)/changelog.archive
install -m 644 dbus/DBus-interface $1/usr/share/doc/$(package)/.
gzip -9n $1/usr/share/doc/$(package)/DBus-interface
gzip -9n $1/usr/share/man/man8/dnsmasq.8
for f in $1/usr/share/man/*; do \
if [ -f $$f/man8/dnsmasq.8 ]; then \
gzip -9n $$f/man8/dnsmasq.8 ; \
fi \
done
endef
define add_files
install -m 644 trust-anchors.conf $1/usr/share/$(package)/.
install -m 644 debian/dnsmasq-base.conffiles $1/DEBIAN/conffiles
install -m 755 debian/dnsmasq-base.postinst $1/DEBIAN/postinst
install -m 755 debian/dnsmasq-base.postrm $1/DEBIAN/postrm
install -m 644 debian/changelog $1/usr/share/doc/$(package)/changelog.Debian
gzip -9n $1/usr/share/doc/$(package)/changelog.Debian
install -m 644 debian/readme $1/usr/share/doc/$(package)/README.Debian
install -m 644 debian/copyright $1/usr/share/doc/$(package)/copyright
install -m 644 debian/dbus.conf $1/etc/dbus-1/system.d/dnsmasq.conf
endef
clean: clean:
$(checkdir) $(checkdir)
rm -rf debian/daemon debian/base debian/utils debian/*~ debian/files debian/substvars debian/utils-substvars make BUILDDIR=debian/build/no-lua clean
make clean make BUILDDIR=debian/build/lua clean
make -C contrib/lease-tools clean make -C contrib/lease-tools clean
rm -rf debian/build debian/trees debian/*~ debian/files debian/substvars debian/utils-substvars
binary-indep: checkroot binary-indep: checkroot
$(checkdir) $(checkdir)
rm -rf debian/daemon rm -rf debian/trees/daemon
install -m 755 \ install -m 755 \
-d debian/daemon/DEBIAN \ -d debian/trees/daemon/DEBIAN \
-d debian/daemon/usr/share/doc \ -d debian/trees/daemon/usr/share/doc \
-d debian/daemon/etc/init.d \ -d debian/trees/daemon/etc/init.d \
-d debian/daemon/etc/dnsmasq.d \ -d debian/trees/daemon/etc/dnsmasq.d \
-d debian/daemon/etc/resolvconf/update.d \ -d debian/trees/daemon/etc/resolvconf/update.d \
-d debian/daemon/usr/lib/resolvconf/dpkg-event.d \ -d debian/trees/daemon/usr/lib/resolvconf/dpkg-event.d \
-d debian/daemon/usr/share/dnsmasq \ -d debian/trees/daemon/usr/share/dnsmasq \
-d debian/daemon/etc/default \ -d debian/trees/daemon/etc/default \
-d debian/daemon/lib/systemd/system \ -d debian/trees/daemon/lib/systemd/system \
-d debian/daemon/etc/insserv.conf.d -d debian/trees/daemon/etc/insserv.conf.d
install -m 644 debian/conffiles debian/daemon/DEBIAN install -m 644 debian/conffiles debian/trees/daemon/DEBIAN
install -m 755 debian/postinst debian/postrm debian/prerm debian/daemon/DEBIAN install -m 755 debian/postinst debian/postrm debian/prerm debian/trees/daemon/DEBIAN
install -m 755 debian/init debian/daemon/etc/init.d/dnsmasq install -m 755 debian/init debian/trees/daemon/etc/init.d/dnsmasq
install -m 755 debian/resolvconf debian/daemon/etc/resolvconf/update.d/dnsmasq install -m 755 debian/resolvconf debian/trees/daemon/etc/resolvconf/update.d/dnsmasq
install -m 755 debian/resolvconf-package debian/daemon/usr/lib/resolvconf/dpkg-event.d/dnsmasq install -m 755 debian/resolvconf-package debian/trees/daemon/usr/lib/resolvconf/dpkg-event.d/dnsmasq
install -m 644 debian/installed-marker debian/daemon/usr/share/dnsmasq install -m 644 debian/installed-marker debian/trees/daemon/usr/share/dnsmasq
install -m 644 debian/default debian/daemon/etc/default/dnsmasq install -m 644 debian/default debian/trees/daemon/etc/default/dnsmasq
install -m 644 dnsmasq.conf.example debian/daemon/etc/dnsmasq.conf install -m 644 dnsmasq.conf.example debian/trees/daemon/etc/dnsmasq.conf
install -m 644 debian/readme.dnsmasq.d debian/daemon/etc/dnsmasq.d/README install -m 644 debian/readme.dnsmasq.d debian/trees/daemon/etc/dnsmasq.d/README
install -m 644 debian/systemd.service debian/daemon/lib/systemd/system/dnsmasq.service install -m 644 debian/systemd.service debian/trees/daemon/lib/systemd/system/dnsmasq.service
install -m 644 debian/insserv debian/daemon/etc/insserv.conf.d/dnsmasq install -m 644 debian/insserv debian/trees/daemon/etc/insserv.conf.d/dnsmasq
ln -s $(package) debian/daemon/usr/share/doc/dnsmasq ln -s $(package) debian/trees/daemon/usr/share/doc/dnsmasq
cd debian/daemon && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | LC_ALL=C sort -z | xargs -r0 md5sum > DEBIAN/md5sums cd debian/trees/daemon && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | LC_ALL=C sort -z | xargs -r0 md5sum > DEBIAN/md5sums
dpkg-gencontrol $(PACKAGE_VERSION) -T -pdnsmasq -Pdebian/daemon dpkg-gencontrol $(PACKAGE_VERSION) -T -pdnsmasq -Pdebian/trees/daemon
find debian/daemon -depth -newermt '$(BUILD_DATE)' -print0 | xargs -0r touch --no-dereference --date='$(BUILD_DATE)' find debian/trees/daemon -depth -newermt '$(BUILD_DATE)' -print0 | xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
chown -R root.root debian/daemon chown -R root.root debian/trees/daemon
chmod -R g-ws debian/daemon chmod -R g-ws debian/trees/daemon
dpkg --build debian/daemon .. dpkg --build debian/trees/daemon ..
binary-arch: checkroot binary-arch: checkroot
$(checkdir) $(call build_tree,debian/trees/base)
rm -rf debian/base make $(TARGET) BUILDDIR=debian/build/no-lua PREFIX=/usr DESTDIR=`pwd`/debian/trees/base CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" COPTS="$(DEB_COPTS)" CC=$(CC) PKG_CONFIG=$(PKG_CONFIG)
install -m 755 \
-d debian/base/DEBIAN \
-d debian/base/etc/dbus-1/system.d \
-d debian/base/usr/share/doc/$(package) \
-d debian/base/usr/share/doc/$(package)/examples \
-d debian/base/usr/share/$(package) \
-d debian/base/var/lib/misc
make $(TARGET) PREFIX=/usr DESTDIR=`pwd`/debian/base CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" COPTS="$(DEB_COPTS)" CC=$(CC) PKG_CONFIG=$(PKG_CONFIG)
ifeq (,$(findstring nodocs,$(DEB_BUILD_OPTIONS))) ifeq (,$(findstring nodocs,$(DEB_BUILD_OPTIONS)))
# Need to remove paypal links in Debian Package for policy reasons. $(call add_docs,debian/trees/base)
sed -e /\<H2\>Donations/Q -e /icon.png/d doc.html -e /favicon.ico/d >debian/base/usr/share/doc/$(package)/doc.html else
echo "</BODY>" >>debian/base/usr/share/doc/$(package)/doc.html rm -rf debian/trees/base/usr/share/man
install -m 644 setup.html debian/base/usr/share/doc/$(package)/. endif
install -m 644 dnsmasq.conf.example debian/base/usr/share/doc/$(package)/examples/. $(call add_files,debian/trees/base)
install -m 644 trust-anchors.conf debian/base/usr/share/$(package)/. ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
install -m 644 FAQ debian/base/usr/share/doc/$(package)/. $(DEB_HOST_GNU_TYPE)-strip -R .note -R .comment debian/trees/base/usr/sbin/dnsmasq
gzip -9n debian/base/usr/share/doc/$(package)/FAQ endif
install -m 644 CHANGELOG debian/base/usr/share/doc/$(package)/changelog cd debian/trees/base && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | LC_ALL=C sort -z | xargs -r0 md5sum > DEBIAN/md5sums
gzip -9n debian/base/usr/share/doc/$(package)/changelog dpkg-shlibdeps --warnings=1 debian/trees/base/usr/sbin/dnsmasq
install -m 644 CHANGELOG.archive debian/base/usr/share/doc/$(package)/changelog.archive dpkg-gencontrol $(PACKAGE_VERSION) -pdnsmasq-base -Pdebian/trees/base
gzip -9n debian/base/usr/share/doc/$(package)/changelog.archive find debian/trees/base -depth -newermt '$(BUILD_DATE)' -print0 | xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
install -m 644 dbus/DBus-interface debian/base/usr/share/doc/$(package)/. chown -R root.root debian/trees/base
gzip -9n debian/base/usr/share/doc/$(package)/DBus-interface chmod -R g-ws debian/trees/base
endif dpkg --build debian/trees/base ..
install -m 644 debian/dnsmasq-base.conffiles debian/base/DEBIAN/conffiles
install -m 755 debian/dnsmasq-base.postinst debian/base/DEBIAN/postinst $(call build_tree,debian/trees/lua-base)
install -m 755 debian/dnsmasq-base.postrm debian/base/DEBIAN/postrm make $(TARGET) BUILDDIR=debian/build/lua PREFIX=/usr DESTDIR=`pwd`/debian/trees/lua-base CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" COPTS="-DHAVE_LUASCRIPT $(DEB_COPTS)" CC=$(CC) PKG_CONFIG=$(PKG_CONFIG)
install -m 644 debian/changelog debian/base/usr/share/doc/$(package)/changelog.Debian ifeq (,$(findstring nodocs,$(DEB_BUILD_OPTIONS)))
gzip -9n debian/base/usr/share/doc/$(package)/changelog.Debian $(call add_docs,debian/trees/lua-base)
install -m 644 debian/readme debian/base/usr/share/doc/$(package)/README.Debian else
install -m 644 debian/copyright debian/base/usr/share/doc/$(package)/copyright rm -rf debian/trees/lua-base/usr/share/man
install -m 644 debian/dbus.conf debian/base/etc/dbus-1/system.d/dnsmasq.conf endif
gzip -9n debian/base/usr/share/man/man8/dnsmasq.8 $(call add_files,debian/trees/lua-base)
for f in debian/base/usr/share/man/*; do \
if [ -f $$f/man8/dnsmasq.8 ]; then \
gzip -9n $$f/man8/dnsmasq.8 ; \
fi \
done
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
$(DEB_HOST_GNU_TYPE)-strip -R .note -R .comment debian/base/usr/sbin/dnsmasq $(DEB_HOST_GNU_TYPE)-strip -R .note -R .comment debian/trees/lua-base/usr/sbin/dnsmasq
endif endif
cd debian/base && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | LC_ALL=C sort -z | xargs -r0 md5sum > DEBIAN/md5sums cd debian/trees/lua-base && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | LC_ALL=C sort -z | xargs -r0 md5sum > DEBIAN/md5sums
dpkg-shlibdeps --warnings=1 debian/base/usr/sbin/dnsmasq dpkg-shlibdeps --warnings=1 debian/trees/lua-base/usr/sbin/dnsmasq
dpkg-gencontrol $(PACKAGE_VERSION) -pdnsmasq-base -Pdebian/base dpkg-gencontrol $(PACKAGE_VERSION) -pdnsmasq-base-lua -Pdebian/trees/lua-base
find debian/base -depth -newermt '$(BUILD_DATE)' -print0 | xargs -0r touch --no-dereference --date='$(BUILD_DATE)' find debian/trees/lua-base -depth -newermt '$(BUILD_DATE)' -print0 | xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
chown -R root.root debian/base chown -R root.root debian/trees/lua-base
chmod -R g-ws debian/base chmod -R g-ws debian/trees/lua-base
dpkg --build debian/base .. dpkg --build debian/trees/lua-base ..
ifeq ($(DEB_HOST_ARCH_OS),linux) ifeq ($(DEB_HOST_ARCH_OS),linux)
rm -rf debian/utils rm -rf debian/trees/utils
install -m 755 -d debian/utils/DEBIAN \ install -m 755 -d debian/trees/utils/DEBIAN \
-d debian/utils/usr/share/man/man1 \ -d debian/trees/utils/usr/bin \
-d debian/utils/usr/bin \ -d debian/trees/utils/usr/share/doc/dnsmasq-utils
-d debian/utils/usr/share/doc/dnsmasq-utils ifeq (,$(findstring nodocs,$(DEB_BUILD_OPTIONS)))
make -C contrib/lease-tools PREFIX=/usr DESTDIR=`pwd`/debian/utils CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" COPTS="$(DEB_COPTS)" CC=$(CC) PKG_CONFIG=$(PKG_CONFIG) install -m 755 -d debian/trees/utils/usr/share/man/man1
install -m 755 contrib/lease-tools/dhcp_release debian/utils/usr/bin/dhcp_release endif
install -m 644 contrib/lease-tools/dhcp_release.1 debian/utils/usr/share/man/man1/dhcp_release.1 make -C contrib/lease-tools PREFIX=/usr DESTDIR=`pwd`/debian/trees/utils CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" COPTS="$(DEB_COPTS)" CC=$(CC) PKG_CONFIG=$(PKG_CONFIG)
gzip -9n debian/utils/usr/share/man/man1/dhcp_release.1 install -m 755 contrib/lease-tools/dhcp_release debian/trees/utils/usr/bin/dhcp_release
install -m 755 contrib/lease-tools/dhcp_release6 debian/utils/usr/bin/dhcp_release6 install -m 755 contrib/lease-tools/dhcp_release6 debian/trees/utils/usr/bin/dhcp_release6
install -m 644 contrib/lease-tools/dhcp_release6.1 debian/utils/usr/share/man/man1/dhcp_release6.1 install -m 755 contrib/lease-tools/dhcp_lease_time debian/trees/utils/usr/bin/dhcp_lease_time
gzip -9n debian/utils/usr/share/man/man1/dhcp_release6.1 ifeq (,$(findstring nodocs,$(DEB_BUILD_OPTIONS)))
install -m 755 contrib/lease-tools/dhcp_lease_time debian/utils/usr/bin/dhcp_lease_time install -m 644 contrib/lease-tools/dhcp_release.1 debian/trees/utils/usr/share/man/man1/dhcp_release.1
install -m 644 contrib/lease-tools/dhcp_lease_time.1 debian/utils/usr/share/man/man1/dhcp_lease_time.1 gzip -9n debian/trees/utils/usr/share/man/man1/dhcp_release.1
install -m 644 debian/copyright debian/utils/usr/share/doc/dnsmasq-utils/copyright install -m 644 contrib/lease-tools/dhcp_release6.1 debian/trees/utils/usr/share/man/man1/dhcp_release6.1
install -m 644 debian/changelog debian/utils/usr/share/doc/dnsmasq-utils/changelog.Debian gzip -9n debian/trees/utils/usr/share/man/man1/dhcp_release6.1
gzip -9n debian/utils/usr/share/doc/dnsmasq-utils/changelog.Debian install -m 644 contrib/lease-tools/dhcp_lease_time.1 debian/trees/utils/usr/share/man/man1/dhcp_lease_time.1
gzip -9n debian/utils/usr/share/man/man1/dhcp_lease_time.1 gzip -9n debian/trees/utils/usr/share/man/man1/dhcp_lease_time.1
endif
install -m 644 debian/copyright debian/trees/utils/usr/share/doc/dnsmasq-utils/copyright
install -m 644 debian/changelog debian/trees/utils/usr/share/doc/dnsmasq-utils/changelog.Debian
gzip -9n debian/trees/utils/usr/share/doc/dnsmasq-utils/changelog.Debian
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
$(DEB_HOST_GNU_TYPE)-strip -R .note -R .comment debian/utils/usr/bin/dhcp_release $(DEB_HOST_GNU_TYPE)-strip -R .note -R .comment debian/trees/utils/usr/bin/dhcp_release
$(DEB_HOST_GNU_TYPE)-strip -R .note -R .comment debian/utils/usr/bin/dhcp_release6 $(DEB_HOST_GNU_TYPE)-strip -R .note -R .comment debian/trees/utils/usr/bin/dhcp_release6
$(DEB_HOST_GNU_TYPE)-strip -R .note -R .comment debian/utils/usr/bin/dhcp_lease_time $(DEB_HOST_GNU_TYPE)-strip -R .note -R .comment debian/trees/utils/usr/bin/dhcp_lease_time
endif endif
cd debian/utils && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | LC_ALL=C sort -z | xargs -r0 md5sum > DEBIAN/md5sums cd debian/trees/utils && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | LC_ALL=C sort -z | xargs -r0 md5sum > DEBIAN/md5sums
dpkg-shlibdeps -Tdebian/utils-substvars debian/utils/usr/bin/dhcp_release debian/utils/usr/bin/dhcp_lease_time dpkg-shlibdeps -Tdebian/utils-substvars debian/trees/utils/usr/bin/dhcp_release debian/trees/utils/usr/bin/dhcp_release6 debian/trees/utils/usr/bin/dhcp_lease_time
dpkg-gencontrol $(PACKAGE_VERSION) -Tdebian/utils-substvars -pdnsmasq-utils -Pdebian/utils dpkg-gencontrol $(PACKAGE_VERSION) -Tdebian/utils-substvars -pdnsmasq-utils -Pdebian/trees/utils
find debian/utils -depth -newermt '$(BUILD_DATE)' -print0 | xargs -0r touch --no-dereference --date='$(BUILD_DATE)' find debian/trees/utils -depth -newermt '$(BUILD_DATE)' -print0 | xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
chown -R root.root debian/utils chown -R root.root debian/trees/utils
chmod -R g-ws debian/utils chmod -R g-ws debian/trees/utils
dpkg --build debian/utils .. dpkg --build debian/trees/utils ..
endif endif
define checkdir define checkdir
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment