Commit dc27f5e3 authored by Carlos Maddela's avatar Carlos Maddela

Simplify process by which mutable files are backed up and restored.

parent 3693b4e8
...@@ -3,6 +3,7 @@ dvdisaster (0.79.5-7) UNRELEASED; urgency=medium ...@@ -3,6 +3,7 @@ dvdisaster (0.79.5-7) UNRELEASED; urgency=medium
* Add debian/gbp.conf to conform with DEP14 conventions. * Add debian/gbp.conf to conform with DEP14 conventions.
* Build with Debhelper compat level 12. * Build with Debhelper compat level 12.
* Set "Rules-Requires-Root: no". * Set "Rules-Requires-Root: no".
* Simplify process by which mutable files are backed up and restored.
-- Carlos Maddela <e7appew@gmail.com> Thu, 31 Jan 2019 03:58:19 +1100 -- Carlos Maddela <e7appew@gmail.com> Thu, 31 Jan 2019 03:58:19 +1100
......
...@@ -13,6 +13,7 @@ export FORCE_SOURCE_DATE = 1 ...@@ -13,6 +13,7 @@ export FORCE_SOURCE_DATE = 1
MUTABLE_FILES := build.h $(wildcard locale/*.po) \ MUTABLE_FILES := build.h $(wildcard locale/*.po) \
documentation/config/version.tex \ documentation/config/version.tex \
documentation/user-manual/manual.pdf documentation/user-manual/manual.pdf
BACKUP_TAR_FILE := debian/backup.tar
BUILDROOT := $(CURDIR)/debian/tmp BUILDROOT := $(CURDIR)/debian/tmp
ICONS := $(wildcard contrib/dvdisaster*.png) ICONS := $(wildcard contrib/dvdisaster*.png)
...@@ -21,10 +22,17 @@ ICON_SIZES := $(patsubst contrib/dvdisaster%.png,%,$(ICONS)) ...@@ -21,10 +22,17 @@ ICON_SIZES := $(patsubst contrib/dvdisaster%.png,%,$(ICONS))
%: %:
dh $@ dh $@
override_dh_update_autotools_config:
dh_update_autotools_config
test -f $(BACKUP_TAR_FILE) || \
tar cpf $(BACKUP_TAR_FILE) $(MUTABLE_FILES)
override_dh_clean:
dh_clean
test ! -f $(BACKUP_TAR_FILE) || \
tar xpf $(BACKUP_TAR_FILE) && rm -f $(BACKUP_TAR_FILE)
override_dh_auto_configure: override_dh_auto_configure:
for f in $(MUTABLE_FILES); do \
cp -an $$f $$f.orig; \
done
./configure \ ./configure \
--prefix=/usr \ --prefix=/usr \
--mandir=share/man \ --mandir=share/man \
...@@ -33,12 +41,6 @@ override_dh_auto_configure: ...@@ -33,12 +41,6 @@ override_dh_auto_configure:
--docsubdir=dvdisaster-doc \ --docsubdir=dvdisaster-doc \
--with-embedded-src-path=no --with-embedded-src-path=no
override_dh_clean:
dh_clean -X.orig
for f in $(MUTABLE_FILES); do \
test ! -f $$f.orig || mv -f $$f.orig $$f; \
done
override_dh_auto_build-arch: override_dh_auto_build-arch:
make all make all
......
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