debian.hardy/rules
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 07 May 2010 20:07:54 +0200
branchstable
changeset 5502 c342531032a1
parent 5352 be44c58d3ed9
permissions -rwxr-xr-x
[selectors] new logged_user_in_rset selector
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1299
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
     1
#!/usr/bin/make -f
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
     2
# Sample debian/rules that uses debhelper.
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
     3
# GNU copyright 1997 to 1999 by Joey Hess.
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
     4
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
     5
# Uncomment this to turn on verbose mode.
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
     6
#export DH_VERBOSE=1
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
     7
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
     8
PY_VERSION:=$(shell pyversions -d)
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
     9
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    10
build: build-stamp
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    11
build-stamp: 
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    12
	dh_testdir
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    13
	# XXX doesn't work if logilab-doctools, logilab-xml are not in build depends
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    14
	# and I can't get pbuilder find them in its chroot :(
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    15
	# cd doc && make
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    16
	# FIXME cleanup and use sphinx-build as build-depends ?
5352
be44c58d3ed9 [debian] don't use setuptools to build debian package
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4542
diff changeset
    17
	NO_SETUPTOOLS=1 python setup.py build
1299
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    18
	touch build-stamp
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    19
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    20
clean: 
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    21
	dh_testdir
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    22
	dh_testroot
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    23
	rm -f build-stamp configure-stamp
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    24
	rm -rf build
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    25
	#rm -rf debian/cubicweb-*/
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    26
	find . -name "*.pyc" -delete
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    27
	rm -f $(basename $(wildcard debian/*.in))
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    28
	dh_clean
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    29
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    30
install: build $(basename $(wildcard debian/*.in))
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    31
	dh_testdir
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    32
	dh_testroot
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    33
	dh_clean
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    34
	dh_installdirs
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    35
5352
be44c58d3ed9 [debian] don't use setuptools to build debian package
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4542
diff changeset
    36
	NO_SETUPTOOLS=1 python setup.py -q install --no-compile --prefix=debian/tmp/usr
1299
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    37
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    38
	# Put all the python library and data in cubicweb-common
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    39
	# and scripts in cubicweb-server
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    40
	dh_install -vi
2925
53bf6a2bfdfc [debian] fix (hopefully) packaging problems with hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 1299
diff changeset
    41
	# cwctl in the cubicweb-ctl package
53bf6a2bfdfc [debian] fix (hopefully) packaging problems with hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 1299
diff changeset
    42
	rm -f debian/cubicweb-common/usr/share/pyshared/cubicweb/cwctl.py
53bf6a2bfdfc [debian] fix (hopefully) packaging problems with hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 1299
diff changeset
    43
1299
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    44
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    45
	# Remove unittests directory (should be available in cubicweb-dev only)
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    46
	rm -rf debian/cubicweb-server/usr/lib/${PY_VERSION}/site-packages/cubicweb/server/test
4542
d2559cc88341 packaging fix: no more test in common. Should remove test from the hooks subpackage in rules for hardy
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 4540
diff changeset
    47
	rm -rf debian/cubicweb-server/usr/lib/${PY_VERSION}/site-packages/cubicweb/hooks/test
1299
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    48
	rm -rf debian/cubicweb-server/usr/lib/${PY_VERSION}/site-packages/cubicweb/sobjects/test
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    49
	rm -rf debian/cubicweb-web/usr/lib/${PY_VERSION}/site-packages/cubicweb/web/test
2925
53bf6a2bfdfc [debian] fix (hopefully) packaging problems with hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 1299
diff changeset
    50
	rm -rf debian/cubicweb-twisted/usr/lib/${PY_VERSION}/site-packages/cubicweb/etwist/test
53bf6a2bfdfc [debian] fix (hopefully) packaging problems with hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 1299
diff changeset
    51
	rm -rf debian/cubicweb-common/usr/lib/${PY_VERSION}/site-packages/cubicweb/ext/test
53bf6a2bfdfc [debian] fix (hopefully) packaging problems with hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 1299
diff changeset
    52
	rm -rf debian/cubicweb-common/usr/lib/${PY_VERSION}/site-packages/cubicweb/entities/test
1299
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    53
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    54
	# cubes directory must be managed as a valid python module
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    55
	touch debian/cubicweb-common/usr/share/cubicweb/cubes/__init__.py
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    56
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    57
%: %.in
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    58
	sed "s/PY_VERSION/${PY_VERSION}/g" < $< > $@
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    59
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    60
# Build architecture-independent files here.
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    61
binary-indep: build install
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    62
	dh_testdir
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    63
	dh_testroot -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    64
	dh_pycentral -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    65
	dh_installinit -i -n --name cubicweb -u"defaults 99"
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    66
	dh_installlogrotate -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    67
	dh_installdocs -i -A README
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    68
	dh_installman -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    69
	dh_installchangelogs -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    70
	dh_link -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    71
	dh_compress -i -X.py -X.ini -X.xml
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    72
	dh_fixperms -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    73
	dh_installdeb -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    74
	dh_gencontrol  -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    75
	dh_md5sums -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    76
	dh_builddeb -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    77
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    78
binary-arch:
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    79
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    80
binary: binary-indep 
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    81
.PHONY: build clean binary binary-indep binary-arch
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    82