[pkg] modernize debian packaging
authorJulien Cristau <julien.cristau@logilab.fr>
Wed, 05 Aug 2015 17:24:16 +0200
changeset 31 13fd624ad530
parent 30 62af5c706578
child 32 99684919c9a3
[pkg] modernize debian packaging
debian/compat
debian/control
debian/cubicweb-cmcicpay.prerm
debian/rules
--- a/debian/compat	Wed Aug 05 17:19:58 2015 +0200
+++ b/debian/compat	Wed Aug 05 17:24:16 2015 +0200
@@ -1,1 +1,1 @@
-5
+9
--- a/debian/control	Wed Aug 05 17:19:58 2015 +0200
+++ b/debian/control	Wed Aug 05 17:24:16 2015 +0200
@@ -2,13 +2,18 @@
 Section: web
 Priority: optional
 Maintainer: LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr>
-Build-Depends: debhelper (>= 5.0.37.1), python (>= 2.4), python-dev (>= 2.4)
-Standards-Version: 3.8.0
+Build-Depends:
+ debhelper (>= 9),
+ python (>= 2.6.5),
+Standards-Version: 3.9.6
 Homepage: http://www.cubicweb.org/project/cubicweb-cmcicpay
 
 Package: cubicweb-cmcicpay
 Architecture: all
-Depends: cubicweb-common (>= 3.15.0)
+Depends:
+ cubicweb-common (>= 3.15.0),
+ ${python:Depends},
+ ${misc:Depends},
 Description: cmcic credit card on-line payment
  CubicWeb is a semantic web application framework.
  .
--- a/debian/cubicweb-cmcicpay.prerm	Wed Aug 05 17:19:58 2015 +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/cmcicpay -name "*.pyc" | xargs rm -f
-  find /usr/share/cubicweb/cubes/cmcicpay -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 Aug 05 17:19:58 2015 +0200
+++ b/debian/rules	Wed Aug 05 17:24:16 2015 +0200
@@ -1,53 +1,7 @@
 #!/usr/bin/make -f
-# Sample debian/rules that uses debhelper.
-# GNU copyright 1997 to 1999 by Joey Hess.
-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-build: 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 -rf build
-	find . -name "*.pyc" | xargs rm -f
-	dh_clean
 
-install: build
-	dh_testdir
-	dh_testroot
-	dh_clean -k
-	dh_installdirs -i
-	NO_SETUPTOOLS=1 python setup.py -q install --no-compile --prefix=debian/cubicweb-cmcicpay/usr/
-	# remove generated .egg-info file
-	rm -rf debian/cubicweb-cmcicpay/usr/lib/python*
-
+%:
+	dh $@ --with python2
 
-# Build architecture-independent files here.
-binary-indep: build install
-	dh_testdir
-	dh_testroot
-	dh_install -i
-	dh_installchangelogs -i
-	dh_installexamples -i
-	dh_installdocs -i
-	dh_installman -i
-	dh_link -i
-	dh_compress -i -X.py -X.ini -X.xml -Xtest
-	dh_fixperms -i
-	dh_installdeb -i
-	dh_gencontrol -i
-	dh_md5sums -i
-	dh_builddeb -i
-
-
-# Build architecture-dependent files here.
-binary-arch:
-
-binary: binary-indep
-.PHONY: build clean binary-arch binary-indep binary
+override_dh_python2:
+	dh_python2 /usr/share/cubicweb