]> review.fuel-infra Code Review - openstack-build/cinder-build.git/blob - trusty/debian/rules
Add doc package for cinder
[openstack-build/cinder-build.git] / trusty / debian / rules
1 #!/usr/bin/make -f
2
3 # Uncomment this to turn on verbose mode.
4 #export DH_VERBOSE=1
5
6 include /usr/share/openstack-pkg-tools/pkgos.make
7
8 %:
9         dh $@  --with python2,systemd,sphinxdoc
10
11 ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
12 override_dh_auto_test:
13         rm -rf .testrepository
14         testr init && \
15         set -e && \
16         TEMP_REZ=`mktemp -t` && \
17         testr run --subunit | tee $$TEMP_REZ | subunit2pyunit; \
18         rm -f $$TEMP_REZ
19 endif
20
21 override_dh_install:
22         dh_install --fail-missing -Xbin/cinder-all
23
24 override_dh_fixperms:
25         dh_fixperms -Xcinder_tgt.conf
26
27 override_dh_clean:
28         # temporary workaround for d2to1 wonkyness
29         dh_clean -Xsetup.cfg
30         rm -f debian/*.init debian/*.service debian/*.upstart
31
32 override_dh_sphinxdoc:
33 ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
34         python setup.py build_sphinx
35         cp -rf doc/build/html $(CURDIR)/debian/cinder-doc/usr/share/doc/cinder-doc
36         dh_sphinxdoc -O--buildsystem=python_distutils
37 endif