debian.hardy/rules
author sylvain.thenault@logilab.fr
Tue, 12 May 2009 18:15:49 +0200
branchtls-sprint
changeset 1752 4b0b912ff5b7
parent 1299 dc4f774dc0af
child 2925 53bf6a2bfdfc
permissions -rwxr-xr-x
fix rtags initialization: do it at the registry level to avoid multiple initialization of the same rtag
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
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    42
	#dh_lintian XXX not before debhelper 7
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    43
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    44
	# Remove unittests directory (should be available in cubicweb-dev only)
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    45
	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
    46
	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
    47
	rm -rf debian/cubicweb-web/usr/lib/${PY_VERSION}/site-packages/cubicweb/web/test
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    48
	rm -rf debian/cubicweb-common/usr/lib/${PY_VERSION}/site-packages/cubicweb/common/test
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    49
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    50
	# cubes directory must be managed as a valid python module
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    51
	touch debian/cubicweb-common/usr/share/cubicweb/cubes/__init__.py
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    52
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    53
%: %.in
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    54
	sed "s/PY_VERSION/${PY_VERSION}/g" < $< > $@
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    55
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    56
# Build architecture-independent files here.
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    57
binary-indep: build install
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    58
	dh_testdir
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    59
	dh_testroot -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    60
	dh_pycentral -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    61
	dh_installinit -i -n --name cubicweb -u"defaults 99"
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    62
	dh_installlogrotate -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    63
	dh_installdocs -i -A README
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    64
	dh_installman -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    65
	dh_installchangelogs -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    66
	dh_link -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    67
	dh_compress -i -X.py -X.ini -X.xml
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    68
	dh_fixperms -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    69
	dh_installdeb -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    70
	dh_gencontrol  -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    71
	dh_md5sums -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    72
	dh_builddeb -i
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    73
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    74
binary-arch:
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    75
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    76
binary: binary-indep 
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    77
.PHONY: build clean binary binary-indep binary-arch
dc4f774dc0af packaging for hardy
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
diff changeset
    78