debian.hardy/rules
author Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
Tue, 17 Nov 2009 11:48:36 +0100
branchstable
changeset 3871 983acb2b303b
parent 2925 53bf6a2bfdfc
child 4268 e9bed3bc1333
permissions -rwxr-xr-x
merge
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 ?
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    17
	python setup.py build
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
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    36
	#python setup.py install_lib --no-compile --install-dir=debian/cubicweb-common/usr/lib/python2.4/site-packages/
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    37
	python setup.py -q install --no-compile --prefix=debian/tmp/usr
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    38
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    39
	# Put all the python library and data in cubicweb-common
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    40
	# and scripts in cubicweb-server
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    41
	dh_install -vi
2925
53bf6a2bfdfc [debian] fix (hopefully) packaging problems with hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 1299
diff changeset
    42
	# cwctl in the cubicweb-ctl package
53bf6a2bfdfc [debian] fix (hopefully) packaging problems with hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 1299
diff changeset
    43
	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
    44
	# hercule in the cubicweb-client package
53bf6a2bfdfc [debian] fix (hopefully) packaging problems with hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 1299
diff changeset
    45
	rm -f debian/cubicweb-common/usr/share/pyshared/cubicweb/hercule.py
53bf6a2bfdfc [debian] fix (hopefully) packaging problems with hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 1299
diff changeset
    46
1299
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    47
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    48
	# Remove unittests directory (should be available in cubicweb-dev only)
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    49
	rm -rf debian/cubicweb-server/usr/lib/${PY_VERSION}/site-packages/cubicweb/server/test
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    50
	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
    51
	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
    52
	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
    53
	rm -rf debian/cubicweb-common/usr/lib/${PY_VERSION}/site-packages/cubicweb/ext/test
1299
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    54
	rm -rf debian/cubicweb-common/usr/lib/${PY_VERSION}/site-packages/cubicweb/common/test
2925
53bf6a2bfdfc [debian] fix (hopefully) packaging problems with hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 1299
diff changeset
    55
	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
    56
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    57
	# cubes directory must be managed as a valid python module
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    58
	touch debian/cubicweb-common/usr/share/cubicweb/cubes/__init__.py
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
%: %.in
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    61
	sed "s/PY_VERSION/${PY_VERSION}/g" < $< > $@
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    62
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    63
# Build architecture-independent files here.
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    64
binary-indep: build install
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    65
	dh_testdir
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    66
	dh_testroot -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    67
	dh_pycentral -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    68
	dh_installinit -i -n --name cubicweb -u"defaults 99"
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    69
	dh_installlogrotate -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    70
	dh_installdocs -i -A README
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    71
	dh_installman -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    72
	dh_installchangelogs -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    73
	dh_link -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    74
	dh_compress -i -X.py -X.ini -X.xml
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    75
	dh_fixperms -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    76
	dh_installdeb -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    77
	dh_gencontrol  -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    78
	dh_md5sums -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    79
	dh_builddeb -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    80
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    81
binary-arch:
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    82
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    83
binary: binary-indep 
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    84
.PHONY: build clean binary binary-indep binary-arch
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    85