[debian] update packaging to match latest cube template
authorJulien Cristau <julien.cristau@logilab.fr>
Wed, 11 Sep 2013 15:24:52 +0200
changeset 67 9931202bb223
parent 66 6572f53fb956
child 69 7ff16dfb9426
[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
debian/compat
debian/control
debian/cubicweb-fresh.prerm
debian/rules
--- a/debian/compat	Wed Sep 11 15:25:30 2013 +0200
+++ b/debian/compat	Wed Sep 11 15:24:52 2013 +0200
@@ -1,1 +1,1 @@
-5
+7
--- a/debian/control	Wed Sep 11 15:25:30 2013 +0200
+++ b/debian/control	Wed Sep 11 15:24:52 2013 +0200
@@ -3,13 +3,19 @@
 Priority: optional
 Maintainer: Logilab Packaging Team <contact@logilab.fr>
 Uploaders: Sylvain Thenault <sylvain.thenault@logilab.fr>, Nicolas Chauvat <nicolas.chauvat@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-fresh
+XS-Python-Version: >= 2.6
 
 Package: cubicweb-fresh
 Architecture: all
-Depends: cubicweb-common (>= 3.10.0), cubicweb-expense (>= 0.4.4), cubicweb-workcase
+Depends:
+ cubicweb-common (>= 3.10.0),
+ cubicweb-expense (>= 0.4.4),
+ cubicweb-workcase,
+ ${python:Depends},
+ ${misc:Depends},
 Description: expense tracking application built on the CubicWeb framework
  This CubicWeb component provides an expense tracking application.
  .
--- a/debian/cubicweb-fresh.prerm	Wed Sep 11 15:25:30 2013 +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/fresh -name "*.pyc" | xargs rm -f
-  find /usr/share/cubicweb/cubes/fresh -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	Wed Sep 11 15:25:30 2013 +0200
+++ b/debian/rules	Wed Sep 11 15:24:52 2013 +0200
@@ -4,18 +4,21 @@
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
-build: build-stamp
+build: build-arch build-indep
+build-arch:
+	# Nothing to do
+
+build-indep: build-stamp
 build-stamp:
 	dh_testdir
 	NO_SETUPTOOLS=1 python setup.py -q build
-	touch build-stamp
+	>$@
 
 clean:
 	dh_testdir
-	dh_testroot
-	rm -f build-stamp configure-stamp
+	rm -f build-stamp
 	rm -rf build
-	find . -name "*.pyc" | xargs rm -f
+	find . -name "*.pyc" -delete
 	dh_clean
 
 install: build
@@ -37,6 +40,7 @@
 	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