[game-data-packager] 09/10: Move DEBIAN directory into slipstream.unpacked

Simon McVittie smcv at debian.org
Sun Jan 4 18:34:48 UTC 2015


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch master
in repository game-data-packager.

commit b4397eeace703646d6bbfc14bfd7b2e7998a7001
Author: Simon McVittie <smcv at debian.org>
Date:   Sat Jan 3 20:48:53 2015 +0000

    Move DEBIAN directory into slipstream.unpacked
---
 lib/game-data-packager-shared | 14 ++++++--------
 supported/q2rogue             |  6 +++---
 supported/q2xatrix            |  6 +++---
 supported/quake               |  9 +++------
 supported/quake2              | 10 ++++------
 tests/runtests                |  4 ++--
 6 files changed, 21 insertions(+), 28 deletions(-)

diff --git a/lib/game-data-packager-shared b/lib/game-data-packager-shared
index 3dab823..7b5b7b5 100644
--- a/lib/game-data-packager-shared
+++ b/lib/game-data-packager-shared
@@ -173,7 +173,7 @@ slipstream_dir() {
  
                 # add a line to md5sums 
                 cd slipstream.unpacked 
-                md5sum "$destpath" >> "../DEBIAN/md5sums" 
+                md5sum "$destpath" >> "DEBIAN/md5sums"
                 cd .. 
         done
  
@@ -206,11 +206,11 @@ slipstream_permcheck() {
 
 ## slipstream_unpack(deb)
 ##      unpacks the deb file into "./slipstream_unpacked"
-##      and the control data into "./DEBIAN"
+##      and the control data into "./slipstream_unpacked/DEBIAN"
 slipstream_unpack() {
 	DEB="$1"
-	dpkg-deb -e "$DEB" "./DEBIAN"
 	dpkg-deb -x "$DEB" "./slipstream.unpacked"
+	dpkg-deb -e "$DEB" "./slipstream.unpacked/DEBIAN"
 }
 
 ## slipstream_file(file,destpath)
@@ -226,7 +226,7 @@ slipstream_file() {
 
 	# add a line to md5sums
 	cd slipstream.unpacked
-	md5sum "$destpath" >> "../DEBIAN/md5sums"
+	md5sum "$destpath" >> "DEBIAN/md5sums"
 	cd ..
 }
 
@@ -239,18 +239,16 @@ slipstream_instsize() {
 	# figure out the new installed-size
 	INSTSIZE=`du -sk ./slipstream.unpacked | cut -f1`
 	sed -i  "s/^Installed-Size.*/Installed-Size: $INSTSIZE/" \
-		"./DEBIAN/control"
+		"./slipstream.unpacked/DEBIAN/control"
 }
 
 ## slipstream_repack(deb)
 ##      writes a new debian package over deb, packing
 ##      the files from ./slipstream_unpacked inside,
-##      using the control area in ./DEBIAN
+##      using the control area in ./slipstream_unpacked/DEBIAN
 slipstream_repack() {
 	DEB="$1"     # the .deb file we are going to mangle
 
-	# repack
-	mv DEBIAN slipstream.unpacked
 	# XXX: store output in a temporary file, then cat the file if
 	# dpkg-deb fails for some reason. (this is all to hide a non-
 	# suppressable "building package foo in ..." message)
diff --git a/supported/q2rogue b/supported/q2rogue
index dd42619..e19d052 100644
--- a/supported/q2rogue
+++ b/supported/q2rogue
@@ -31,7 +31,7 @@ go() {
   # slipstream_instsize, slipstream_repack assume this naming
   DESTDIR="$WORKDIR/slipstream.unpacked"
 
-  mkdir -p "$WORKDIR/DEBIAN" "$DESTDIR/usr/share/doc/quake2-rogue" \
+  mkdir -p "$DESTDIR/DEBIAN" "$DESTDIR/usr/share/doc/quake2-rogue" \
     "$DESTDIR/usr/share/games/quake2/rogue/video"
 
   # the source code component
@@ -50,8 +50,8 @@ go() {
   done
 
   ARCH=`dpkg-architecture -qDEB_BUILD_ARCH`
-  echo "Architecture: $ARCH" > "$WORKDIR/DEBIAN/control"
-  cat "$DATADIR/quake2/quake2-rogue.control" >> "$WORKDIR/DEBIAN/control"
+  echo "Architecture: $ARCH" > "$DESTDIR/DEBIAN/control"
+  cat "$DATADIR/quake2/quake2-rogue.control" >> "$DESTDIR/DEBIAN/control"
   cp -p "$DATADIR/quake2/quake2-rogue.copyright" "$DESTDIR/usr/share/doc/quake2-rogue/copyright"
   
   if [ "" = "$OUTDIR" ]; then
diff --git a/supported/q2xatrix b/supported/q2xatrix
index 16fe14c..a8ef870 100644
--- a/supported/q2xatrix
+++ b/supported/q2xatrix
@@ -35,7 +35,7 @@ go() {
   # slipstream_instsize, slipstream_repack assume this naming
   DESTDIR="$WORKDIR/slipstream.unpacked"
 
-  mkdir -p "$WORKDIR/DEBIAN" "$DESTDIR/usr/share/doc/quake2-xatrix" \
+  mkdir -p "$DESTDIR/DEBIAN" "$DESTDIR/usr/share/doc/quake2-xatrix" \
     "$DESTDIR/usr/share/games/quake2/xatrix/video"
 
   # the source code component
@@ -54,8 +54,8 @@ go() {
   done
 
   ARCH=`dpkg-architecture -qDEB_BUILD_ARCH`
-  echo "Architecture: $ARCH" > "$WORKDIR/DEBIAN/control"
-  cat "$DATADIR/quake2/quake2-xatrix.control" >> "$WORKDIR/DEBIAN/control"
+  echo "Architecture: $ARCH" > "$DESTDIR/DEBIAN/control"
+  cat "$DATADIR/quake2/quake2-xatrix.control" >> "$DESTDIR/DEBIAN/control"
   cp -p "$DATADIR/quake2/quake2-xatrix.copyright" "$DESTDIR/usr/share/doc/quake2-xatrix/copyright"
   
   if [ "" = "$OUTDIR" ]; then
diff --git a/supported/quake b/supported/quake
index b41a297..ad9618c 100644
--- a/supported/quake
+++ b/supported/quake
@@ -456,22 +456,19 @@ music_method () {
     copyin "$DATADIR/quake/${deb}.copyright" \
         "$DESTDIR/usr/share/doc/${deb}/copyright"
 
-    # slipstream_instsize, slipstream_repack assume that slipstream.unpacked
-    # and DEBIAN are in the same place
     copyin "$DATADIR/quake/${deb}.control" \
-        "$WORKDIR/DEBIAN/control"
+        "$DESTDIR/DEBIAN/control"
     copyin "$DATADIR/quake/${deb}.md5sums" \
-        "$WORKDIR/DEBIAN/md5sums"
+        "$DESTDIR/DEBIAN/md5sums"
 
     # we still need to md5sum the actual tracks - their contents
     # depend on the user's copy of oggenc
     ( cd "$DESTDIR" && md5sum usr/share/games/quake/*/music/*.ogg \
-            >> ../DEBIAN/md5sums )
+            >> DEBIAN/md5sums )
 
     debug "building .deb: $OUTFILE"
     ( cd "$WORKDIR" && slipstream_instsize )
     ( cd "$WORKDIR" && slipstream_repack "$OUTFILE" )
 
-    rm -fr "$WORKDIR/DEBIAN"
     rm -fr "$DESTDIR"
 }
diff --git a/supported/quake2 b/supported/quake2
index 7ca48a0..d7d0d8c 100644
--- a/supported/quake2
+++ b/supported/quake2
@@ -459,21 +459,19 @@ go () {
     copyin "$DATADIR/quake2/${deb}.copyright" \
         "$DESTDIR/usr/share/doc/${deb}/copyright"
 
-    # slipstream_instsize, slipstream_repack assume that slipstream.unpacked
-    # and DEBIAN are in the same place
     copyin "$DATADIR/quake2/${deb}.control" \
-        "$WORKDIR/DEBIAN/control"
+        "$DESTDIR/DEBIAN/control"
     copyin "$DATADIR/quake2/${deb}.md5sums" \
-        "$WORKDIR/DEBIAN/md5sums"
+        "$DESTDIR/DEBIAN/md5sums"
 
     if [ $mode = music ]; then
         # we still need to md5sum the actual tracks - their contents
         # depend on the user's copy of oggenc
         ( cd "$DESTDIR" && md5sum usr/share/games/quake2/baseq2/music/*.ogg \
-            >> ../DEBIAN/md5sums )
+            >> DEBIAN/md5sums )
     else
         # sanity check
-        ( cd "$DESTDIR" && md5sum --check --quiet ../DEBIAN/md5sums )
+        ( cd "$DESTDIR" && md5sum --check --quiet DEBIAN/md5sums )
     fi
 
     debug "building .deb: $OUTFILE"
diff --git a/tests/runtests b/tests/runtests
index 916ba06..ed76c1e 100755
--- a/tests/runtests
+++ b/tests/runtests
@@ -95,7 +95,7 @@ test_slipstream() {
 ##      that the current working directory is writeable
 ## slipstream_unpack(deb)
 ##      unpacks the deb file into "./slipstream_unpacked"
-##      and the control data into "./DEBIAN"
+##      and the control data into "./slipstream_unpacked/DEBIAN"
 ## slipstream_file(file,destpath)
 ##      copies the file into "./slipstream_unpacked/$destpath",
 ##      calculates the files md5sum and adds it to the md5sums
@@ -108,7 +108,7 @@ test_slipstream() {
 ## slipstream_repack(deb)
 ##      writes a new debian package over deb, packing
 ##      the files from ./slipstream_unpacked inside,
-##      using the control area in ./DEBIAN
+##      using the control area in ./slipstream_unpacked/DEBIAN
 ## slipstream_cleanup()
 ##      removes the ./slipstream_unpacked directory.
 ## install_deb(deb)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git



More information about the Pkg-games-commits mailing list