author | Sylvain Thénault <sylvain.thenault@logilab.fr> |
Tue, 02 Jun 2009 18:15:09 +0200 | |
changeset 2021 | 1eb93a80c127 |
parent 1927 | 801ca4fb487f |
child 2408 | 7fc87a20b829 |
permissions | -rwxr-xr-x |
0 | 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 |
|
858
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
7 |
|
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
8 |
PY_VERSION:=$(shell pyversions -d) |
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
9 |
|
0 | 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 :( |
|
858
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
15 |
# cd doc && make |
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
16 |
# FIXME cleanup and use sphinx-build as build-depends ? |
65
ef636f74bd22
[packaging] fix and update packaging
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
0
diff
changeset
|
17 |
python setup.py build |
0 | 18 |
touch build-stamp |
19 |
||
20 |
clean: |
|
21 |
dh_testdir |
|
22 |
dh_testroot |
|
23 |
rm -f build-stamp configure-stamp |
|
24 |
rm -rf build |
|
858
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
25 |
#rm -rf debian/cubicweb-*/ |
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
26 |
find . -name "*.pyc" -delete |
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
27 |
rm -f $(basename $(wildcard debian/*.in)) |
0 | 28 |
dh_clean |
29 |
||
858
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
30 |
install: build $(basename $(wildcard debian/*.in)) |
0 | 31 |
dh_testdir |
32 |
dh_testroot |
|
858
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
33 |
dh_clean |
0 | 34 |
dh_installdirs |
858
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
35 |
|
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
36 |
#python setup.py install_lib --no-compile --install-dir=debian/cubicweb-common/usr/lib/python2.4/site-packages/ |
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
37 |
python setup.py -q install --no-compile --prefix=debian/tmp/usr |
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
38 |
|
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
39 |
# Put all the python library and data in cubicweb-common |
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
40 |
# and scripts in cubicweb-server |
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
41 |
dh_install -vi |
1821 | 42 |
# cwctl in the cubicweb-ctl package |
1822 | 43 |
rm -f debian/cubicweb-common/usr/share/pyshared/cubicweb/cwctl.py |
1830 | 44 |
# hercule in the cubicweb-client package |
1823 | 45 |
rm -f debian/cubicweb-common/usr/share/pyshared/cubicweb/hercule.py |
1821 | 46 |
|
858
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
47 |
dh_lintian |
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
48 |
|
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
49 |
# Remove unittests directory (should be available in cubicweb-dev only) |
1822 | 50 |
rm -rf debian/cubicweb-server/usr/share/pyshared/cubicweb/server/test |
51 |
rm -rf debian/cubicweb-server/usr/share/pyshared/cubicweb/sobjects/test |
|
52 |
rm -rf debian/cubicweb-dev/usr/share/pyshared/cubicweb/devtools/test |
|
53 |
rm -rf debian/cubicweb-web/usr/share/pyshared/cubicweb/web/test |
|
54 |
rm -rf debian/cubicweb-common/usr/share/pyshared/cubicweb/common/test |
|
55 |
rm -rf debian/cubicweb-common/usr/share/pyshared/cubicweb/entities/test |
|
858
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
56 |
|
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
57 |
# cubes directory must be managed as a valid python module |
0 | 58 |
touch debian/cubicweb-common/usr/share/cubicweb/cubes/__init__.py |
858
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
59 |
|
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
60 |
%: %.in |
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
61 |
sed "s/PY_VERSION/${PY_VERSION}/g" < $< > $@ |
0 | 62 |
|
63 |
# Build architecture-independent files here. |
|
64 |
binary-indep: build install |
|
65 |
dh_testdir |
|
66 |
dh_testroot -i |
|
1926
6eab1787e904
Backed out changeset a9db0eb45117
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
1918
diff
changeset
|
67 |
dh_pycentral -i |
0 | 68 |
dh_installinit -i -n --name cubicweb -u"defaults 99" |
69 |
dh_installlogrotate -i |
|
70 |
dh_installdocs -i -A README |
|
71 |
dh_installman -i |
|
72 |
dh_installchangelogs -i |
|
73 |
dh_link -i |
|
74 |
dh_compress -i -X.py -X.ini -X.xml |
|
75 |
dh_fixperms -i |
|
76 |
dh_installdeb -i |
|
77 |
dh_gencontrol -i |
|
78 |
dh_md5sums -i |
|
79 |
dh_builddeb -i |
|
80 |
||
81 |
binary-arch: |
|
82 |
||
83 |
binary: binary-indep |
|
84 |
.PHONY: build clean binary binary-indep binary-arch |
|
85 |