mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Add gitversion Debian build option.
This commit is contained in:
@@ -12,7 +12,7 @@
|
|||||||
# first. This favours, eg v2.63 over 2.63rc6.
|
# first. This favours, eg v2.63 over 2.63rc6.
|
||||||
|
|
||||||
if which git >/dev/null 2>&1 && [ -d $1/.git ]; then
|
if which git >/dev/null 2>&1 && [ -d $1/.git ]; then
|
||||||
cd $1; git describe
|
cd $1; git describe | sed 's/^v//'
|
||||||
elif grep '\$Format:%d\$' $1/VERSION >/dev/null 2>&1; then
|
elif grep '\$Format:%d\$' $1/VERSION >/dev/null 2>&1; then
|
||||||
# unsubstituted VERSION, but no git available.
|
# unsubstituted VERSION, but no git available.
|
||||||
echo UNKNOWN
|
echo UNKNOWN
|
||||||
|
|||||||
4
debian/readme
vendored
4
debian/readme
vendored
@@ -64,7 +64,9 @@ Notes on configuring dnsmasq as packaged for Debian.
|
|||||||
noi18n : omit translations and internationalisation support.
|
noi18n : omit translations and internationalisation support.
|
||||||
noidn : omit international domain name support, must be
|
noidn : omit international domain name support, must be
|
||||||
combined with noi18n to be effective.
|
combined with noi18n to be effective.
|
||||||
|
gitversion : set the version of the produced packages from the
|
||||||
|
git-derived versioning information on the source,
|
||||||
|
rather the the debian changelog.
|
||||||
|
|
||||||
(9) Dnsmasq comes as three packages - dnsmasq-utils, dnsmasq-base and
|
(9) Dnsmasq comes as three packages - dnsmasq-utils, dnsmasq-base and
|
||||||
dnsmasq. Dnsmasq-base provides the dnsmasq executable and
|
dnsmasq. Dnsmasq-base provides the dnsmasq executable and
|
||||||
|
|||||||
11
debian/rules
vendored
11
debian/rules
vendored
@@ -23,6 +23,11 @@ TARGET = install-i18n
|
|||||||
|
|
||||||
DEB_BUILD_ARCH_OS := $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
|
DEB_BUILD_ARCH_OS := $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
|
||||||
|
|
||||||
|
# Force package version based on git tags.
|
||||||
|
ifneq (,$(filter gitversion,$(DEB_BUILD_OPTIONS)))
|
||||||
|
PACKAGE_VERSION = $(shell bld/get-version `pwd` | sed 's/[a-z]/~&/; s/$$/-1/; s/^/-v/')
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq (,$(filter nodbus,$(DEB_BUILD_OPTIONS)))
|
ifeq (,$(filter nodbus,$(DEB_BUILD_OPTIONS)))
|
||||||
COPTS += -DHAVE_DBUS
|
COPTS += -DHAVE_DBUS
|
||||||
endif
|
endif
|
||||||
@@ -103,7 +108,7 @@ binary-indep: checkroot
|
|||||||
install -m 644 debian/insserv debian/daemon/etc/insserv.conf.d/dnsmasq
|
install -m 644 debian/insserv debian/daemon/etc/insserv.conf.d/dnsmasq
|
||||||
ln -s $(package) debian/daemon/usr/share/doc/dnsmasq
|
ln -s $(package) debian/daemon/usr/share/doc/dnsmasq
|
||||||
cd debian/daemon && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | xargs -r0 md5sum > DEBIAN/md5sums
|
cd debian/daemon && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | xargs -r0 md5sum > DEBIAN/md5sums
|
||||||
dpkg-gencontrol -pdnsmasq -Pdebian/daemon
|
dpkg-gencontrol $(PACKAGE_VERSION) -pdnsmasq -Pdebian/daemon
|
||||||
chown -R root.root debian/daemon
|
chown -R root.root debian/daemon
|
||||||
chmod -R g-ws debian/daemon
|
chmod -R g-ws debian/daemon
|
||||||
dpkg --build debian/daemon ..
|
dpkg --build debian/daemon ..
|
||||||
@@ -151,7 +156,7 @@ ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
|
|||||||
endif
|
endif
|
||||||
cd debian/base && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | xargs -r0 md5sum > DEBIAN/md5sums
|
cd debian/base && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | xargs -r0 md5sum > DEBIAN/md5sums
|
||||||
dpkg-shlibdeps debian/base/usr/sbin/dnsmasq
|
dpkg-shlibdeps debian/base/usr/sbin/dnsmasq
|
||||||
dpkg-gencontrol -pdnsmasq-base -Pdebian/base
|
dpkg-gencontrol $(PACKAGE_VERSION) -pdnsmasq-base -Pdebian/base
|
||||||
chown -R root.root debian/base
|
chown -R root.root debian/base
|
||||||
chmod -R g-ws debian/base
|
chmod -R g-ws debian/base
|
||||||
dpkg --build debian/base ..
|
dpkg --build debian/base ..
|
||||||
@@ -178,7 +183,7 @@ ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
|
|||||||
endif
|
endif
|
||||||
cd debian/utils && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | xargs -r0 md5sum > DEBIAN/md5sums
|
cd debian/utils && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | 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/utils/usr/bin/dhcp_release debian/utils/usr/bin/dhcp_lease_time
|
||||||
dpkg-gencontrol -Tdebian/utils-substvars -pdnsmasq-utils -Pdebian/utils
|
dpkg-gencontrol $(PACKAGE_VERSION) -Tdebian/utils-substvars -pdnsmasq-utils -Pdebian/utils
|
||||||
chown -R root.root debian/utils
|
chown -R root.root debian/utils
|
||||||
chmod -R g-ws debian/utils
|
chmod -R g-ws debian/utils
|
||||||
dpkg --build debian/utils ..
|
dpkg --build debian/utils ..
|
||||||
|
|||||||
Reference in New Issue
Block a user