| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
include /usr/share/openstack-pkg-tools/pkgos.make |
| 4 |
|
| 5 |
%: |
| 6 |
dh $@ --buildsystem=pybuild --with python3,sphinxdoc |
| 7 |
|
| 8 |
override_dh_auto_clean: |
| 9 |
python3 setup.py clean |
| 10 |
rm -rf build .stestr *.egg-info doc/source/_static/config_samples .pybuild |
| 11 |
rm -f debian/networking-bagpipe-bgp-agent.init debian/networking-bagpipe-bgp-agent.service |
| 12 |
find . -iname '*.pyc' -delete |
| 13 |
for i in $$(find . -type d -iname __pycache__) ; do rm -rf $$i ; done |
| 14 |
|
| 15 |
override_dh_auto_build: |
| 16 |
echo "Do nothing..." |
| 17 |
|
| 18 |
override_dh_auto_install: |
| 19 |
echo "Do nothing..." |
| 20 |
|
| 21 |
override_dh_auto_test: |
| 22 |
echo "Do nothing..." |
| 23 |
|
| 24 |
override_dh_install: |
| 25 |
for i in $(PYTHON3S) ; do \ |
| 26 |
python$$i setup.py install --install-layout=deb --root $(CURDIR)/debian/tmp ; \ |
| 27 |
done |
| 28 |
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) |
| 29 |
# echo "Disabled tests until networking-bgpvpn is in Debian..." |
| 30 |
pkgos-dh_auto_test --no-py2 'networking_bagpipe\.tests\.unit.*' |
| 31 |
endif |
| 32 |
|
| 33 |
mkdir -p $(CURDIR)/debian/networking-bagpipe-bgp-agent/etc/bagpipe-bgp |
| 34 |
PYTHON=python3 PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages \ |
| 35 |
oslo-config-generator \ |
| 36 |
--output-file $(CURDIR)/debian/networking-bagpipe-bgp-agent/etc/bagpipe-bgp/bgp.conf \ |
| 37 |
--wrap-width 140 \ |
| 38 |
--namespace networking_bagpipe.api \ |
| 39 |
--namespace networking_bagpipe.bgp_common \ |
| 40 |
--namespace networking_bagpipe.run_command \ |
| 41 |
--namespace networking_bagpipe.dataplane.ipvpn \ |
| 42 |
--namespace networking_bagpipe.dataplane.evpn |
| 43 |
|
| 44 |
PYTHON=python3 PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages \ |
| 45 |
oslo-config-generator \ |
| 46 |
--output-file $(CURDIR)/debian/networking-bagpipe-bgp-agent/etc/bagpipe-bgp/dataplane-evpn-linux-vxlan.conf \ |
| 47 |
--wrap-width 140 \ |
| 48 |
--namespace networking_bagpipe.dataplane.evpn.linux_vxlan |
| 49 |
|
| 50 |
PYTHON=python3 PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages \ |
| 51 |
oslo-config-generator \ |
| 52 |
--output-file $(CURDIR)/debian/networking-bagpipe-bgp-agent/etc/bagpipe-bgp/dataplane-ipvpn-mpls-linux.conf \ |
| 53 |
--wrap-width 140 \ |
| 54 |
--namespace networking_bagpipe.dataplane.ipvpn.mpls_linux |
| 55 |
|
| 56 |
PYTHON=python3 PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages \ |
| 57 |
oslo-config-generator \ |
| 58 |
--output-file $(CURDIR)/debian/networking-bagpipe-bgp-agent/etc/bagpipe-bgp/dataplane-ipvpn-mpls-ovs.conf \ |
| 59 |
--wrap-width 140 \ |
| 60 |
--namespace networking_bagpipe.dataplane.ipvpn.mpls_ovs |
| 61 |
|
| 62 |
PYTHON=python3 PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages \ |
| 63 |
oslo-config-generator \ |
| 64 |
--output-file $(CURDIR)/debian/networking-bagpipe-bgp-agent/etc/bagpipe-bgp/neutron-agent.ini \ |
| 65 |
--wrap-width 140 \ |
| 66 |
--namespace networking_bagpipe.bagpipe_bgp_agent |
| 67 |
|
| 68 |
dh_install |
| 69 |
rm -rf $(CURDIR)/debian/tmp/etc $(CURDIR)/debian/tmp/usr/etc |
| 70 |
mkdir -p $(CURDIR)/debian/networking-bagpipe-bgp-agent/etc/bagpipe-bgp |
| 71 |
cp -r etc/bagpipe-bgp/rootwrap.conf etc/bagpipe-bgp/rootwrap.d $(CURDIR)/debian/networking-bagpipe-bgp-agent/etc/bagpipe-bgp/ |
| 72 |
dh_missing --fail-missing |
| 73 |
|
| 74 |
override_dh_sphinxdoc: |
| 75 |
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS))) |
| 76 |
PYTHON=python3 python3 -m sphinx -b html doc/source debian/networking-bagpipe-doc/usr/share/doc/networking-bagpipe-doc/html |
| 77 |
dh_sphinxdoc -O--buildsystem=python_distutil |
| 78 |
endif |
| 79 |
|
| 80 |
override_dh_python3: |
| 81 |
dh_python3 --shebang=/usr/bin/python3 |