[game-data-packager] 01/01: h2g2: add dl link to http://www.douglasadams.com/, dl non-free icon

Alexandre Detiste detiste-guest at moszumanska.debian.org
Mon Mar 16 09:53:09 UTC 2015


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

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

commit c7f281b6cbdc52539e6ddfa137daf471de9bed39
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date:   Mon Mar 16 10:52:17 2015 +0100

    h2g2: add dl link to http://www.douglasadams.com/, dl non-free icon
---
 data/hhgg-data.copyright           | 40 ++++++++++++++++++++++++++++++++++++++
 data/hhgg.yaml                     | 13 +++++++++++++
 game_data_packager/__init__.py     |  4 ++--
 game_data_packager/games/z_code.py |  5 +++++
 4 files changed, 60 insertions(+), 2 deletions(-)

diff --git a/data/hhgg-data.copyright b/data/hhgg-data.copyright
new file mode 100644
index 0000000..3aae2ba
--- /dev/null
+++ b/data/hhgg-data.copyright
@@ -0,0 +1,40 @@
+The hhgg-data package was generated using game-data-packager
+It contains proprietary game data and must not be redistributed.
+
+
+"/usr/share/games/hhgg/hhgg.z3" is subject
+to the copyright © 1984 Infocom and
+is also freely playable online here
+http://www.douglasadams.com/creations/infocom.php
+
+
+"/usr/share/pixmaps/hhgg.png", if present,
+is subject to copyright © 2009 iconShock
+
+If was downloaded from this mirror:
+http://www.iconarchive.com/show/hitchhikers-guide-icons-by-iconshock/Arthur-Dent-icon.html
+
+# License: Free for non-commercial use.
+# Commercial usage: Not allowed
+
+Official website: http://www.iconshock.com/
+
+------------------------------------------------------------------------
+
+The Debian packaging is:
+
+© 2008-2013 Jonathan Dowland <jmtd at debian.org>
+© 2014-2015 Simon McVittie <smcv at debian.org>
+© 2015 Alexandre Detiste <alexandre at detiste.be>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; version 2 of the License.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+On Debian GNU/Linux systems, the complete text of the GNU General Public
+License can be found in /usr/share/common-licenses/GPL-2.
diff --git a/data/hhgg.yaml b/data/hhgg.yaml
index 908f602..da43736 100644
--- a/data/hhgg.yaml
+++ b/data/hhgg.yaml
@@ -9,14 +9,27 @@ packages:
     install:
     - hhgg.z3
     # no tea
+    optional:
+    - hhgg.png
+
+files:
+  hhgg.z3:
+    download: http://www.douglasadams.com/creations/hhgg.z3
+  hhgg.png:
+    download: http://icons.iconarchive.com/icons/iconshock/hitchhikers-guide/128/Arthur-Dent-icon.png
+    install_to: usr/share/pixmaps
 
 cksums: |
   _ 113664    hhgg.z3
+  _ 17846     hhgg.png
 md5sums: |
   6666389f60e0c8e4ceb08242a263bb52  hhgg.z3
+  3e7520116fa4624b1ff9660c1b8895f8  hhgg.png
 sha1sums: |
   fe6f5606a7c3976cdd251cf9db57a7dbc2d0e7b7  hhgg.z3
+  70d5d1cda4d3e0d5169f5baa6370687f48dbb01e  hhgg.png
 sha256sums: |
   88b968cb0ab1f564fa40183e4e5fe93c41157fe7883a802ca31ae3095769acf6  hhgg.z3
+  67c937b2189b90fbf9e8a9a4e0e9e76816638bed83ca22c39ddeeac7b3ada99f  hhgg.png
 ...
 
diff --git a/game_data_packager/__init__.py b/game_data_packager/__init__.py
index 28367da..c01d58f 100644
--- a/game_data_packager/__init__.py
+++ b/game_data_packager/__init__.py
@@ -1648,8 +1648,6 @@ class GameData(object):
         debdir = os.path.join(destdir, 'DEBIAN')
         mkdir_p(debdir)
 
-        self.fill_extra_files(package, destdir)
-
         for ms in ('preinst', 'postinst', 'prerm', 'postrm'):
             maintscript = os.path.join(DATADIR, package.name + '.' + ms)
             if os.path.isfile(maintscript):
@@ -1740,6 +1738,8 @@ class GameData(object):
                 subprocess.check_call(['cp', '--reflink=auto',
                     '--preserve=timestamps', copy_from, copy_to])
 
+        self.fill_extra_files(package, destdir)
+
         # adapted from dh_md5sums
         subprocess.check_call("find . -type f ! -regex '\./DEBIAN/.*' " +
                 "-printf '%P\\0' | LC_ALL=C sort -z | " +
diff --git a/game_data_packager/games/z_code.py b/game_data_packager/games/z_code.py
index de5c744..e5420e7 100644
--- a/game_data_packager/games/z_code.py
+++ b/game_data_packager/games/z_code.py
@@ -58,6 +58,11 @@ class ZCodeGameData(GameData):
             entry['TryExec'] = engine
             arg = '/' + package.install_to + '/' + list(package.install)[0]
             entry['Exec'] = engine + ' ' + arg
+
+            pixdir = os.path.join(destdir, 'usr/share/pixmaps')
+            if os.path.exists(os.path.join(pixdir, '%s.png' % self.shortname)):
+                entry['Icon'] = self.shortname
+
             if package.aliases:
                 entry['Keywords'] = ';'.join(package.aliases)
 

-- 
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