- # Unpatch quantum configuration to fixup tests which conflict
- # with a core_plugin being set.
- patch -p1 -R < debian/patches/fix-neutron-configuration.patch
- # Set a reasonable level of concurrency
- ./run_tests.sh -N -P --concurrency=4
- # Patch configuration file after testing
- patch -p1 < debian/patches/fix-neutron-configuration.patch
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+ # Unpatch quantum configuration to fixup tests which conflict
+ # with a core_plugin being set.
+ patch -p1 -R < debian/patches/fix-neutron-configuration.patch
+ # Set a reasonable level of concurrency
+ ./run_tests.sh -N -P --concurrency=4
+ # Patch configuration file after testing
+ 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