[game-data-packager] 01/01: ROTT: fix bad copy-paste in demo alternatives handling
Alexandre Detiste
detiste-guest at moszumanska.debian.org
Tue Jan 5 08:43:50 UTC 2016
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 62890bd0d2e841e46013891d024fb79f13b9ca18
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date: Tue Jan 5 09:43:17 2016 +0100
ROTT: fix bad copy-paste in demo alternatives handling
---
data/rott.yaml | 12 ++++++------
game_data_packager/build.py | 28 +++++++++++++++++++++++-----
2 files changed, 29 insertions(+), 11 deletions(-)
diff --git a/data/rott.yaml b/data/rott.yaml
index cb26246..0bc7a1b 100644
--- a/data/rott.yaml
+++ b/data/rott.yaml
@@ -132,18 +132,18 @@ files:
DEMO2_3.DMO:
alternatives:
- - DEMO1_3.DMO?huntbgin
- - DEMO1_3.DMO?darkwar
+ - DEMO2_3.DMO?huntbgin
+ - DEMO2_3.DMO?darkwar
DEMO3_3.DMO:
alternatives:
- - DEMO1_3.DMO?huntbgin
- - DEMO1_3.DMO?darkwar
+ - DEMO3_3.DMO?huntbgin
+ - DEMO3_3.DMO?darkwar
DEMO4_3.DMO:
alternatives:
- - DEMO1_3.DMO?huntbgin
- - DEMO1_3.DMO?darkwar
+ - DEMO4_3.DMO?huntbgin
+ - DEMO4_3.DMO?darkwar
setup_rise_of_the_triad_2.0.0.5.exe:
unpack:
diff --git a/game_data_packager/build.py b/game_data_packager/build.py
index 40c9f5e..95857e2 100644
--- a/game_data_packager/build.py
+++ b/game_data_packager/build.py
@@ -1461,6 +1461,27 @@ class PackagingTask(object):
else:
url = 'https://wiki.debian.org/Games/GameDataPackager'
+ # always include these two directories in %files
+ files = set(['/' + package.install_to,
+ '/usr/share/doc/' + package.name])
+
+ # licenses too
+ if os.path.isdir(os.path.join(destdir, 'usr/share/licenses')):
+ files.add('/usr/share/licenses/' + package.name)
+
+ print('FILES:', files)
+ # extra misc files, in doubt add directory instead
+ for dirpath, dirnames, filenames in os.walk(destdir):
+ for fn in filenames:
+ full = os.path.join(dirpath, fn)
+ dir = dirpath[len(destdir):]
+ file = full[len(destdir):]
+ if dir in files:
+ break
+ print(dir, file)
+
+ print('FILES:', files)
+
with open(specfile, 'w', encoding='utf-8') as spec:
spec.write('Summary: %s\n' % short_desc)
spec.write('Name: %s\n' % package.name)
@@ -1487,11 +1508,8 @@ class PackagingTask(object):
spec.write('%description\n')
spec.write('%s\n' % long_desc)
spec.write('%files\n')
- for dirpath, dirnames, filenames in os.walk(destdir):
- for fn in filenames:
- full = os.path.join(dirpath, fn)
- full = full[len(destdir):]
- spec.write(full + '\n')
+ spec.write('\n'.join(files))
+ spec.write('\n\n')
spec.write('%changelog\n')
spec.write('* %s %s@%s - %s-0\n' %
--
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