author | Sylvain Thénault <sylvain.thenault@logilab.fr> |
Wed, 22 Jun 2011 16:34:27 +0200 | |
branch | stable |
changeset 7549 | 465009397d91 |
parent 7512 | d2de5fb0cc33 |
child 7767 | 07c74f5585d1 |
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 |
3936
0fc300eb4746
prepare 3.5.7
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
2413
diff
changeset
|
11 |
build-stamp: |
0 | 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 ? |
5354
ba9fe740688c
[debian] don't use setuptools to build debian package
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
4542
diff
changeset
|
17 |
NO_SETUPTOOLS=1 python setup.py build |
7512
d2de5fb0cc33
[packaging] Build the cubicweb-documentation package
Julien Cristau <julien.cristau@logilab.fr>
parents:
6533
diff
changeset
|
18 |
# XXX uncomment this and associated build-depends in control |
d2de5fb0cc33
[packaging] Build the cubicweb-documentation package
Julien Cristau <julien.cristau@logilab.fr>
parents:
6533
diff
changeset
|
19 |
#when necessary sphinx version is in all built distribution |
d2de5fb0cc33
[packaging] Build the cubicweb-documentation package
Julien Cristau <julien.cristau@logilab.fr>
parents:
6533
diff
changeset
|
20 |
#PYTHONPATH=$(CURDIR)/.. $(MAKE) -C doc/book/en all |
0 | 21 |
touch build-stamp |
22 |
||
3936
0fc300eb4746
prepare 3.5.7
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
2413
diff
changeset
|
23 |
clean: |
0 | 24 |
dh_testdir |
25 |
dh_testroot |
|
26 |
rm -f build-stamp configure-stamp |
|
27 |
rm -rf build |
|
858
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
28 |
#rm -rf debian/cubicweb-*/ |
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
29 |
find . -name "*.pyc" -delete |
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
30 |
rm -f $(basename $(wildcard debian/*.in)) |
0 | 31 |
dh_clean |
32 |
||
858
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
33 |
install: build $(basename $(wildcard debian/*.in)) |
0 | 34 |
dh_testdir |
35 |
dh_testroot |
|
858
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
36 |
dh_clean |
0 | 37 |
dh_installdirs |
858
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 |
#python setup.py install_lib --no-compile --install-dir=debian/cubicweb-common/usr/lib/python2.4/site-packages/ |
5354
ba9fe740688c
[debian] don't use setuptools to build debian package
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
4542
diff
changeset
|
40 |
NO_SETUPTOOLS=1 python setup.py -q install --no-compile --prefix=debian/tmp/usr |
858
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
41 |
|
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
42 |
# 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
|
43 |
# and scripts in cubicweb-server |
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
44 |
dh_install -vi |
1821 | 45 |
# cwctl in the cubicweb-ctl package |
1822 | 46 |
rm -f debian/cubicweb-common/usr/share/pyshared/cubicweb/cwctl.py |
6532
6096018ac6b7
[debian] cleanup -common package
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
6520
diff
changeset
|
47 |
# wdoc in the cubicweb-web package |
6096018ac6b7
[debian] cleanup -common package
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
6520
diff
changeset
|
48 |
rm -rf debian/cubicweb-common/usr/share/cubicweb/cubes/shared/wdoc |
6096018ac6b7
[debian] cleanup -common package
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
6520
diff
changeset
|
49 |
rm -rf debian/cubicweb-common/usr/share/cubicweb/cubes/shared/data |
858
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
50 |
dh_lintian |
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
51 |
|
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
52 |
# Remove unittests directory (should be available in cubicweb-dev only) |
2408
7fc87a20b829
properly(?) remove test from standard packages
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1927
diff
changeset
|
53 |
rm -rf debian/cubicweb-server/usr/lib/${PY_VERSION}/site-packages/cubicweb/server/test |
2835
04034421b072
[hooks] major refactoring:
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2413
diff
changeset
|
54 |
rm -rf debian/cubicweb-server/usr/lib/${PY_VERSION}/site-packages/cubicweb/hooks/test |
2408
7fc87a20b829
properly(?) remove test from standard packages
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1927
diff
changeset
|
55 |
rm -rf debian/cubicweb-server/usr/lib/${PY_VERSION}/site-packages/cubicweb/sobjects/test |
7fc87a20b829
properly(?) remove test from standard packages
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1927
diff
changeset
|
56 |
rm -rf debian/cubicweb-web/usr/lib/${PY_VERSION}/site-packages/cubicweb/web/test |
2413
b1bea4cab594
properly remove tests from packages
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2412
diff
changeset
|
57 |
rm -rf debian/cubicweb-twisted/usr/lib/${PY_VERSION}/site-packages/cubicweb/etwist/test |
b1bea4cab594
properly remove tests from packages
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2412
diff
changeset
|
58 |
rm -rf debian/cubicweb-common/usr/lib/${PY_VERSION}/site-packages/cubicweb/ext/test |
2408
7fc87a20b829
properly(?) remove test from standard packages
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1927
diff
changeset
|
59 |
rm -rf debian/cubicweb-common/usr/lib/${PY_VERSION}/site-packages/cubicweb/entities/test |
858
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
60 |
|
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
61 |
|
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
62 |
%: %.in |
e6ae125d5903
reorganize debian packages (Closes: #1168)
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
275
diff
changeset
|
63 |
sed "s/PY_VERSION/${PY_VERSION}/g" < $< > $@ |
0 | 64 |
|
65 |
# Build architecture-independent files here. |
|
66 |
binary-indep: build install |
|
67 |
dh_testdir |
|
68 |
dh_testroot -i |
|
1926
6eab1787e904
Backed out changeset a9db0eb45117
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
1918
diff
changeset
|
69 |
dh_pycentral -i |
0 | 70 |
dh_installinit -i -n --name cubicweb -u"defaults 99" |
71 |
dh_installlogrotate -i |
|
72 |
dh_installdocs -i -A README |
|
73 |
dh_installman -i |
|
74 |
dh_installchangelogs -i |
|
75 |
dh_link -i |
|
76 |
dh_compress -i -X.py -X.ini -X.xml |
|
77 |
dh_fixperms -i |
|
78 |
dh_installdeb -i |
|
79 |
dh_gencontrol -i |
|
80 |
dh_md5sums -i |
|
81 |
dh_builddeb -i |
|
82 |
||
83 |
binary-arch: |
|
84 |
||
3936
0fc300eb4746
prepare 3.5.7
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
2413
diff
changeset
|
85 |
binary: binary-indep |
0 | 86 |
.PHONY: build clean binary binary-indep binary-arch |
87 |