vigigraph / debian / rules @ 24097891
History | View | Annotate | Download (1.72 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 |
$(MAKE) install_pkg \ |
35 |
DESTDIR=$(CURDIR)/debian/$(PKGNAME)/ \ |
36 |
PYTHON=/usr/bin/python |
37 |
/usr/bin/find vigigraph/i18n/ -name '*.mo' -o -name '*.js' -exec \ |
38 |
'mv' '{}' "debian/$(PKGNAME)/usr/share/pyshared/{}" ';' |
39 |
|
40 |
override_dh_auto_test: |
41 |
|
42 |
override_dh_installdocs: |
43 |
ifneq "$(shell dh_listpackages | grep -- -doc)" "" |
44 |
PYTHONPATH=src/ /usr/bin/sphinx-build -b html -d doc/_build/doctrees \ |
45 |
-D version=$(VERSION) -D release=$(VERSION) \ |
46 |
doc/ debian/$(PKGNAME)-doc/usr/share/doc/$(PKGNAME)-doc/html/ |
47 |
cp -f COPYING.txt README.txt debian/$(PKGNAME)-doc/usr/share/doc/$(PKGNAME)-doc/ |
48 |
endif |
49 |
|
50 |
override_dh_sphinxdoc: |
51 |
ifneq "$(shell dh_listpackages | grep -- -doc)" "" |
52 |
dh_sphinxdoc -p $(PKGNAME)-doc |
53 |
endif |
54 |
|
55 |
.PHONY: override_dh_auto_clean \ |
56 |
override_dh_auto_build \ |
57 |
override_dh_auto_install \ |
58 |
override_dh_auto_test \ |
59 |
override_dh_installdocs \ |
60 |
override_dh_sphinxdoc |