Add -doc package for Ceilometer
[openstack-build/ceilometer-build.git] / trusty / debian / rules
index a6047da044c9538e169a0069580595a1a3f8756b..ab614a1d31167722a9cc9ae85f0d1be0b4732227 100755 (executable)
@@ -8,20 +8,7 @@ export HOME="$(CURDIR)/debian/test"
 include /usr/share/openstack-pkg-tools/pkgos.make
 
 %:
-       dh $@  --with python2,systemd
-
-get-orig-source:
-       uscan --verbose --force-download --rename --destdir=../build-area
-
-ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
-override_dh_auto_test:
-       rm -rf .testrepository
-       testr init && \
-       set -e && \
-               TEMP_REZ=`mktemp -t` && \
-                       testr run --subunit 'tests\.(?!.*test_bin.*)(?!.*test_gabbi.*)' | tee $$TEMP_REZ | subunit2pyunit; \
-       rm -f $$TEMP_REZ
-endif
+       dh $@  --with python2,systemd,sphinxdoc
 
 override_dh_install:
        oslo-config-generator --output-file etc/ceilometer/ceilometer.conf.sample \
@@ -38,3 +25,11 @@ override_dh_auto_clean:
        rm -rf .testrepository
        rm -rf pbr*.egg
        rm -f debian/*.init debian/*.service debian/*.upstart
+
+override_dh_sphinxdoc:
+ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
+       PYTHONPATH=. sphinx-build -b html doc/source $(CURDIR)/debian/ceilometer-doc/usr/share/doc/ceilometer-doc/html
+       mkdir -p $(CURDIR)/debian/ceilometer-doc/usr/share/doc/ceilometer-doc/html/_static
+       touch $(CURDIR)/debian/ceilometer-doc/usr/share/doc/ceilometer-doc/html/_static/toggle.js
+       dh_sphinxdoc -O--buildsystem=python_distutils
+endif