[debian] update packaging to match latest cube template
authorJulien Cristau <julien.cristau@logilab.fr>
Wed, 11 Sep 2013 13:53:35 +0200
changeset 126 a7c2f1122169
parent 125 8e454581090b
child 130 7554a27b274b
[debian] update packaging to match latest cube template Use python-support to ship and clean up pyc files properly Update debhelper compat and policy version Add (no-op) build-arch target Don't ship an egg-info file
debian/compat
debian/control
debian/cubicweb-keyword.dirs
debian/cubicweb-keyword.prerm
debian/rules
--- a/debian/compat	Fri Oct 05 12:11:00 2012 +0200
+++ b/debian/compat	Wed Sep 11 13:53:35 2013 +0200
@@ -1,1 +1,1 @@
-5
+7
--- a/debian/control	Fri Oct 05 12:11:00 2012 +0200
+++ b/debian/control	Wed Sep 11 13:53:35 2013 +0200
@@ -3,15 +3,19 @@
 Priority: optional
 Maintainer: Logilab Packaging Team <contact@logilab.fr>
 Uploaders: Sylvain Thenault <sylvain.thenault@logilab.fr>
-Build-Depends: debhelper (>= 5.0.37.1), python (>=2.4), python-dev (>=2.4)
-Standards-Version: 3.8.0
+Build-Depends: debhelper (>= 7), python (>= 2.6), python-support
+Standards-Version: 3.9.3
 Homepage: http://www.cubicweb.org/project/cubicweb-keyword
+XS-Python-Version: >= 2.6
 
 Package: cubicweb-keyword
 Conflicts: cubicweb-keywords
 Replaces: cubicweb-keywords
 Architecture: all
-Depends: cubicweb-common (>= 3.15.0)
+Depends:
+ cubicweb-common (>= 3.15.0),
+ ${python:Depends},
+ ${misc:Depends},
 Description: keyword component for the Cubicweb framework
  This Cubicweb component provides classification (hierarchies of keywords)
  to classify content. See also cubicweb-tag.
--- a/debian/cubicweb-keyword.dirs	Fri Oct 05 12:11:00 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-usr/share/cubicweb/cubes/keyword
--- a/debian/cubicweb-keyword.prerm	Fri Oct 05 12:11:00 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-#!/bin/sh -e
-
-delete_pyo_pyc () {
-  find /usr/share/cubicweb/cubes/keyword -name "*.pyc" | xargs rm -f
-  find /usr/share/cubicweb/cubes/keyword -name "*.pyo" | xargs rm -f
-}
-
-
-case "$1" in
-    failed-upgrade|abort-install|abort-upgrade|disappear)
-    ;;
-    upgrade)
-    delete_pyo_pyc
-    ;;
-    remove)
-    delete_pyo_pyc
-    ;;
-    purge)
-    ;;
-
-    *)
-        echo "postrm called with unknown argument \`$1'" >&2
-        exit 1
-
-esac
-
-#DEBHELPER#
--- a/debian/rules	Fri Oct 05 12:11:00 2012 +0200
+++ b/debian/rules	Wed Sep 11 13:53:35 2013 +0200
@@ -4,19 +4,21 @@
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
-build: build-stamp
-build-stamp: 
+build: build-arch build-indep
+build-arch:
+	# Nothing to do
+
+build-indep: build-stamp
+build-stamp:
 	dh_testdir
 	python setup.py -q build
-	touch build-stamp
+	>$@
 
-clean: 
+clean:
 	dh_testdir
-	dh_testroot
-	rm -f build-stamp configure-stamp
+	rm -f build-stamp
 	rm -rf build
-	find . -name "*.pyc" | xargs rm -f
-	rm -f changelog.gz
+	find . -name "*.pyc" -delete
 	dh_clean
 
 install: build
@@ -25,31 +27,30 @@
 	dh_clean -k
 	dh_installdirs -i
 	python setup.py -q install --no-compile --prefix=debian/cubicweb-keyword/usr/
-
+	# remove generated .egg-info file
+	rm -rf debian/cubicweb-keyword/usr/lib/python*
 
 # Build architecture-independent files here.
 binary-indep: build install
 	dh_testdir
 	dh_testroot
 	dh_install -i
-#	dh_pycentral -i 
-#	dh_python -i
-#	gzip -9 -c ChangeLog > changelog.gz
 	dh_installchangelogs -i
 	dh_installexamples -i
 	dh_installdocs -i
 	dh_installman -i
+	dh_pysupport -i /usr/share/cubicweb
 	dh_link -i
 	dh_compress -i -X.py -X.ini -X.xml -Xtest
 	dh_fixperms -i
 	dh_installdeb -i
-	dh_gencontrol -i 
+	dh_gencontrol -i
 	dh_md5sums -i
 	dh_builddeb -i
 
 
 # Build architecture-dependent files here.
-binary-arch: 
+binary-arch:
 
-binary: binary-indep 
+binary: binary-indep
 .PHONY: build clean binary-arch binary-indep binary