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 NO_SETUPTOOLS=1 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 NO_SETUPTOOLS=1 python setup.py -q install --no-compile --prefix=debian/tmp/usr |
|
37 |
|
38 # Put all the python library and data in cubicweb-common |
|
39 # and scripts in cubicweb-server |
|
40 dh_install -vi |
|
41 # cwctl in the cubicweb-ctl package |
|
42 rm -f debian/cubicweb-common/usr/share/pyshared/cubicweb/cwctl.py |
|
43 |
|
44 |
|
45 # Remove unittests directory (should be available in cubicweb-dev only) |
|
46 rm -rf debian/cubicweb-server/usr/lib/${PY_VERSION}/site-packages/cubicweb/server/test |
|
47 rm -rf debian/cubicweb-server/usr/lib/${PY_VERSION}/site-packages/cubicweb/hooks/test |
|
48 rm -rf debian/cubicweb-server/usr/lib/${PY_VERSION}/site-packages/cubicweb/sobjects/test |
|
49 rm -rf debian/cubicweb-web/usr/lib/${PY_VERSION}/site-packages/cubicweb/web/test |
|
50 rm -rf debian/cubicweb-twisted/usr/lib/${PY_VERSION}/site-packages/cubicweb/etwist/test |
|
51 rm -rf debian/cubicweb-common/usr/lib/${PY_VERSION}/site-packages/cubicweb/ext/test |
|
52 rm -rf debian/cubicweb-common/usr/lib/${PY_VERSION}/site-packages/cubicweb/entities/test |
|
53 |
|
54 # cubes directory must be managed as a valid python module |
|
55 touch debian/cubicweb-common/usr/share/cubicweb/cubes/__init__.py |
|
56 |
|
57 %: %.in |
|
58 sed "s/PY_VERSION/${PY_VERSION}/g" < $< > $@ |
|
59 |
|
60 # Build architecture-independent files here. |
|
61 binary-indep: build install |
|
62 dh_testdir |
|
63 dh_testroot -i |
|
64 dh_pycentral -i |
|
65 dh_installinit -i -n --name cubicweb -u"defaults 99" |
|
66 dh_installlogrotate -i |
|
67 dh_installdocs -i -A README |
|
68 dh_installman -i |
|
69 dh_installchangelogs -i |
|
70 dh_link -i |
|
71 dh_compress -i -X.py -X.ini -X.xml |
|
72 dh_fixperms -i |
|
73 dh_installdeb -i |
|
74 dh_gencontrol -i |
|
75 dh_md5sums -i |
|
76 dh_builddeb -i |
|
77 |
|
78 binary-arch: |
|
79 |
|
80 binary: binary-indep |
|
81 .PHONY: build clean binary binary-indep binary-arch |
|
82 |
|