[game-data-packager] 02/02: SuSE: documentation & license goes in "usr/share/doc/packages"
Alexandre Detiste
detiste-guest at moszumanska.debian.org
Fri Jan 8 12:27:35 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 f6dc36a768c0c9ab115191bf504f7b96b7f67db5
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date: Fri Jan 8 13:27:06 2016 +0100
SuSE: documentation & license goes in "usr/share/doc/packages"
---
game_data_packager/build.py | 5 +++--
game_data_packager/packaging/__init__.py | 1 +
game_data_packager/packaging/rpm.py | 4 +++-
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/game_data_packager/build.py b/game_data_packager/build.py
index 6cf48df..bc27efc 100644
--- a/game_data_packager/build.py
+++ b/game_data_packager/build.py
@@ -1493,6 +1493,7 @@ class PackagingTask(object):
'/usr/share',
'/usr/share/applications',
'/usr/share/doc',
+ '/usr/share/doc/packages',
'/usr/share/icons/hicolor/scalable/apps',
'/usr/share/licenses',
'/usr/share/pixmaps'])
@@ -1588,7 +1589,7 @@ class PackagingTask(object):
if not self.check_complete(package, log=True):
return False
- pkgdocdir = os.path.join('usr/share/doc', package.name)
+ pkgdocdir = os.path.join(self.packaging.DOCDIR, package.name)
dest_pkgdocdir = os.path.join(destdir, pkgdocdir)
mkdir_p(dest_pkgdocdir)
shutil.copyfile(os.path.join(DATADIR, 'changelog.gz'),
@@ -1980,7 +1981,7 @@ class PackagingTask(object):
if os.path.isdir(path) and path not in paths:
paths.append(path)
- path = '/usr/share/doc/' + package.name
+ path = '/' + self.packaging.DOCDIR + '/' + package.name
if os.path.isdir(path) and path not in paths:
paths.append(path)
diff --git a/game_data_packager/packaging/__init__.py b/game_data_packager/packaging/__init__.py
index 8fd4bfa..fe6a73c 100644
--- a/game_data_packager/packaging/__init__.py
+++ b/game_data_packager/packaging/__init__.py
@@ -23,6 +23,7 @@ import string
class PackagingSystem(metaclass=ABCMeta):
ASSETS = 'usr/share'
BINDIR = 'usr/bin'
+ DOCDIR = 'usr/share/doc'
LICENSEDIR = 'usr/share/doc'
CHECK_CMD = None
INSTALL_CMD = None
diff --git a/game_data_packager/packaging/rpm.py b/game_data_packager/packaging/rpm.py
index b6de20d..da95457 100644
--- a/game_data_packager/packaging/rpm.py
+++ b/game_data_packager/packaging/rpm.py
@@ -27,7 +27,6 @@ logger = logging.getLogger(__name__)
class RpmPackaging(PackagingSystem):
CHECK_CMD = 'rpmlint'
- LICENSEDIR = 'usr/share/licenses'
ARCH_DECODE = {
'all': 'noarch',
'i386': 'i686',
@@ -79,6 +78,7 @@ class RpmPackaging(PackagingSystem):
# As install_packages() needs root, we need to use the 'dnf' pgm
class DnfPackaging(RpmPackaging):
+ LICENSEDIR = 'usr/share/licenses'
INSTALL_CMD = 'dnf install'
PACKAGE_MAP = {
'dpkg-deb': 'dpkg',
@@ -124,6 +124,8 @@ class DnfPackaging(RpmPackaging):
gain_root=gain_root)
class ZypperPackaging(RpmPackaging):
+ DOCDIR = 'usr/share/doc/packages'
+ LICENSEDIR = 'usr/share/doc/packages'
INSTALL_CMD = 'zypper install'
PACKAGE_MAP = {
'dpkg-deb': 'dpkg',
--
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