[SCM] Installer for game data files branch, rott, updated. 73257c7140028c5d8347f462bec38c6fb2748efd
Jon Dowland
jmtd at debian.org
Wed Mar 24 09:53:44 UTC 2010
The following commit has been merged in the rott branch:
commit 5a9906237ab5bd4f4d7b68051b5671177322b895
Author: Jon Dowland <jmtd at debian.org>
Date: Tue Mar 23 15:38:43 2010 +0000
rework rott.mk to use build/, out/
diff --git a/rott-data/usr/share/doc/rott-data/README.Debian b/rott-data/README.Debian
similarity index 100%
rename from rott-data/usr/share/doc/rott-data/README.Debian
rename to rott-data/README.Debian
diff --git a/rott-data/DEBIAN/control.in b/rott-data/control.in
similarity index 100%
rename from rott-data/DEBIAN/control.in
rename to rott-data/control.in
diff --git a/rott-data/usr/share/doc/rott-data/copyright b/rott-data/copyright
similarity index 100%
rename from rott-data/usr/share/doc/rott-data/copyright
rename to rott-data/copyright
diff --git a/rott.mk b/rott.mk
index 984d8ac..d7f5b80 100644
--- a/rott.mk
+++ b/rott.mk
@@ -1,21 +1,30 @@
# VERSION is defined by the parent make
-rott-data_$(VERSION)_all.deb: rott-data/DEBIAN/control dirs
- if [ `id -u` -eq 0 ]; then \
- dpkg-deb -b rott-data $@ ; \
- else \
- fakeroot dpkg-deb -b rott-data $@; \
- fi
+out/rott-data_$(VERSION)_all.deb: build/rott-data/DEBIAN/control $(DESTFILES)
+ fakeroot dpkg-deb -b build/rott-data $@
-dirs:
- mkdir rott-data/usr/share/games
- mkdir rott-data/usr/share/games/rott
+DIRS = build/rott-data \
+build/rott-data/DEBIAN \
+build/rott-data/usr \
+build/rott-data/usr/share \
+build/rott-data/usr/share/games \
+build/rott-data/usr/share/games/rott
-rott-data/DEBIAN/control: rott-data/DEBIAN/control.in
+BASICFILES = usr/share/doc/rott-data/README.Debian \
+usr/share/doc/rott-data/copyright
+DESTFILES = $(addprefix build/rott-data/, $(BASICFILES))
+
+$(DIRS):
+ mkdir $@
+
+$(DESTFILES): $(DIRS)
+ cp -p rott-data/`basename "$@"` $@
+
+build/rott-data/DEBIAN/control: rott-data/control.in $(DIRS)
m4 -DPACKAGE=rott-data -DVERSION=$(VERSION) $< > $@
clean:
- rm -f rott-data/DEBIAN/control rott-data_$(VERSION)_all.deb
- [ ! -d rott-data/usr/share/games/rott ] || rmdir rott-data/usr/share/games/rott
- [ ! -d rott-data/usr/share/games ] || rmdir rott-data/usr/share/games
+ rm -f build/rott-data/DEBIAN/control out/rott-data_$(VERSION)_all.deb
+ for d in $(DIRS); do echo "$$d"; done | sort -r | while read d; do \
+ [ ! -d "$$d" ] || rmdir "$$d"; done
-.PHONY: clean
+.PHONY: clean $(DESTFILES)
--
Installer for game data files
More information about the Pkg-games-commits
mailing list