debian.hardy/rules
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 27 Jan 2010 10:00:19 +0100
changeset 4394 b98fbca17e9e
parent 4268 e9bed3bc1333
child 4540 7b85f87f54f6
permissions -rwxr-xr-x
missing import
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 -q install --no-compile --prefix=debian/tmp/usr
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
	# hercule in the cubicweb-client package
53bf6a2bfdfc [debian] fix (hopefully) packaging problems with hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 1299
diff changeset
    44
	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
    45
1299
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    46
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    47
	# Remove unittests directory (should be available in cubicweb-dev only)
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/server/test
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/sobjects/test
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    50
	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
    51
	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
    52
	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
    53
	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
    54
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    55
	# cubes directory must be managed as a valid python module
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    56
	touch debian/cubicweb-common/usr/share/cubicweb/cubes/__init__.py
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    57
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    58
%: %.in
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    59
	sed "s/PY_VERSION/${PY_VERSION}/g" < $< > $@
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    60
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    61
# Build architecture-independent files here.
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    62
binary-indep: build install
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    63
	dh_testdir
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    64
	dh_testroot -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    65
	dh_pycentral -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    66
	dh_installinit -i -n --name cubicweb -u"defaults 99"
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    67
	dh_installlogrotate -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    68
	dh_installdocs -i -A README
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    69
	dh_installman -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    70
	dh_installchangelogs -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    71
	dh_link -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    72
	dh_compress -i -X.py -X.ini -X.xml
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    73
	dh_fixperms -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    74
	dh_installdeb -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    75
	dh_gencontrol  -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    76
	dh_md5sums -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    77
	dh_builddeb -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    78
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    79
binary-arch:
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: binary-indep 
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    82
.PHONY: build clean binary binary-indep binary-arch
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    83