debian/rules
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 11 Oct 2011 13:50:32 +0200
branchstable
changeset 7932 2ad26cc3b5c6
parent 7767 07c74f5585d1
child 8476 864a92b10cb8
permissions -rwxr-xr-x
[datafeed parser] only update an entity attributes when needed. Closes #1989142 This may avoid error with some entities which have immutable attributes and don't check something actually changed. Also, avoid modifying the cached item representation, this may cause pb when an item is seen several times during an import.

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

PY_VERSION:=$(shell pyversions -d)

build: build-stamp
build-stamp:
	dh_testdir
	NO_SETUPTOOLS=1 python setup.py build
	# documentation build is now made optional since it can break for old
	# distributions and we don't want to block a new release of Cubicweb
	# because of documentation issues.
	-PYTHONPATH=$(CURDIR)/.. $(MAKE) -C doc/book/en all
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp
	rm -rf build
	#rm -rf debian/cubicweb-*/
	find . -name "*.pyc" -delete
	rm -f $(basename $(wildcard debian/*.in))
	dh_clean

install: build $(basename $(wildcard debian/*.in))
	dh_testdir
	dh_testroot
	dh_clean
	dh_installdirs

	#python setup.py install_lib --no-compile --install-dir=debian/cubicweb-common/usr/lib/python2.4/site-packages/
	NO_SETUPTOOLS=1 python setup.py -q install --no-compile --prefix=debian/tmp/usr

	# Put all the python library and data in cubicweb-common
	# and scripts in cubicweb-server
	dh_install -vi
	# cwctl in the cubicweb-ctl package
	rm -f debian/cubicweb-common/usr/share/pyshared/cubicweb/cwctl.py
        # wdoc in the cubicweb-web package
	rm -rf debian/cubicweb-common/usr/share/cubicweb/cubes/shared/wdoc
	rm -rf debian/cubicweb-common/usr/share/cubicweb/cubes/shared/data
	dh_lintian

	# Remove unittests directory (should be available in cubicweb-dev only)
	rm -rf debian/cubicweb-server/usr/lib/${PY_VERSION}/site-packages/cubicweb/server/test
	rm -rf debian/cubicweb-server/usr/lib/${PY_VERSION}/site-packages/cubicweb/hooks/test
	rm -rf debian/cubicweb-server/usr/lib/${PY_VERSION}/site-packages/cubicweb/sobjects/test
	rm -rf debian/cubicweb-web/usr/lib/${PY_VERSION}/site-packages/cubicweb/web/test
	rm -rf debian/cubicweb-twisted/usr/lib/${PY_VERSION}/site-packages/cubicweb/etwist/test
	rm -rf debian/cubicweb-common/usr/lib/${PY_VERSION}/site-packages/cubicweb/ext/test
	rm -rf debian/cubicweb-common/usr/lib/${PY_VERSION}/site-packages/cubicweb/entities/test


%: %.in
	sed "s/PY_VERSION/${PY_VERSION}/g" < $< > $@

# Build architecture-independent files here.
binary-indep: build install
	dh_testdir
	dh_testroot -i
	dh_pycentral -i
	dh_installinit -i -n --name cubicweb -u"defaults 99"
	dh_installlogrotate -i
	dh_installdocs -i -A README
	dh_installman -i
	dh_installchangelogs -i
	dh_link -i
	dh_compress -i -X.py -X.ini -X.xml -X.js -X.rst
	dh_fixperms -i
	dh_installdeb -i
	dh_gencontrol  -i
	dh_md5sums -i
	dh_builddeb -i

binary-arch:

binary: binary-indep
.PHONY: build clean binary binary-indep binary-arch