]> git.ipfire.org Git - people/jschlag/pbs.git/commitdiff
Generate paths in constants.py by configure
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 7 Oct 2017 11:08:15 +0000 (12:08 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 7 Oct 2017 11:10:04 +0000 (12:10 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
.gitignore
Makefile.am
src/buildservice/constants.py.in [moved from src/buildservice/constants.py with 97% similarity]

index 1e65027470c6c61fb2c4a5dd23d055212dedd480..336eb2319d33760c8b2399a06156b38e53b903c3 100644 (file)
@@ -3,6 +3,7 @@
 /build-aux
 /pbs.conf
 /missing
+/src/buildservice/constants.py
 /src/buildservice/__version__.py
 /tmp
 /.vscode
index 026a74be8a96aab0ef4155f53e83f320fe59bcb5..e7ee776359e9096ffd3deb995b430fd6e992df52 100644 (file)
@@ -104,6 +104,12 @@ buildservice_PYTHON = \
 
 buildservicedir = $(pythondir)/buildservice
 
+EXTRA_DIST += \
+       src/buildservice/constants.py.in
+
+CLEANFILES += \
+       src/buildservice/constants.py
+
 hub_PYTHON = \
        src/hub/__init__.py \
        src/hub/handlers.py
@@ -449,7 +455,8 @@ substitutions = \
        '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
        '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
        '|configsdir=$(configsdir)|' \
-       '|bindir=$(bindir)|'
+       '|bindir=$(bindir)|' \
+       '|datadir=$(datadir)|'
 
 SED_PROCESS = \
        $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
similarity index 97%
rename from src/buildservice/constants.py
rename to src/buildservice/constants.py.in
index 192c2c134cfe42bc04737bdbc83c9ce1a397c30d..73d4b75273ec2ad7b9f239cc9ac6e8320d029ba5 100644 (file)
@@ -5,8 +5,8 @@ import os.path
 # Import all constants from the pakfire module.
 from pakfire.constants import *
 
-# XXX must be set by configure
-DATADIR = "/usr/share/pakfire-build-service"
+CONFIGSDIR = "@configsdir@"
+DATADIR    = "@datadir@"
 
 PAKFIRE_DIR  = "/pakfire"
 PACKAGES_DIR = os.path.join(PAKFIRE_DIR, "packages")