Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/debian/cdbs/1/class/python-sugar.mk
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2008-04-25 15:12:29 (GMT)
committer Jonas Smedegaard <dr@jones.dk>2008-04-25 15:12:29 (GMT)
commit2ae4405acde4a217ff3691d98fc5b24e0f696e7b (patch)
tree99075df2bde86150ecb82b023fdd9bb48352dc33 /debian/cdbs/1/class/python-sugar.mk
parent5fd07a55e2bbf0a0b24dedb04aa9d17e759bc75b (diff)
Several fixes in python-sugar.mk.
+ Clean *.xo and locale in python-sugar.mk (based on initial work by Santiago Ruano Rincón). + Fix preserving upstream MANIFEST files only once (and prepare for supporting multiple activity packages from one source) in python-sugar.mk. + Fix simultanously setting DEB_PYTHON_SUGAR_MANIFEST and DEB_PYTHON_SUGAR_MANIFEST_REGEX in python-sugar.mk. + Tighten python-sugar.mk build-dependency on python-sugar-toolkit to versions using full path and also properly installing zip-based bundles (*.xo files).
Diffstat (limited to 'debian/cdbs/1/class/python-sugar.mk')
-rw-r--r--debian/cdbs/1/class/python-sugar.mk33
1 files changed, 26 insertions, 7 deletions
diff --git a/debian/cdbs/1/class/python-sugar.mk b/debian/cdbs/1/class/python-sugar.mk
index d84ade4..616ef2d 100644
--- a/debian/cdbs/1/class/python-sugar.mk
+++ b/debian/cdbs/1/class/python-sugar.mk
@@ -30,7 +30,7 @@ include debian/cdbs/1/class/python-vars.mk
include $(_cdbs_rules_path)/debhelper.mk$(_cdbs_makefile_suffix)
# Declare Build-Deps for packages using this file
-CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), python-sugar, python-sugar-toolkit, unzip
+CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), python-sugar, python-sugar-toolkit (>= 0.79.6-2), unzip
# FIXME: Resolve DEB_PYTHON_PACKAGES in build targets only
ifeq (,$(cdbs_python_pkg_check)$(DEB_PYTHON_ARCH_PACKAGES))
ifneq (, $(cdbs_python_compile_version))
@@ -55,11 +55,20 @@ DEB_PYTHON_SUGAR_MANIFEST_IGNORE_REGEX = ^debian/.*
cdbs_python_sugar_manifest_files_tmp = $(patsubst %,-or -name '%',$(DEB_PYTHON_SUGAR_MANIFEST))
cdbs_python_sugar_manifest_files = $(wordlist 2, $(words $(cdbs_python_sugar_manifest_files_tmp)), $(cdbs_python_sugar_manifest_files_tmp))
+cdbs_python_sugar_manifest_files = $(if $(DEB_PYTHON_SUGAR_MANIFEST),$(DEB_SRCDIR)/MANIFEST)
-common-configure-arch common-configure-indep:: common-configure-impl
-common-configure-impl::
- $(if $(DEB_PYTHON_SUGAR_MANIFEST),i=$(DEB_SRCDIR)/MANIFEST; if [ -e $$i ] && [ ! -e $$i.cdbs-orig ]; then mv $$i $$i.cdbs-orig; fi)
- $(if $(DEB_PYTHON_SUGAR_MANIFEST),cd $(DEB_SRCDIR) && find * -type f $(cdbs_python_sugar_manifest_files) $(if $(DEB_PYTHON_SUGAR_MANIFEST_REGEX),-regex '$(DEB_PYTHON_SUGAR_MANIFEST_REGEX)') $(if $(DEB_PYTHON_SUGAR_MANIFEST_IGNORE_REGEX),-not -regex '$(DEB_PYTHON_SUGAR_MANIFEST_IGNORE_REGEX))' > MANIFEST)
+# Preserve upstream MANIFEST files if overridden
+pre-build::
+ for i in $(cdbs_python_sugar_manifest_files); do \
+ if [ -e "$$i" ] && [ ! -e "$$i.cdbs-orig" ]; then \
+ mv "$$i" "$$i.cdbs-orig"; \
+ fi; \
+ done
+
+# Generate MANIFEST files
+common-configure-arch common-configure-indep:: $(cdbs_python_sugar_manifest_files)
+$(cdbs_python_sugar_manifest_files):
+ cd "$(dirname $@)" && find * -type f $(if $(cdbs_python_sugar_manifest_files)$(DEB_PYTHON_SUGAR_MANIFEST_REGEX),'(' $(cdbs_python_sugar_manifest_files) $(if $(DEB_PYTHON_SUGAR_MANIFEST_REGEX),$(if $(cdbs_python_sugar_manifest_files),-or )-regex '$(DEB_PYTHON_SUGAR_MANIFEST_REGEX)') ')') $(if $(DEB_PYTHON_SUGAR_MANIFEST_IGNORE_REGEX),-not -regex '$(DEB_PYTHON_SUGAR_MANIFEST_IGNORE_REGEX))' > "$@"
$(patsubst %,build/%,$(DEB_PACKAGES)) :: build/%:
for pythonver in $(cdbs_python_build_versions); do \
@@ -69,7 +78,7 @@ $(patsubst %,build/%,$(DEB_PACKAGES)) :: build/%:
$(patsubst %,install/%,$(DEB_PACKAGES)) :: install/%:
mkdir -p $(DEB_DESTDIR)usr/share/activities
for pythonver in $(cdbs_python_build_versions); do \
- /usr/bin/python$$ver setup.py install $(DEB_DESTDIR)usr; \
+ /usr/bin/python$$ver setup.py install $(DEB_DESTDIR)usr/share/activities; \
done
$(patsubst %,binary-install/%,$(DEB_PACKAGES)) :: binary-install/%:
@@ -83,7 +92,17 @@ clean::
for pythonver in $(cdbs_python_build_versions); do \
/usr/bin/python$$ver setup.py clean; \
done
- $(if $(DEB_PYTHON_SUGAR_MANIFEST),i=$(DEB_SRCDIR)/MANIFEST; if test -e $$i.cdbs-orig ; then mv -f $$i.cdbs-orig $$i; fi)
+ find "$(DEB_SRCDIR)" -maxdepth 1 -type f -name '*.xo' -exec rm -f '{}' ';'
+ -IFS="`printf '\n'`" find "$(DEB_SRCDIR)/locale" -type f \( -name '*.mo' -or -name 'activity.linfo' \) | while read path; do \
+ rm -f "$$path"; \
+ rmdir --ignore-fail-on-non-empty "`dirname "$$path"`"; \
+ done
+ -rmdir --ignore-fail-on-non-empty "$(DEB_SRCDIR)/locale"
+ for i in $(cdbs_python_sugar_manifest_files); do \
+ if test -e "$$i.cdbs-orig"; then \
+ mv -f "$$i.cdbs-orig" "$$i"; \
+ fi; \
+ done
ifeq (, $(cdbs_selected_pycompat))
echo "$(cdbs_pycompat)" >debian/pycompat
endif # use pycompat