|
1 #!/usr/bin/make -f |
|
2 # Sample debian/rules that uses debhelper. |
|
3 # GNU copyright 1997 to 1999 by Joey Hess. |
|
4 |
|
5 # Uncomment this to turn on verbose mode. |
|
6 #export DH_VERBOSE=1 |
|
7 |
|
8 PY_VERSION:=$(shell pyversions -d) |
|
9 |
|
10 build: build-stamp |
|
11 build-stamp: |
|
12 dh_testdir |
|
13 # XXX doesn't work if logilab-doctools, logilab-xml are not in build depends |
|
14 # and I can't get pbuilder find them in its chroot :( |
|
15 # cd doc && make |
|
16 # FIXME cleanup and use sphinx-build as build-depends ? |
|
17 python setup.py build |
|
18 touch build-stamp |
|
19 |
|
20 clean: |
|
21 dh_testdir |
|
22 dh_testroot |
|
23 rm -f build-stamp configure-stamp |
|
24 rm -rf build |
|
25 #rm -rf debian/cubicweb-*/ |
|
26 find . -name "*.pyc" -delete |
|
27 rm -f $(basename $(wildcard debian/*.in)) |
|
28 dh_clean |
|
29 |
|
30 install: build $(basename $(wildcard debian/*.in)) |
|
31 dh_testdir |
|
32 dh_testroot |
|
33 dh_clean |
|
34 dh_installdirs |
|
35 |
|
36 #python setup.py install_lib --no-compile --install-dir=debian/cubicweb-common/usr/lib/python2.4/site-packages/ |
|
37 python setup.py -q install --no-compile --prefix=debian/tmp/usr |
|
38 |
|
39 # Put all the python library and data in cubicweb-common |
|
40 # and scripts in cubicweb-server |
|
41 dh_install -vi |
|
42 #dh_lintian XXX not before debhelper 7 |
|
43 |
|
44 # Remove unittests directory (should be available in cubicweb-dev only) |
|
45 rm -rf debian/cubicweb-server/usr/lib/${PY_VERSION}/site-packages/cubicweb/server/test |
|
46 rm -rf debian/cubicweb-server/usr/lib/${PY_VERSION}/site-packages/cubicweb/sobjects/test |
|
47 rm -rf debian/cubicweb-web/usr/lib/${PY_VERSION}/site-packages/cubicweb/web/test |
|
48 rm -rf debian/cubicweb-common/usr/lib/${PY_VERSION}/site-packages/cubicweb/common/test |
|
49 |
|
50 # cubes directory must be managed as a valid python module |
|
51 touch debian/cubicweb-common/usr/share/cubicweb/cubes/__init__.py |
|
52 |
|
53 %: %.in |
|
54 sed "s/PY_VERSION/${PY_VERSION}/g" < $< > $@ |
|
55 |
|
56 # Build architecture-independent files here. |
|
57 binary-indep: build install |
|
58 dh_testdir |
|
59 dh_testroot -i |
|
60 dh_pycentral -i |
|
61 dh_installinit -i -n --name cubicweb -u"defaults 99" |
|
62 dh_installlogrotate -i |
|
63 dh_installdocs -i -A README |
|
64 dh_installman -i |
|
65 dh_installchangelogs -i |
|
66 dh_link -i |
|
67 dh_compress -i -X.py -X.ini -X.xml |
|
68 dh_fixperms -i |
|
69 dh_installdeb -i |
|
70 dh_gencontrol -i |
|
71 dh_md5sums -i |
|
72 dh_builddeb -i |
|
73 |
|
74 binary-arch: |
|
75 |
|
76 binary: binary-indep |
|
77 .PHONY: build clean binary binary-indep binary-arch |
|
78 |