vigigraph / debian / rules @ bc2e4aba
History | View | Annotate | Download (1.85 KB)
1 |
#!/usr/bin/make -f |
---|---|
2 |
# -*- makefile -*- |
3 |
|
4 |
# Uncomment this to turn on verbose mode. |
5 |
export DH_VERBOSE=1 |
6 |
export DH_OPTIONS=-v |
7 |
|
8 |
PKGNAME=$(shell printf "%s" `dpkg-parsechangelog | grep '^Source:' | cut -d: -f2-`) |
9 |
VERSION=$(shell printf "%s" `dpkg-parsechangelog | grep '^Version:' | cut -d: -f2-`) |
10 |
|
11 |
ifeq "$(NOPY)" "" |
12 |
helper=python2 |
13 |
else |
14 |
helper=python2_nopy |
15 |
endif |
16 |
|
17 |
%: |
18 |
dh $@ --with $(helper),sphinxdoc |
19 |
|
20 |
override_dh_auto_clean: |
21 |
dh_auto_clean -- buildclean |
22 |
$(RM) -rf vigilo_vigigraph.egg-info |
23 |
find vigigraph/i18n/ -name '*.mo' -o -name '*.js' -delete |
24 |
ifneq "$(NOPY)" "" |
25 |
-rm -f $(CURDIR)/debian/docs $(CURDIR)/debian/copyright |
26 |
endif |
27 |
|
28 |
override_dh_auto_build: |
29 |
/usr/bin/python setup.py compile_catalog |
30 |
$(MAKE) deployment/logrotate.conf deployment/settings.ini \ |
31 |
deployment/vigigraph.conf deployment/vigigraph.wsgi |
32 |
|
33 |
override_dh_auto_install: |
34 |
/usr/bin/python setup.py install --root=debian/$(PKGNAME) \ |
35 |
--single-version-externally-managed \ |
36 |
--install-layout=deb |
37 |
mkdir -p debian/$(PKGNAME)/var/log/vigilo/vigigraph/ |
38 |
mkdir -p debian/$(PKGNAME)/var/cache/vigilo/sessions/ |
39 |
find vigigraph/i18n/ -name '*.mo' -o -name '*.js' -exec \ |
40 |
'mv' '{}' "debian/$(PKGNAME)/usr/share/pyshared/{}" ';' |
41 |
|
42 |
override_dh_auto_test: |
43 |
|
44 |
override_dh_installdocs: |
45 |
ifneq "$(shell dh_listpackages | grep -- -doc)" "" |
46 |
PYTHONPATH=src/ /usr/bin/sphinx-build -b html -d doc/_build/doctrees \ |
47 |
-D version=$(VERSION) -D release=$(VERSION) \ |
48 |
doc/ debian/$(PKGNAME)-doc/usr/share/doc/$(PKGNAME)-doc/html/ |
49 |
cp -f COPYING.txt README.txt debian/$(PKGNAME)-doc/usr/share/doc/$(PKGNAME)-doc/ |
50 |
endif |
51 |
|
52 |
override_dh_sphinxdoc: |
53 |
ifneq "$(shell dh_listpackages | grep -- -doc)" "" |
54 |
dh_sphinxdoc -p $(PKGNAME)-doc |
55 |
endif |
56 |
|
57 |
.PHONY: override_dh_auto_clean \ |
58 |
override_dh_auto_build \ |
59 |
override_dh_auto_install \ |
60 |
override_dh_auto_test \ |
61 |
override_dh_installdocs \ |
62 |
override_dh_sphinxdoc |