[game-data-packager] 08/19: Add support for install_to: $docdir
Simon McVittie
smcv at debian.org
Tue Jan 13 11:34:38 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 45f034f5e7a6051b85a45648f230ad94e5e9ca1c
Author: Simon McVittie <smcv at debian.org>
Date: Tue Jan 13 09:51:20 2015 +0000
Add support for install_to: $docdir
Some files in quake2 exist in both the demo package and the full
package, and need to go in the appropriate documentation directory.
---
lib/game_data_packager/__init__.py | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/lib/game_data_packager/__init__.py b/lib/game_data_packager/__init__.py
index b81177e..d2fc3c8 100644
--- a/lib/game_data_packager/__init__.py
+++ b/lib/game_data_packager/__init__.py
@@ -1286,9 +1286,17 @@ class GameData(object):
# cp it into place
with TemporaryUmask(0o22):
logger.debug('Found %s at %s', wanted.name, copy_from)
- copy_to = os.path.join(destdir,
- (wanted.install_to if wanted.install_to is not None
- else package.install_to),
+
+ install_to = wanted.install_to
+
+ if install_to is None:
+ install_to = package.install_to
+
+ if install_to.startswith('$docdir'):
+ install_to = 'usr/share/doc/%s%s' % (package.name,
+ install_to[7:])
+
+ copy_to = os.path.join(destdir, install_to,
wanted.install_as)
copy_to_dir = os.path.dirname(copy_to)
logger.debug('Copying to %s', copy_to)
--
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