debian/rules
author Denis Laxalde <denis.laxalde@logilab.fr>
Fri, 12 Jul 2019 11:49:46 +0200
branch3.26
changeset 12697 3b48af0ec776
parent 12665 112f3c2b6f1e
child 12709 280c9db41038
permissions -rwxr-xr-x
[debian] Introduce a cubicweb-ctl3 binary package This packages conflicts with cubicweb-ctl binary which uses the python2 library. It is meant to ease upgrade of existing installation during the migration from python2 to python3: in particular, by installing cubicweb-ctl3, scripts calling "cubicweb-ctl" command should still work as before.

#!/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

export PYBUILD_NAME=cubicweb
export PYBUILD_DISABLE_python2=test
export PYBUILD_DISABLE_python3=test

%:
	dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild

override_dh_auto_build: export http_proxy=127.0.0.1:9
override_dh_auto_build: export https_proxy=127.0.0.1:9
override_dh_auto_build:
	dh_auto_build
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=. sphinx-build -N -bhtml doc/ debian/cubicweb-doc/html
endif

override_dh_installchangelogs:
	dh_installchangelogs -Xdoc/changes

override_dh_auto_install:
	dh_auto_install
	mkdir -p debian/cubicweb-ctl/usr/bin
	mv debian/python-cubicweb/usr/bin/cubicweb-ctl debian/cubicweb-ctl/usr/bin
	mkdir -p debian/cubicweb-ctl3/usr/bin
	mv debian/python3-cubicweb/usr/bin/cubicweb-ctl debian/cubicweb-ctl3/usr/bin