]> git.ipfire.org Git - pakfire.git/commitdiff
Rewrite the buildsystem of this package.
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 27 Sep 2011 14:22:00 +0000 (16:22 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 27 Sep 2011 14:23:33 +0000 (16:23 +0200)
python-distutils was not doing a very great job I guess
we need more flexibility. So I re-wrote everything we are
currently using in simple Makefiles.

112 files changed:
.gitignore
INSTALL
MANIFEST.in [deleted file]
Makeconfig [new file with mode: 0644]
Makefile
macros/constants.macro
po/Makefile [new file with mode: 0644]
po/POTFILES.in [deleted file]
po/pakfire.pot
python/Makefile [new file with mode: 0644]
python/pakfire/__init__.py [moved from pakfire/__init__.py with 100% similarity]
python/pakfire/actions.py [moved from pakfire/actions.py with 100% similarity]
python/pakfire/api.py [moved from pakfire/api.py with 100% similarity]
python/pakfire/base.py [moved from pakfire/base.py with 100% similarity]
python/pakfire/builder.py [moved from pakfire/builder.py with 100% similarity]
python/pakfire/chroot.py [moved from pakfire/chroot.py with 100% similarity]
python/pakfire/cli.py [moved from pakfire/cli.py with 100% similarity]
python/pakfire/compress.py [moved from pakfire/compress.py with 100% similarity]
python/pakfire/config.py [moved from pakfire/config.py with 100% similarity]
python/pakfire/constants.py [moved from pakfire/constants.py with 100% similarity]
python/pakfire/distro.py [moved from pakfire/distro.py with 100% similarity]
python/pakfire/downloader.py [moved from pakfire/downloader.py with 100% similarity]
python/pakfire/errors.py [moved from pakfire/errors.py with 100% similarity]
python/pakfire/i18n.py [moved from pakfire/i18n.py with 100% similarity]
python/pakfire/logger.py [moved from pakfire/logger.py with 100% similarity]
python/pakfire/packages/__init__.py [moved from pakfire/packages/__init__.py with 100% similarity]
python/pakfire/packages/base.py [moved from pakfire/packages/base.py with 100% similarity]
python/pakfire/packages/file.py [moved from pakfire/packages/file.py with 99% similarity]
python/pakfire/packages/installed.py [moved from pakfire/packages/installed.py with 100% similarity]
python/pakfire/packages/lexer.py [moved from pakfire/packages/lexer.py with 100% similarity]
python/pakfire/packages/make.py [moved from pakfire/packages/make.py with 99% similarity]
python/pakfire/packages/packager.py [moved from pakfire/packages/packager.py with 100% similarity]
python/pakfire/packages/solv.py [moved from pakfire/packages/solv.py with 100% similarity]
python/pakfire/repository/__init__.py [moved from pakfire/repository/__init__.py with 100% similarity]
python/pakfire/repository/base.py [moved from pakfire/repository/base.py with 100% similarity]
python/pakfire/repository/cache.py [moved from pakfire/repository/cache.py with 100% similarity]
python/pakfire/repository/database.py [moved from pakfire/repository/database.py with 100% similarity]
python/pakfire/repository/index.py [moved from pakfire/repository/index.py with 100% similarity]
python/pakfire/repository/installed.py [moved from pakfire/repository/installed.py with 100% similarity]
python/pakfire/repository/local.py [moved from pakfire/repository/local.py with 100% similarity]
python/pakfire/repository/metadata.py [moved from pakfire/repository/metadata.py with 100% similarity]
python/pakfire/repository/remote.py [moved from pakfire/repository/remote.py with 100% similarity]
python/pakfire/satsolver.py [moved from pakfire/satsolver.py with 100% similarity]
python/pakfire/server.py [moved from pakfire/server.py with 100% similarity]
python/pakfire/transaction.py [moved from pakfire/transaction.py with 100% similarity]
python/pakfire/util.py [moved from pakfire/util.py with 100% similarity]
python/src/Makefile [new file with mode: 0644]
python/src/_pakfiremodule.c [moved from src/_pakfiremodule.c with 100% similarity]
python/src/config.h [moved from src/config.h with 100% similarity]
python/src/pool.c [moved from src/pool.c with 100% similarity]
python/src/pool.h [moved from src/pool.h with 100% similarity]
python/src/problem.c [moved from src/problem.c with 100% similarity]
python/src/problem.h [moved from src/problem.h with 100% similarity]
python/src/relation.c [moved from src/relation.c with 100% similarity]
python/src/relation.h [moved from src/relation.h with 100% similarity]
python/src/repo.c [moved from src/repo.c with 100% similarity]
python/src/repo.h [moved from src/repo.h with 100% similarity]
python/src/request.c [moved from src/request.c with 100% similarity]
python/src/request.h [moved from src/request.h with 100% similarity]
python/src/solution.c [moved from src/solution.c with 100% similarity]
python/src/solution.h [moved from src/solution.h with 100% similarity]
python/src/solvable.c [moved from src/solvable.c with 100% similarity]
python/src/solvable.h [moved from src/solvable.h with 100% similarity]
python/src/solver.c [moved from src/solver.c with 100% similarity]
python/src/solver.h [moved from src/solver.h with 100% similarity]
python/src/step.c [moved from src/step.c with 100% similarity]
python/src/step.h [moved from src/step.h with 100% similarity]
python/src/transaction.c [moved from src/transaction.c with 100% similarity]
python/src/transaction.h [moved from src/transaction.h with 100% similarity]
python/src/util.c [moved from src/util.c with 100% similarity]
python/src/util.h [moved from src/util.h with 100% similarity]
scripts/Makefile [new file with mode: 0644]
scripts/chroot-shell [moved from tools/buildsystem-tools/chroot-shell with 100% similarity]
scripts/cleanup [moved from tools/buildsystem-tools/cleanup with 100% similarity]
scripts/dependency-tracker [moved from tools/buildsystem-tools/dependency-tracker with 100% similarity]
scripts/functions-common [moved from tools/buildsystem-tools/functions-common with 100% similarity]
scripts/functions-constants [moved from tools/buildsystem-tools/functions-constants with 100% similarity]
scripts/functions-directories [moved from tools/buildsystem-tools/functions-directories with 100% similarity]
scripts/functions-files [moved from tools/buildsystem-tools/functions-files with 100% similarity]
scripts/functions-lists [moved from tools/buildsystem-tools/functions-lists with 100% similarity]
scripts/functions-logging [moved from tools/buildsystem-tools/functions-logging with 100% similarity]
scripts/functions-packager-find [moved from tools/buildsystem-tools/functions-packager-find with 100% similarity]
scripts/pakfire-multicall.py [moved from scripts/pakfire with 100% similarity]
scripts/perl.prov [moved from tools/buildsystem-tools/perl.prov with 100% similarity]
scripts/perl.req [moved from tools/buildsystem-tools/perl.req with 100% similarity]
scripts/pkg-config.prov [moved from tools/buildsystem-tools/pkg-config.prov with 100% similarity]
scripts/pkg-config.req [moved from tools/buildsystem-tools/pkg-config.req with 100% similarity]
scripts/py-compile [moved from tools/buildsystem-tools/py-compile with 100% similarity]
scripts/quality-agent [moved from tools/quality-agent/quality-agent with 100% similarity]
scripts/quality-agent.d/001-include-files [moved from tools/quality-agent/quality-agent.d/001-include-files with 100% similarity]
scripts/quality-agent.d/001-remove-info-files [moved from tools/quality-agent/quality-agent.d/001-remove-info-files with 100% similarity]
scripts/quality-agent.d/001-remove-static-libs [moved from tools/quality-agent/quality-agent.d/001-remove-static-libs with 100% similarity]
scripts/quality-agent.d/001-unsafe-files [moved from tools/quality-agent/quality-agent.d/001-unsafe-files with 100% similarity]
scripts/quality-agent.d/002-bad-symlinks [moved from tools/quality-agent/quality-agent.d/002-bad-symlinks with 100% similarity]
scripts/quality-agent.d/003-libs-location [moved from tools/quality-agent/quality-agent.d/003-libs-location with 100% similarity]
scripts/quality-agent.d/050-canary [moved from tools/quality-agent/quality-agent.d/050-canary with 100% similarity]
scripts/quality-agent.d/050-execstacks [moved from tools/quality-agent/quality-agent.d/050-execstacks with 100% similarity]
scripts/quality-agent.d/050-invalid-interpreters [moved from tools/quality-agent/quality-agent.d/050-invalid-interpreters with 100% similarity]
scripts/quality-agent.d/050-libs-needed [moved from tools/quality-agent/quality-agent.d/050-libs-needed with 100% similarity]
scripts/quality-agent.d/050-libs-soname [moved from tools/quality-agent/quality-agent.d/050-libs-soname with 100% similarity]
scripts/quality-agent.d/050-nx [moved from tools/quality-agent/quality-agent.d/050-nx with 100% similarity]
scripts/quality-agent.d/050-relro [moved from tools/quality-agent/quality-agent.d/050-relro with 100% similarity]
scripts/quality-agent.d/050-root-links-to-usr [moved from tools/quality-agent/quality-agent.d/050-root-links-to-usr with 100% similarity]
scripts/quality-agent.d/050-rpaths [moved from tools/quality-agent/quality-agent.d/050-rpaths with 100% similarity]
scripts/quality-agent.d/090-man-pages [moved from tools/quality-agent/quality-agent.d/090-man-pages with 100% similarity]
scripts/quality-agent.d/090-python-hardlinks [moved from tools/quality-agent/quality-agent.d/090-python-hardlinks with 100% similarity]
scripts/quality-agent.d/090-remove-empty-dirs [moved from tools/quality-agent/quality-agent.d/090-remove-empty-dirs with 100% similarity]
scripts/quality-agent.d/095-directory-layout [moved from tools/quality-agent/quality-agent.d/095-directory-layout with 100% similarity]
scripts/quality-agent.d/qa-include [moved from tools/quality-agent/quality-agent.d/qa-include with 96% similarity]
setup.py [deleted file]
tools/buildsystem-tools/common-functions [deleted file]
tools/buildsystem-tools/stripper [deleted file]

index 743df758157677b817450c559ffa047780cc015b..dce47cacc592100974a939d3e9cbd7e1f2798ca3 100644 (file)
@@ -1,5 +1,6 @@
-/build
-/dist
-/pakfire/__version__.py
+/python/pakfire/__version__.py
 /tmp
 *.py[co]
+*.o
+*.[ms]o
+*.tar.gz
diff --git a/INSTALL b/INSTALL
index f6ea5aa0b73c172ac5dbdde00b7c5ad05bdb9e66..c234ed000f43e68253612f776131851186e4110d 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -3,7 +3,6 @@ For general information about pakfire see README.
 
 Requirements:
  * Python 2.6 or greater (not Python 3.x)
- * python-distutils-extra (for install)
  * pyliblzma
  * python-progressbar
  * python-xattr
diff --git a/MANIFEST.in b/MANIFEST.in
deleted file mode 100644 (file)
index 9e01e90..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-include INSTALL Makefile
-recursive-include examples *
-recursive-include po *
-recursive-include src *.c *.h
-recursive-include tools *
diff --git a/Makeconfig b/Makeconfig
new file mode 100644 (file)
index 0000000..4e41a8d
--- /dev/null
@@ -0,0 +1,24 @@
+
+PACKAGE_NAME    = pakfire
+PACKAGE_VERSION = 0.9.9
+PACKAGE_AUTHOR  = IPFire.org Team
+PACKAGE_AUTHOR_EMAIL = info@ipfire.org
+PACKAGE_URL     = http://redmine.ipfire.org/projects/buildsystem3
+PACKAGE_VERSION_FILE = pakfire/__version__.py
+
+# Get the version and configuration of the python interpreter.
+PYTHON_VERSION = $(shell python -c "import platform; print '.'.join(platform.python_version_tuple()[:2])")
+PYTHON_CC      = gcc -pthread
+PYTHON_CFLAGS  = $(shell python-config --cflags)
+PYTHON_DIR     = /usr/lib/python$(PYTHON_VERSION)/site-packages
+PYTHON_MODULES = pakfire pakfire/packages pakfire/repository
+
+# The place, where all internally used scripts and bins are copied.
+SCRIPT_DIR     = /usr/lib/$(PACKAGE_NAME)
+
+TOP := $(dir $(lastword $(MAKEFILE_LIST)))
+
+# A list of all files that contain translations and need to
+# be indexed.
+TRANS_FILES  = $(addsuffix /*.py,$(addprefix python/,$(PYTHON_MODULES)))
+TRANS_FILES += python/src/*.c scripts/pakfire-multicall.py
index 97b3ce0462bb220771dcb37a7e6db4e25562418b..eb308d93cd18520a590b5a49e8b619f7161041ce 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,36 +1,37 @@
 
-DESTDIR ?= /
+include Makeconfig
 
-all: po build
+SUBDIRS = po python scripts
+
+all: build
 
 .PHONY: build
 build:
-       python setup.py build
+       for dir in $(SUBDIRS); do \
+               $(MAKE) -C $${dir} || exit; \
+       done
 
 .PHONY: clean
 clean:
-       python setup.py clean
-       -rm -rfv build
+       for dir in $(SUBDIRS); do \
+               $(MAKE) -C $${dir} clean || exit; \
+       done
 
 .PHONY: dist
 dist:
-       python setup.py sdist
-
-.PHONY: bdist
-bdist:
-       python setup.py bdist
+       git archive --format=tar --prefix=$(PACKAGE_NAME)-$(PACKAGE_VERSION)/ HEAD | \
+               gzip -9 > $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz
 
 .PHONY: install
-install: po
-       python setup.py install --root=$(DESTDIR) --prefix=/usr
+install:
+       for dir in $(SUBDIRS); do \
+               $(MAKE) -C $${dir} install || exit; \
+       done
 
-       # Create script aliases.
-       ln -svf pakfire $(DESTDIR)/usr/bin/pakfire-builder
-       ln -svf pakfire $(DESTDIR)/usr/bin/pakfire-server
-
-       -mkdir -pv $(DESTDIR)/usr/lib/pakfire
-       ln -svf ../../bin/pakfire $(DESTDIR)/usr/lib/pakfire/builder
+       -mkdir -pv $(DESTDIR)/usr/lib/pakfire/macros
+       cp -vf macros/*.macro $(DESTDIR)/usr/lib/pakfire/macros
 
+       # Install example configuration.
        -mkdir -pv $(DESTDIR)/etc/pakfire.repos.d
        cp -vf examples/pakfire.conf $(DESTDIR)/etc/pakfire.conf
        cp -vf examples/pakfire.repos.d/* $(DESTDIR)/etc/pakfire.repos.d/
@@ -38,8 +39,3 @@ install: po
 .PHONY: check
 check:
        ./runpychecker.sh
-
-.PHONY: po
-po:
-       find pakfire src scripts -name "*.py" -or -name "*.c" -or -name "pakfire" -and -type f | \
-               grep -v "__version__.py" | sort > po/POTFILES.in
index f7bcfd74ee73df10ae85d9bad39dc56345348149..02a7b5c9f587658a50152bb1b96f4dd9fc38c3c0 100644 (file)
@@ -27,9 +27,6 @@ sources = %{thisapp}.tar.gz
 # Guesses the compression type automatically.
 MACRO_EXTRACT = tar xaf
 
-# Macro to strip debugging symbols.
-MACRO_STRIP = /usr/lib/buildsystem-tools/stripper %{BUILDROOT}
-
 MACRO_PATCHES
        patches="%{patches}"
 
diff --git a/po/Makefile b/po/Makefile
new file mode 100644 (file)
index 0000000..c596874
--- /dev/null
@@ -0,0 +1,32 @@
+
+include ../Makeconfig
+
+POT_FILE = $(PACKAGE_NAME).pot
+PO_FILES = $(wildcard *.po)
+MO_FILES = $(patsubst %.po,%.mo,$(PO_FILES))
+LANGS    = $(patsubst %.po,%,$(PO_FILES))
+
+TRANS_FILES := $(addprefix $(TOP),$(TRANS_FILES))
+TRANS_FILES := $(sort $(wildcard $(TRANS_FILES)))
+
+.PHONY: all
+all: $(MO_FILES) $(POT_FILE)
+
+$(POT_FILE): $(TRANS_FILES)
+       xgettext -d $(PACKAGE_NAME) -k_ -kN_ \
+               -o $@ --add-comments --from-code=UTF-8 $^ 
+
+%.mo: %.po
+       msgfmt -o $@ $<
+
+.PHONY: install
+install: $(MO_FILES)
+       # Install all language catalogs to their designated place.
+       for lang in $(LANGS); do \
+               mkdir -pv $(DESTDIR)/usr/share/locale/$${lang}/LC_MESSAGES/; \
+               cp -vf $${lang}.mo $(DESTDIR)/usr/share/locale/$${lang}/LC_MESSAGES/$(PACKAGE_NAME).mo || exit; \
+       done
+
+.PHONY: clean
+clean:
+       rm -f $(POT_FILE) $(MO_FILES)
diff --git a/po/POTFILES.in b/po/POTFILES.in
deleted file mode 100644 (file)
index c9f23fc..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-pakfire/actions.py
-pakfire/api.py
-pakfire/base.py
-pakfire/builder.py
-pakfire/chroot.py
-pakfire/cli.py
-pakfire/compress.py
-pakfire/config.py
-pakfire/constants.py
-pakfire/distro.py
-pakfire/downloader.py
-pakfire/errors.py
-pakfire/i18n.py
-pakfire/__init__.py
-pakfire/logger.py
-pakfire/packages/base.py
-pakfire/packages/file.py
-pakfire/packages/__init__.py
-pakfire/packages/installed.py
-pakfire/packages/lexer.py
-pakfire/packages/make.py
-pakfire/packages/packager.py
-pakfire/packages/solv.py
-pakfire/repository/base.py
-pakfire/repository/cache.py
-pakfire/repository/database.py
-pakfire/repository/index.py
-pakfire/repository/__init__.py
-pakfire/repository/installed.py
-pakfire/repository/local.py
-pakfire/repository/metadata.py
-pakfire/repository/remote.py
-pakfire/satsolver.py
-pakfire/server.py
-pakfire/transaction.py
-pakfire/util.py
-scripts/pakfire
-src/_pakfiremodule.c
-src/pool.c
-src/problem.c
-src/relation.c
-src/repo.c
-src/request.c
-src/solution.c
-src/solvable.c
-src/solver.c
-src/step.c
-src/transaction.c
-src/util.c
index 63fe0751dc39264e713c5def14194fd11b721a12..38cfa04697c6dea140a34371da688fdb6b1f9f25 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-09-24 17:09+0200\n"
+"POT-Creation-Date: 2011-09-27 16:07+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,777 +17,782 @@ msgstr ""
 "Content-Type: text/plain; charset=CHARSET\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: ../pakfire/actions.py:108
+#: ../python/pakfire/actions.py:108
 #, python-format
 msgid "Cannot run scriptlet because no interpreter is available: %s"
 msgstr ""
 
-#: ../pakfire/actions.py:112
+#: ../python/pakfire/actions.py:112
 #, python-format
 msgid "Cannot run scriptlet because the interpreter is not executable: %s"
 msgstr ""
 
-#: ../pakfire/actions.py:161
+#: ../python/pakfire/actions.py:161
 #, python-format
 msgid ""
 "The scriptlet returned an error:\n"
 "%s"
 msgstr ""
 
-#: ../pakfire/actions.py:164
+#: ../python/pakfire/actions.py:164
 #, python-format
 msgid "The scriptlet ran more than %s seconds and was killed."
 msgstr ""
 
-#: ../pakfire/actions.py:222 ../pakfire/actions.py:279
+#: ../python/pakfire/actions.py:222 ../python/pakfire/actions.py:279
 msgid "Installing"
 msgstr ""
 
-#: ../pakfire/actions.py:232
+#: ../python/pakfire/actions.py:232
 msgid "Updating"
 msgstr ""
 
-#: ../pakfire/actions.py:246
+#: ../python/pakfire/actions.py:246
 msgid "Removing"
 msgstr ""
 
 #. Cleaning up leftover files and stuff.
-#: ../pakfire/actions.py:264
+#: ../python/pakfire/actions.py:264
 msgid "Cleanup"
 msgstr ""
 
-#: ../pakfire/actions.py:289
+#: ../python/pakfire/actions.py:289
 msgid "Downgrading"
 msgstr ""
 
-#: ../pakfire/base.py:199 ../pakfire/base.py:229 ../pakfire/base.py:275
-#: ../pakfire/base.py:316 ../pakfire/base.py:349
+#: ../python/pakfire/base.py:199 ../python/pakfire/base.py:229
+#: ../python/pakfire/base.py:275 ../python/pakfire/base.py:316
+#: ../python/pakfire/base.py:349
 msgid "Nothing to do"
 msgstr ""
 
-#: ../pakfire/base.py:261
+#: ../python/pakfire/base.py:261
 msgid "There are no packages to install."
 msgstr ""
 
-#: ../pakfire/base.py:451
+#: ../python/pakfire/base.py:451
 msgid "Build command has failed."
 msgstr ""
 
-#: ../pakfire/base.py:535
+#: ../python/pakfire/base.py:535
 msgid "Everything is fine."
 msgstr ""
 
-#: ../pakfire/builder.py:123
+#: ../python/pakfire/builder.py:123
 msgid "Package information:"
 msgstr ""
 
 #. Copy the makefile and load source tarballs.
-#: ../pakfire/builder.py:261
+#: ../python/pakfire/builder.py:261
 msgid "Extracting"
 msgstr ""
 
-#: ../pakfire/builder.py:551
+#: ../python/pakfire/builder.py:551
 msgid "The build command failed. See logfile for details."
 msgstr ""
 
 #. Package the result.
 #. Make all these little package from the build environment.
-#: ../pakfire/builder.py:700
+#: ../python/pakfire/builder.py:700
 msgid "Creating packages:"
 msgstr ""
 
 #. Execute the buildscript of this stage.
-#: ../pakfire/builder.py:720
+#: ../python/pakfire/builder.py:720
 #, python-format
 msgid "Running stage %s:"
 msgstr ""
 
-#: ../pakfire/cli.py:42
+#: ../python/pakfire/cli.py:42
 msgid "Pakfire command line interface."
 msgstr ""
 
-#: ../pakfire/cli.py:49
+#: ../python/pakfire/cli.py:49
 msgid "The path where pakfire should operate in."
 msgstr ""
 
-#: ../pakfire/cli.py:112
+#: ../python/pakfire/cli.py:112
 msgid "Enable verbose output."
 msgstr ""
 
-#: ../pakfire/cli.py:115
+#: ../python/pakfire/cli.py:115
 msgid "Path to a configuration file to load."
 msgstr ""
 
-#: ../pakfire/cli.py:118
+#: ../python/pakfire/cli.py:118
 msgid "Disable a repository temporarily."
 msgstr ""
 
-#: ../pakfire/cli.py:121
+#: ../python/pakfire/cli.py:121
 msgid "Enable a repository temporarily."
 msgstr ""
 
-#: ../pakfire/cli.py:124
+#: ../python/pakfire/cli.py:124
 msgid "Run pakfire in offline mode."
 msgstr ""
 
-#: ../pakfire/cli.py:129
+#: ../python/pakfire/cli.py:129
 msgid "Install one or more packages to the system."
 msgstr ""
 
-#: ../pakfire/cli.py:131
+#: ../python/pakfire/cli.py:131
 msgid "Give name of at least one package to install."
 msgstr ""
 
-#: ../pakfire/cli.py:137
+#: ../python/pakfire/cli.py:137
 msgid "Install one or more packages from the filesystem."
 msgstr ""
 
-#: ../pakfire/cli.py:139
+#: ../python/pakfire/cli.py:139
 msgid "Give filename of at least one package."
 msgstr ""
 
-#: ../pakfire/cli.py:145
+#: ../python/pakfire/cli.py:145
 msgid "Remove one or more packages from the system."
 msgstr ""
 
-#: ../pakfire/cli.py:147
+#: ../python/pakfire/cli.py:147
 msgid "Give name of at least one package to remove."
 msgstr ""
 
-#: ../pakfire/cli.py:153
+#: ../python/pakfire/cli.py:153
 msgid "Update the whole system or one specific package."
 msgstr ""
 
-#: ../pakfire/cli.py:155 ../pakfire/cli.py:163
+#: ../python/pakfire/cli.py:155 ../python/pakfire/cli.py:163
 msgid "Give a name of a package to update or leave emtpy for all."
 msgstr ""
 
-#: ../pakfire/cli.py:161
+#: ../python/pakfire/cli.py:161
 msgid "Check, if there are any updates available."
 msgstr ""
 
-#: ../pakfire/cli.py:169
+#: ../python/pakfire/cli.py:169
 msgid "Print some information about the given package(s)."
 msgstr ""
 
-#: ../pakfire/cli.py:171
+#: ../python/pakfire/cli.py:171
 msgid "Give at least the name of one package."
 msgstr ""
 
-#: ../pakfire/cli.py:177
+#: ../python/pakfire/cli.py:177
 msgid "Search for a given pattern."
 msgstr ""
 
-#: ../pakfire/cli.py:179
+#: ../python/pakfire/cli.py:179
 msgid "A pattern to search for."
 msgstr ""
 
-#: ../pakfire/cli.py:185
+#: ../python/pakfire/cli.py:185
 msgid "Get a list of packages that provide a given file or feature."
 msgstr ""
 
-#: ../pakfire/cli.py:187
+#: ../python/pakfire/cli.py:187
 msgid "File or feature to search for."
 msgstr ""
 
-#: ../pakfire/cli.py:193
+#: ../python/pakfire/cli.py:193
 msgid "Get list of packages that belong to the given group."
 msgstr ""
 
-#: ../pakfire/cli.py:195
+#: ../python/pakfire/cli.py:195
 msgid "Group name to search for."
 msgstr ""
 
-#: ../pakfire/cli.py:201
+#: ../python/pakfire/cli.py:201
 msgid "Install all packages that belong to the given group."
 msgstr ""
 
-#: ../pakfire/cli.py:203
+#: ../python/pakfire/cli.py:203
 msgid "Group name."
 msgstr ""
 
-#: ../pakfire/cli.py:209
+#: ../python/pakfire/cli.py:209
 msgid "List all currently enabled repositories."
 msgstr ""
 
-#: ../pakfire/cli.py:213
+#: ../python/pakfire/cli.py:213
 msgid "Cleanup commands."
 msgstr ""
 
-#: ../pakfire/cli.py:221
+#: ../python/pakfire/cli.py:221
 msgid "Cleanup all temporary files."
 msgstr ""
 
-#: ../pakfire/cli.py:227
+#: ../python/pakfire/cli.py:227
 msgid "Check the system for any errors."
 msgstr ""
 
-#: ../pakfire/cli.py:233
+#: ../python/pakfire/cli.py:233
 msgid "Check the dependencies for a particular package."
 msgstr ""
 
-#: ../pakfire/cli.py:235
+#: ../python/pakfire/cli.py:235
 msgid "Give name of at least one package to check."
 msgstr ""
 
-#: ../pakfire/cli.py:298 ../pakfire/transaction.py:194
+#: ../python/pakfire/cli.py:298 ../python/pakfire/transaction.py:194
 msgid "Repository"
 msgstr ""
 
-#: ../pakfire/cli.py:298
+#: ../python/pakfire/cli.py:298
 msgid "Enabled"
 msgstr ""
 
-#: ../pakfire/cli.py:298
+#: ../python/pakfire/cli.py:298
 msgid "Priority"
 msgstr ""
 
-#: ../pakfire/cli.py:298
+#: ../python/pakfire/cli.py:298
 msgid "Packages"
 msgstr ""
 
-#: ../pakfire/cli.py:310
+#: ../python/pakfire/cli.py:310
 msgid "Cleaning up everything..."
 msgstr ""
 
-#: ../pakfire/cli.py:324 ../pakfire/cli.py:579
+#: ../python/pakfire/cli.py:324 ../python/pakfire/cli.py:579
 msgid "Pakfire builder command line interface."
 msgstr ""
 
-#: ../pakfire/cli.py:379
+#: ../python/pakfire/cli.py:379
 msgid "Update the package indexes."
 msgstr ""
 
-#: ../pakfire/cli.py:385 ../pakfire/cli.py:599
+#: ../python/pakfire/cli.py:385 ../python/pakfire/cli.py:599
 msgid "Build one or more packages."
 msgstr ""
 
-#: ../pakfire/cli.py:387 ../pakfire/cli.py:601
+#: ../python/pakfire/cli.py:387 ../python/pakfire/cli.py:601
 msgid "Give name of at least one package to build."
 msgstr ""
 
-#: ../pakfire/cli.py:391 ../pakfire/cli.py:605
+#: ../python/pakfire/cli.py:391 ../python/pakfire/cli.py:605
 msgid "Build the package for the given architecture."
 msgstr ""
 
-#: ../pakfire/cli.py:393 ../pakfire/cli.py:419 ../pakfire/cli.py:607
+#: ../python/pakfire/cli.py:393 ../python/pakfire/cli.py:419
+#: ../python/pakfire/cli.py:607
 msgid "Path were the output files should be copied to."
 msgstr ""
 
-#: ../pakfire/cli.py:395 ../pakfire/cli.py:408 ../pakfire/cli.py:609
+#: ../python/pakfire/cli.py:395 ../python/pakfire/cli.py:408
+#: ../python/pakfire/cli.py:609
 msgid "Mode to run in. Is either 'release' or 'development' (default)."
 msgstr ""
 
-#: ../pakfire/cli.py:400
+#: ../python/pakfire/cli.py:400
 msgid "Go into a shell."
 msgstr ""
 
-#: ../pakfire/cli.py:402
+#: ../python/pakfire/cli.py:402
 msgid "Give name of a package."
 msgstr ""
 
-#: ../pakfire/cli.py:406
+#: ../python/pakfire/cli.py:406
 msgid "Emulated architecture in the shell."
 msgstr ""
 
-#: ../pakfire/cli.py:413
+#: ../python/pakfire/cli.py:413
 msgid "Generate a source package."
 msgstr ""
 
-#: ../pakfire/cli.py:415
+#: ../python/pakfire/cli.py:415
 msgid "Give name(s) of a package(s)."
 msgstr ""
 
-#: ../pakfire/cli.py:492
+#: ../python/pakfire/cli.py:492
 msgid "Pakfire server command line interface."
 msgstr ""
 
-#: ../pakfire/cli.py:529
+#: ../python/pakfire/cli.py:529
 msgid "Request a build job from the server."
 msgstr ""
 
-#: ../pakfire/cli.py:535
+#: ../python/pakfire/cli.py:535
 msgid "Send a keepalive to the server."
 msgstr ""
 
-#: ../pakfire/cli.py:542
+#: ../python/pakfire/cli.py:542
 msgid "Update all repositories."
 msgstr ""
 
-#: ../pakfire/cli.py:548
+#: ../python/pakfire/cli.py:548
 msgid "Repository management commands."
 msgstr ""
 
-#: ../pakfire/cli.py:556
+#: ../python/pakfire/cli.py:556
 msgid "Create a new repository index."
 msgstr ""
 
-#: ../pakfire/cli.py:557
+#: ../python/pakfire/cli.py:557
 msgid "Path to the packages."
 msgstr ""
 
-#: ../pakfire/cli.py:558
+#: ../python/pakfire/cli.py:558
 msgid "Path to input packages."
 msgstr ""
 
-#: ../pakfire/cli.py:611
+#: ../python/pakfire/cli.py:611
 msgid "Do not verify build dependencies."
 msgstr ""
 
-#: ../pakfire/compress.py:133 ../pakfire/packages/packager.py:489
+#: ../python/pakfire/compress.py:133
+#: ../python/pakfire/packages/packager.py:489
 #, python-format
 msgid "Compressing %s"
 msgstr ""
 
-#: ../pakfire/errors.py:30
+#: ../python/pakfire/errors.py:30
 msgid "An unhandled error occured."
 msgstr ""
 
-#: ../pakfire/errors.py:51
+#: ../python/pakfire/errors.py:51
 msgid "One or more dependencies could not been resolved."
 msgstr ""
 
-#: ../pakfire/errors.py:66
+#: ../python/pakfire/errors.py:66
 msgid ""
 "The requested action cannot be done on offline mode.\n"
 "Please connect your system to the network, remove --offline from the command "
 "line and try again."
 msgstr ""
 
-#: ../pakfire/packages/base.py:89
+#: ../python/pakfire/packages/base.py:89
 msgid "Name"
 msgstr ""
 
-#: ../pakfire/packages/base.py:90 ../pakfire/transaction.py:193
+#: ../python/pakfire/packages/base.py:90 ../python/pakfire/transaction.py:193
 msgid "Arch"
 msgstr ""
 
-#: ../pakfire/packages/base.py:91 ../pakfire/transaction.py:193
+#: ../python/pakfire/packages/base.py:91 ../python/pakfire/transaction.py:193
 msgid "Version"
 msgstr ""
 
-#: ../pakfire/packages/base.py:92
+#: ../python/pakfire/packages/base.py:92
 msgid "Release"
 msgstr ""
 
-#: ../pakfire/packages/base.py:96 ../pakfire/transaction.py:194
+#: ../python/pakfire/packages/base.py:96 ../python/pakfire/transaction.py:194
 msgid "Size"
 msgstr ""
 
-#: ../pakfire/packages/base.py:100
+#: ../python/pakfire/packages/base.py:100
 msgid "Repo"
 msgstr ""
 
-#: ../pakfire/packages/base.py:103
+#: ../python/pakfire/packages/base.py:103
 msgid "Summary"
 msgstr ""
 
-#: ../pakfire/packages/base.py:104
+#: ../python/pakfire/packages/base.py:104
 msgid "Groups"
 msgstr ""
 
-#: ../pakfire/packages/base.py:105
+#: ../python/pakfire/packages/base.py:105
 msgid "URL"
 msgstr ""
 
-#: ../pakfire/packages/base.py:106
+#: ../python/pakfire/packages/base.py:106
 msgid "License"
 msgstr ""
 
-#: ../pakfire/packages/base.py:109
+#: ../python/pakfire/packages/base.py:109
 msgid "Description"
 msgstr ""
 
-#: ../pakfire/packages/base.py:116
+#: ../python/pakfire/packages/base.py:116
 msgid "Maintainer"
 msgstr ""
 
-#: ../pakfire/packages/base.py:118
+#: ../python/pakfire/packages/base.py:118
 msgid "UUID"
 msgstr ""
 
-#: ../pakfire/packages/base.py:119
+#: ../python/pakfire/packages/base.py:119
 msgid "Build ID"
 msgstr ""
 
-#: ../pakfire/packages/base.py:120
+#: ../python/pakfire/packages/base.py:120
 msgid "Build date"
 msgstr ""
 
-#: ../pakfire/packages/base.py:121
+#: ../python/pakfire/packages/base.py:121
 msgid "Build host"
 msgstr ""
 
-#: ../pakfire/packages/base.py:123
+#: ../python/pakfire/packages/base.py:123
 msgid "Provides"
 msgstr ""
 
-#: ../pakfire/packages/base.py:128
+#: ../python/pakfire/packages/base.py:128
 msgid "Pre-requires"
 msgstr ""
 
-#: ../pakfire/packages/base.py:133
+#: ../python/pakfire/packages/base.py:133
 msgid "Requires"
 msgstr ""
 
-#: ../pakfire/packages/base.py:138
+#: ../python/pakfire/packages/base.py:138
 msgid "Conflicts"
 msgstr ""
 
-#: ../pakfire/packages/base.py:143
+#: ../python/pakfire/packages/base.py:143
 msgid "Obsoletes"
 msgstr ""
 
-#: ../pakfire/packages/base.py:151
+#: ../python/pakfire/packages/base.py:151
 msgid "File"
 msgstr ""
 
-#: ../pakfire/packages/base.py:332
+#: ../python/pakfire/packages/base.py:332
 msgid "Not set"
 msgstr ""
 
-#: ../pakfire/packages/file.py:106
+#: ../python/pakfire/packages/file.py:106
 #, python-format
-msgid "Could not extract file: /%s - %s"
+msgid "Could not extract file: /%(src)s - %(dst)s"
 msgstr ""
 
-#: ../pakfire/packages/file.py:156
+#: ../python/pakfire/packages/file.py:156
 #, python-format
 msgid "Filename: %s"
 msgstr ""
 
-#: ../pakfire/packages/make.py:101
+#: ../python/pakfire/packages/make.py:101
 msgid "Package name is undefined."
 msgstr ""
 
-#: ../pakfire/packages/make.py:104
+#: ../python/pakfire/packages/make.py:104
 msgid "Package version is undefined."
 msgstr ""
 
 #. Load progressbar.
-#: ../pakfire/packages/packager.py:315
+#: ../python/pakfire/packages/packager.py:315
 msgid "Packaging"
 msgstr ""
 
-#: ../pakfire/packages/packager.py:608
+#: ../python/pakfire/packages/packager.py:608
 #, python-format
 msgid "Building source package %s:"
 msgstr ""
 
-#: ../pakfire/repository/index.py:229
+#: ../python/pakfire/repository/index.py:229
 #, python-format
 msgid ""
 "I cannot be forced to re-download the metadata for the repository '%s' when "
 "running in offline mode."
 msgstr ""
 
-#: ../pakfire/repository/index.py:279
+#: ../python/pakfire/repository/index.py:279
 #, python-format
 msgid "%s: package database"
 msgstr ""
 
 #. Create progress bar.
-#: ../pakfire/repository/index.py:367
+#: ../python/pakfire/repository/index.py:367
 #, python-format
 msgid "Loading from %s"
 msgstr ""
 
 #. Add all packages from the database to the index.
-#: ../pakfire/repository/index.py:424
+#: ../python/pakfire/repository/index.py:424
 msgid "Loading installed packages"
 msgstr ""
 
-#: ../pakfire/repository/remote.py:106
+#: ../python/pakfire/repository/remote.py:106
 #, python-format
 msgid "Cannot download this file in offline mode: %s"
 msgstr ""
 
-#: ../pakfire/satsolver.py:148
+#: ../python/pakfire/satsolver.py:148
 msgid "The solver returned one problem:"
 msgstr ""
 
 #. Ask the user if he or she want to modify the request. If not, just exit.
-#: ../pakfire/satsolver.py:164
+#: ../python/pakfire/satsolver.py:164
 msgid "Do you want to manually alter the request?"
 msgstr ""
 
-#: ../pakfire/satsolver.py:167
+#: ../python/pakfire/satsolver.py:167
 msgid "You can now try to satisfy the solver by modifying your request."
 msgstr ""
 
-#: ../pakfire/satsolver.py:172
+#: ../python/pakfire/satsolver.py:172
 msgid "Which problem to you want to resolve?"
 msgstr ""
 
-#: ../pakfire/satsolver.py:174
+#: ../python/pakfire/satsolver.py:174
 msgid "Press enter to try to re-solve the request."
 msgstr ""
 
-#: ../pakfire/satsolver.py:205
+#: ../python/pakfire/satsolver.py:205
 #, python-format
 msgid "    Solution: %s"
 msgstr ""
 
-#: ../pakfire/satsolver.py:214
+#: ../python/pakfire/satsolver.py:214
 msgid "    Solutions:"
 msgstr ""
 
-#: ../pakfire/transaction.py:128
+#: ../python/pakfire/transaction.py:128
 msgid "Downloading packages:"
 msgstr ""
 
-#: ../pakfire/transaction.py:193
+#: ../python/pakfire/transaction.py:193
 msgid "Package"
 msgstr ""
 
-#: ../pakfire/transaction.py:198
+#: ../python/pakfire/transaction.py:198
 msgid "Installing:"
 msgstr ""
 
-#: ../pakfire/transaction.py:199
+#: ../python/pakfire/transaction.py:199
 msgid "Reinstalling:"
 msgstr ""
 
-#: ../pakfire/transaction.py:200
+#: ../python/pakfire/transaction.py:200
 msgid "Updating:"
 msgstr ""
 
-#: ../pakfire/transaction.py:201
+#: ../python/pakfire/transaction.py:201
 msgid "Downgrading:"
 msgstr ""
 
-#: ../pakfire/transaction.py:202
+#: ../python/pakfire/transaction.py:202
 msgid "Removing:"
 msgstr ""
 
-#: ../pakfire/transaction.py:208
+#: ../python/pakfire/transaction.py:208
 msgid "Transaction Summary"
 msgstr ""
 
-#: ../pakfire/transaction.py:215
+#: ../python/pakfire/transaction.py:215
 msgid "package"
 msgstr ""
 
-#: ../pakfire/transaction.py:221
+#: ../python/pakfire/transaction.py:221
 #, python-format
 msgid "Total download size: %s"
 msgstr ""
 
-#: ../pakfire/transaction.py:225
+#: ../python/pakfire/transaction.py:225
 #, python-format
 msgid "Installed size: %s"
 msgstr ""
 
-#: ../pakfire/transaction.py:227
+#: ../python/pakfire/transaction.py:227
 #, python-format
 msgid "Freed size: %s"
 msgstr ""
 
-#: ../pakfire/transaction.py:236
+#: ../python/pakfire/transaction.py:236
 msgid "Is this okay?"
 msgstr ""
 
-#: ../pakfire/transaction.py:242
+#: ../python/pakfire/transaction.py:242
 msgid "Running transaction"
 msgstr ""
 
-#: ../pakfire/util.py:66
+#: ../python/pakfire/util.py:66
 #, python-format
 msgid "%s [y/N]"
 msgstr ""
 
-#: ../scripts/pakfire:23
-msgid ""
-"There has been an error when trying to import one or more of the modules, "
-"that are required to run Pakfire."
-msgstr ""
-
-#: ../scripts/pakfire:25
-msgid "Please check your installation of Pakfire."
-msgstr ""
-
-#: ../scripts/pakfire:27
-msgid "The error that lead to this:"
-msgstr ""
-
-#: ../scripts/pakfire:65
-msgid "An error has occured when running Pakfire."
-msgstr ""
-
-#: ../scripts/pakfire:68
-msgid "Error message:"
-msgstr ""
-
-#: ../scripts/pakfire:72
-msgid "Further description:"
-msgstr ""
-
-#: ../src/problem.c:159
+#: ../python/src/problem.c:159
 #, c-format
 msgid "%s does not belong to a distupgrade repository"
 msgstr ""
 
-#: ../src/problem.c:166
+#: ../python/src/problem.c:166
 #, c-format
 msgid "%s has inferior architecture"
 msgstr ""
 
-#: ../src/problem.c:173
+#: ../python/src/problem.c:173
 #, c-format
 msgid "problem with installed package %s"
 msgstr ""
 
-#: ../src/problem.c:179
+#: ../python/src/problem.c:179
 #, c-format
 msgid "conflicting requests"
 msgstr ""
 
-#: ../src/problem.c:184
+#: ../python/src/problem.c:184
 #, c-format
 msgid "nothing provides requested %s"
 msgstr ""
 
-#: ../src/problem.c:190
+#: ../python/src/problem.c:190
 #, c-format
 msgid "some dependency problem"
 msgstr ""
 
-#: ../src/problem.c:195
+#: ../python/src/problem.c:195
 #, c-format
 msgid "package %s is not installable"
 msgstr ""
 
-#: ../src/problem.c:202
+#: ../python/src/problem.c:202
 #, c-format
 msgid "nothing provides %s needed by %s"
 msgstr ""
 
-#: ../src/problem.c:209
+#: ../python/src/problem.c:209
 #, c-format
 msgid "cannot install both %s and %s"
 msgstr ""
 
-#: ../src/problem.c:216
+#: ../python/src/problem.c:216
 #, c-format
 msgid "package %s conflicts with %s provided by %s"
 msgstr ""
 
-#: ../src/problem.c:224
+#: ../python/src/problem.c:224
 #, c-format
 msgid "package %s obsoletes %s provided by %s"
 msgstr ""
 
-#: ../src/problem.c:232
+#: ../python/src/problem.c:232
 #, c-format
 msgid "installed package %s obsoletes %s provided by %s"
 msgstr ""
 
-#: ../src/problem.c:240
+#: ../python/src/problem.c:240
 #, c-format
 msgid "package %s implicitely obsoletes %s provided by %s"
 msgstr ""
 
-#: ../src/problem.c:248
+#: ../python/src/problem.c:248
 #, c-format
 msgid "package %s requires %s, but none of the providers can be installed"
 msgstr ""
 
-#: ../src/problem.c:255
+#: ../python/src/problem.c:255
 #, c-format
 msgid "package %s conflicts with %s provided by itself"
 msgstr ""
 
-#: ../src/problem.c:264
+#: ../python/src/problem.c:264
 #, c-format
 msgid "bad rule type"
 msgstr ""
 
-#: ../src/solution.c:86
+#: ../python/src/solution.c:86
 #, c-format
 msgid "do not keep %s installed"
 msgstr ""
 
-#: ../src/solution.c:89
+#: ../python/src/solution.c:89
 #, c-format
 msgid "do not install a solvable %s"
 msgstr ""
 
-#: ../src/solution.c:92
+#: ../python/src/solution.c:92
 #, c-format
 msgid "do not install %s"
 msgstr ""
 
-#: ../src/solution.c:98
+#: ../python/src/solution.c:98
 #, c-format
 msgid "do not forbid installation of %s"
 msgstr ""
 
-#: ../src/solution.c:101
+#: ../python/src/solution.c:101
 #, c-format
 msgid "do not deinstall all solvables %s"
 msgstr ""
 
-#: ../src/solution.c:104
+#: ../python/src/solution.c:104
 #, c-format
 msgid "do not deinstall %s"
 msgstr ""
 
-#: ../src/solution.c:109
+#: ../python/src/solution.c:109
 #, c-format
 msgid "do not install most recent version of %s"
 msgstr ""
 
-#: ../src/solution.c:114
+#: ../python/src/solution.c:114
 #, c-format
 msgid "do not lock %s"
 msgstr ""
 
-#: ../src/solution.c:119
+#: ../python/src/solution.c:119
 #, c-format
 msgid "do something different"
 msgstr ""
 
-#: ../src/solution.c:126
+#: ../python/src/solution.c:126
 #, c-format
 msgid "keep %s despite the inferior architecture"
 msgstr ""
 
-#: ../src/solution.c:129
+#: ../python/src/solution.c:129
 #, c-format
 msgid "install %s despite the inferior architecture"
 msgstr ""
 
-#: ../src/solution.c:135
+#: ../python/src/solution.c:135
 #, c-format
 msgid "keep obsolete %s"
 msgstr ""
 
-#: ../src/solution.c:138
+#: ../python/src/solution.c:138
 #, c-format
 msgid "install %s from excluded repository"
 msgstr ""
 
-#: ../src/solution.c:150
+#: ../python/src/solution.c:150
 #, c-format
 msgid "allow downgrade of %s to %s"
 msgstr ""
 
-#: ../src/solution.c:154
+#: ../python/src/solution.c:154
 #, c-format
 msgid "allow architecture change of %s to %s"
 msgstr ""
 
-#: ../src/solution.c:159
+#: ../python/src/solution.c:159
 #, c-format
 msgid "allow vendor change from '%s' (%s) to '%s' (%s)"
 msgstr ""
 
-#: ../src/solution.c:163
+#: ../python/src/solution.c:163
 #, c-format
 msgid "allow vendor change from '%s' (%s) to no vendor (%s)"
 msgstr ""
 
-#: ../src/solution.c:169
+#: ../python/src/solution.c:169
 #, c-format
 msgid "allow replacement of %s with %s"
 msgstr ""
+
+#. XXX Maybe we can make a more beautiful message here?!
+#: ../scripts/pakfire-multicall.py:23
+msgid ""
+"There has been an error when trying to import one or more of the modules, "
+"that are required to run Pakfire."
+msgstr ""
+
+#: ../scripts/pakfire-multicall.py:25
+msgid "Please check your installation of Pakfire."
+msgstr ""
+
+#: ../scripts/pakfire-multicall.py:27
+msgid "The error that lead to this:"
+msgstr ""
+
+#: ../scripts/pakfire-multicall.py:65
+msgid "An error has occured when running Pakfire."
+msgstr ""
+
+#: ../scripts/pakfire-multicall.py:68
+msgid "Error message:"
+msgstr ""
+
+#: ../scripts/pakfire-multicall.py:72
+msgid "Further description:"
+msgstr ""
diff --git a/python/Makefile b/python/Makefile
new file mode 100644 (file)
index 0000000..88e4b01
--- /dev/null
@@ -0,0 +1,27 @@
+
+include ../Makeconfig
+
+.PHONY: all
+all: $(PACKAGE_VERSION_FILE)
+       # Build the binary parts.
+       $(MAKE) -C src
+
+.PHONY: install
+install: $(PACKAGE_VERSION_FILE)
+       for mod in $(PYTHON_MODULES); do \
+               mkdir -pv $(DESTDIR)$(PYTHON_DIR)/$${mod}; \
+               cp -vrf $${mod}/*.py $(DESTDIR)$(PYTHON_DIR)/$${mod} || exit; \
+       done
+
+       $(MAKE) -C src install
+
+.PHONY: clean
+clean:
+       rm -f $(PACKAGE_VERSION_FILE)
+
+       $(MAKE) -C src clean
+
+$(PACKAGE_VERSION_FILE): ../Makeconfig
+       echo "# this file is autogenerated by the buildsystem" > $(PACKAGE_VERSION_FILE)
+       echo "PAKFIRE_VERSION = \"$(PACKAGE_VERSION)\"" >> $(PACKAGE_VERSION_FILE)
+
similarity index 100%
rename from pakfire/actions.py
rename to python/pakfire/actions.py
similarity index 100%
rename from pakfire/api.py
rename to python/pakfire/api.py
similarity index 100%
rename from pakfire/base.py
rename to python/pakfire/base.py
similarity index 100%
rename from pakfire/builder.py
rename to python/pakfire/builder.py
similarity index 100%
rename from pakfire/chroot.py
rename to python/pakfire/chroot.py
similarity index 100%
rename from pakfire/cli.py
rename to python/pakfire/cli.py
similarity index 100%
rename from pakfire/config.py
rename to python/pakfire/config.py
similarity index 100%
rename from pakfire/distro.py
rename to python/pakfire/distro.py
similarity index 100%
rename from pakfire/errors.py
rename to python/pakfire/errors.py
similarity index 100%
rename from pakfire/i18n.py
rename to python/pakfire/i18n.py
similarity index 100%
rename from pakfire/logger.py
rename to python/pakfire/logger.py
similarity index 99%
rename from pakfire/packages/file.py
rename to python/pakfire/packages/file.py
index 3a3deaff4b0c1ef342929e76b9b0bb8428f27369..f6e370902d2c3127104fa2e2b3ed1e89cf9f9d08 100644 (file)
@@ -103,8 +103,8 @@ class InnerTarFile(tarfile.TarFile):
                try:
                        tarfile.TarFile.extract(self, member, path)
                except OSError, e:
-                       logging.warning(_("Could not extract file: /%s - %s") \
-                               % (member.name, e))
+                       logging.warning(_("Could not extract file: /%(src)s - %(dst)s") \
+                               % { "src" : member.name, "dst" : e, })
 
                # ...and then apply the extended attributes.
                if member.pax_headers:
similarity index 99%
rename from pakfire/packages/make.py
rename to python/pakfire/packages/make.py
index 66cc0bf021868d386e5f9a1e5c638b7c0fbceace..3d569f75f73ef58b966608b4f2f851635fffef4a 100644 (file)
@@ -413,7 +413,7 @@ class MakefilePackage(MakefileBase):
                return None
 
        def track_dependencies(self, builder, path):
-               result = builder.do("/usr/lib/buildsystem-tools/dependency-tracker %s" \
+               result = builder.do("/usr/lib/pakfire/dependency-tracker %s" \
                        % path, returnOutput=True)
 
                for line in result.splitlines():
similarity index 100%
rename from pakfire/server.py
rename to python/pakfire/server.py
similarity index 100%
rename from pakfire/util.py
rename to python/pakfire/util.py
diff --git a/python/src/Makefile b/python/src/Makefile
new file mode 100644 (file)
index 0000000..d619272
--- /dev/null
@@ -0,0 +1,29 @@
+
+include ../../Makeconfig
+
+# The name of the module.
+MODULENAME = _pakfire.so
+
+# Libs that are to be linked into the module.
+MODULELIBS = -lpython$(PYTHON_VERSION) -lsolv -lsolvext
+
+SOURCES = $(wildcard *.c)
+OBJECTS = $(patsubst %.c,%.o,$(SOURCES))
+
+.PHONY:
+all: $(MODULENAME)
+
+$(MODULENAME): $(OBJECTS)
+       $(PYTHON_CC) $(PYTHON_CFLAGS) -shared $^ $(MODULELIBS) -o $@
+
+%.o: %.c Makefile
+       $(PYTHON_CC) $(PYTHON_CFLAGS) -o $@ -c $<
+
+.PHONY: clean
+clean:
+       rm -f $(OBJECTS) $(MODULENAME)
+
+.PHONY: install
+install: $(MODULENAME)
+       -mkdir -pv $(DESTDIR)$(PYTHON_DIR)/$(PACKAGE_NAME)
+       cp -vf $< $(DESTDIR)$(PYTHON_DIR)/$(PACKAGE_NAME)/
similarity index 100%
rename from src/config.h
rename to python/src/config.h
similarity index 100%
rename from src/pool.c
rename to python/src/pool.c
similarity index 100%
rename from src/pool.h
rename to python/src/pool.h
similarity index 100%
rename from src/problem.c
rename to python/src/problem.c
similarity index 100%
rename from src/problem.h
rename to python/src/problem.h
similarity index 100%
rename from src/relation.c
rename to python/src/relation.c
similarity index 100%
rename from src/relation.h
rename to python/src/relation.h
similarity index 100%
rename from src/repo.c
rename to python/src/repo.c
similarity index 100%
rename from src/repo.h
rename to python/src/repo.h
similarity index 100%
rename from src/request.c
rename to python/src/request.c
similarity index 100%
rename from src/request.h
rename to python/src/request.h
similarity index 100%
rename from src/solution.c
rename to python/src/solution.c
similarity index 100%
rename from src/solution.h
rename to python/src/solution.h
similarity index 100%
rename from src/solvable.c
rename to python/src/solvable.c
similarity index 100%
rename from src/solvable.h
rename to python/src/solvable.h
similarity index 100%
rename from src/solver.c
rename to python/src/solver.c
similarity index 100%
rename from src/solver.h
rename to python/src/solver.h
similarity index 100%
rename from src/step.c
rename to python/src/step.c
similarity index 100%
rename from src/step.h
rename to python/src/step.h
similarity index 100%
rename from src/transaction.c
rename to python/src/transaction.c
similarity index 100%
rename from src/transaction.h
rename to python/src/transaction.h
similarity index 100%
rename from src/util.c
rename to python/src/util.c
similarity index 100%
rename from src/util.h
rename to python/src/util.h
diff --git a/scripts/Makefile b/scripts/Makefile
new file mode 100644 (file)
index 0000000..b67dabf
--- /dev/null
@@ -0,0 +1,40 @@
+
+include ../Makeconfig
+
+SCRIPTS = $(SCRIPTS_BIN) $(SCRIPTS_SHELL)
+SCRIPTS_BIN   =
+SCRIPTS_SHELL = \
+       chroot-shell \
+       cleanup \
+       dependency-tracker \
+       pakfire-multicall.py \
+       py-compile \
+       quality-agent \
+       $(wildcard functions-*) \
+       $(wildcard *.prov) \
+       $(wildcard *.req)
+
+.PHONY: all
+all: $(SCRIPTS)
+
+.PHONY: install
+install: $(SCRIPTS)
+       -mkdir -pv $(DESTDIR)$(SCRIPT_DIR)
+       for file in $^; do \
+               cp -vrf $${file} $(DESTDIR)$(SCRIPT_DIR)/ || exit; \
+       done
+
+       # Create script aliases.
+       -mkdir -pv $(DESTDIR)/usr/bin
+       ln -svf ../..$(SCRIPT_DIR)/pakfire-multicall.py $(DESTDIR)/usr/bin/pakfire
+       ln -svf ../..$(SCRIPT_DIR)/pakfire-multicall.py $(DESTDIR)/usr/bin/pakfire-builder
+       ln -svf ../..$(SCRIPT_DIR)/pakfire-multicall.py $(DESTDIR)/usr/bin/pakfire-server
+       ln -svf pakfire-multicall.py                    $(DESTDIR)$(SCRIPT_DIR)/builder
+
+       # Install QA.
+       -mkdir -pv $(DESTDIR)/usr/lib/quality-agent
+       cp -vf quality-agent.d/* $(DESTDIR)/usr/lib/quality-agent
+
+.PHONY: clean
+clean:
+       : # Nothing yet to do
similarity index 100%
rename from scripts/pakfire
rename to scripts/pakfire-multicall.py
similarity index 96%
rename from tools/quality-agent/quality-agent.d/qa-include
rename to scripts/quality-agent.d/qa-include
index 28467338838d548409d568439d2c72abe1fe9203..bdcf99e45495a5707acf3d43ee872ef9fda8f21a 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 # Include additional functions
-. /usr/lib/buildsystem-tools/common-functions
+. /usr/lib/pakfire/functions-common
 
 function debug() {
        [ "${NAOKI_DEBUG}" = "1" ] || [ "${DEBUG}" = "1" ]
diff --git a/setup.py b/setup.py
deleted file mode 100644 (file)
index a62407b..0000000
--- a/setup.py
+++ /dev/null
@@ -1,47 +0,0 @@
-
-import os
-
-from distutils.core import Extension, setup
-
-from DistUtilsExtra.command import *
-
-PAKFIRE_VERSION = "0.9.9"
-
-_pakfire_module_files = [os.path.join("src", f) for f in os.listdir("src") if f.endswith(".c")]
-
-# Update program version.
-f = open("pakfire/__version__.py", "w")
-f.write("# this file is autogenerated by setup.py\n")
-f.write("PAKFIRE_VERSION = \"%s\"\n" % PAKFIRE_VERSION)
-f.close()
-
-setup(
-       name = "pakfire",
-       version = PAKFIRE_VERSION,
-       description = "Pakfire - Package manager for IPFire.",
-       author = "IPFire.org Team",
-       author_email = "info@ipfire.org",
-       url = "http://redmine.ipfire.org/projects/buildsystem3",
-       packages = [
-               "pakfire",
-               "pakfire.packages",
-               "pakfire.repository",
-       ],
-       scripts = [
-               "scripts/pakfire",
-       ],
-       data_files = [
-               ("lib/pakfire/macros", [os.path.join("macros", f) for f in os.listdir("macros") if f.endswith(".macro")]),
-               ("lib/pakfire", ["tools/quality-agent/quality-agent",]),
-               ("lib/quality-agent", [os.path.join("tools/quality-agent/quality-agent.d", f) \
-                       for f in os.listdir("tools/quality-agent/quality-agent.d")]),
-               ("lib/buildsystem-tools", [os.path.join("tools/buildsystem-tools", f) \
-                       for f in os.listdir("tools/buildsystem-tools")]),
-       ],
-       ext_modules = [
-               Extension("pakfire._pakfire", _pakfire_module_files,
-                       extra_link_args = ["-lsolv", "-lsolvext"])
-       ],
-       cmdclass = { "build" : build_extra.build_extra,
-                    "build_i18n" :  build_i18n.build_i18n },
-)
diff --git a/tools/buildsystem-tools/common-functions b/tools/buildsystem-tools/common-functions
deleted file mode 100644 (file)
index 4c44a58..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/bash
-
-# Simply import all files from this directory that
-# begin with functions-*.
-
-BASEDIR=$(dirname ${BASH_SOURCE[0]})
-
-for file in ${BASEDIR}/functions-*; do
-       # Avoid infinite loop when importing this file again
-       [ "$(basename ${file})" = "functions-common" ] && continue
-
-       . ${file}
-done
-
diff --git a/tools/buildsystem-tools/stripper b/tools/buildsystem-tools/stripper
deleted file mode 100755 (executable)
index b35d72e..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/bash
-
-# Based on RedHat's brp-strip*.
-
-BUILDROOT=${1}
-
-for f in `find ${BUILDROOT} -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \
-               grep -v "^${BUILDROOT}/\?usr/lib/debug"  | \
-               grep -v ' shared object,' | \
-               sed -n -e 's/^\(.*\):[  ]*ELF.*, not stripped/\1/p'`; do
-
-       # Strip ELF binaries
-       strip -g "$f" || :
-
-       note="-R .note"
-       if objdump -h $f | grep '^[     ]*[0-9]*[       ]*.note[        ]' -A 1 | \
-               grep ALLOC >/dev/null; then
-               note=
-       fi
-       strip -R .comment $note "$f" || :
-done
-
-# Strip ELF shared objects
-# Please note we don't restrict our search to executable files because
-# our libraries are not (should not be, at least) +x.
-for f in `find ${BUILDROOT} -type f -a -exec file {} \; | \
-        grep -v "^${BUILDROOT}/\?usr/lib/debug"  | \
-       grep ' shared object,' | \
-       sed -n -e 's/^\(.*\):[  ]*ELF.*, not stripped/\1/p'`; do
-       strip --strip-unneeded "$f"
-done