rewrite scripts
try to provide better syntax and avoid using bash
This commit is contained in:
10
debian/rules
vendored
10
debian/rules
vendored
@@ -5,8 +5,6 @@ include /usr/share/dpkg/pkg-info.mk
|
||||
|
||||
DEB_VERSION_SOURCE = $(shell echo '$(DEB_VERSION)' | sed -re 's/\+b([0-9]+)$$//')
|
||||
|
||||
SHELL := sh -e
|
||||
|
||||
include debian/rules.defs
|
||||
|
||||
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
|
||||
@@ -90,8 +88,8 @@ clean: debian/control
|
||||
rm -rf $(CLEAN_PATTERNS)
|
||||
dh_clean
|
||||
|
||||
CONTROL_FILES = $(BUILD_DIR)/version-info $(wildcard debian/templates/*.in)
|
||||
CONTROL_FILES += debian/config/defines.toml $(wildcard debian/config/*/defines.toml)
|
||||
CONTROL_FILES = $(BUILD_DIR)/version-info $(sort $(wildcard debian/templates/*.in))
|
||||
CONTROL_FILES += debian/config/defines.toml $(sort $(wildcard debian/config/*/defines.toml))
|
||||
|
||||
# debian/bin/gencontrol.py uses debian/changelog as input, but the
|
||||
# output only depends on the source name and version. To avoid
|
||||
@@ -100,7 +98,7 @@ CONTROL_FILES += debian/config/defines.toml $(wildcard debian/config/*/defines.t
|
||||
$(BUILD_DIR)/version-info: debian/changelog
|
||||
mkdir -p $(@D)
|
||||
# Use DEB_VERSION_SOURCE to allow binNMU
|
||||
printf >$@ 'Source: %s\nVersion: %s\n' $(DEB_SOURCE) $(DEB_VERSION)
|
||||
printf >$@ 'Source: %s\nVersion: %s\n' '$(DEB_SOURCE)' '$(DEB_VERSION)'
|
||||
|
||||
debian/control debian/rules.gen: debian/bin/gencontrol.py $(CONTROL_FILES)
|
||||
ifeq ($(wildcard debian/control.md5sum),)
|
||||
@@ -113,6 +111,8 @@ endif
|
||||
debian/control-real: debian/bin/gencontrol.py $(CONTROL_FILES)
|
||||
# Hash randomisation makes the pickled config unreproducible
|
||||
PYTHONHASHSEED=0 $<
|
||||
find debian/ -name __pycache__ -type d -exec rm -rf {} +
|
||||
find debian/ -name '*.pyc' -type f -exec rm -f {} +
|
||||
md5sum $(sort $^) > debian/control.md5sum
|
||||
@echo
|
||||
@echo This target is made to fail intentionally, to make sure
|
||||
|
Reference in New Issue
Block a user