Added doc package for Neutron
[openstack-build/neutron-build.git] / trusty / debian / rules
index 748eaad56f19aeb7dadeee14f866506128ea2d19..3712a678badabdc0f9c7667d7eba8a031c00c2a3 100755 (executable)
@@ -4,7 +4,7 @@
 #export DH_VERBOSE=1
 
 %:
-       dh $@  --with python2
+       dh $@  --with python2,sphinxdoc
 
 override_dh_install:
        dh_install --fail-missing -X/usr/etc -X/usr/bin/neutron-hyperv-agent
@@ -27,3 +27,9 @@ ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
        patch -p1 < debian/patches/fix-neutron-configuration.patch
 endif
 
+override_dh_sphinxdoc:
+ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
+        python setup.py build_sphinx
+        cp -rf doc/build/html $(CURDIR)/debian/neutron-doc/usr/share/doc/neutron-doc
+        dh_sphinxdoc -O--buildsystem=python_distutils
+endif