| 1 |
|
| 2 |
|
| 3 |
include /usr/share/openstack-pkg-tools/pkgos.make |
| 4 |
|
| 5 |
export OSLO_PACKAGE_VERSION=16.0.0 |
| 6 |
export PBR_VERSION=16.0.0 |
| 7 |
|
| 8 |
%: |
| 9 |
dh $@ --buildsystem=pybuild --with python3,sphinxdoc |
| 10 |
|
| 11 |
override_dh_auto_clean: |
| 12 |
find . -iname '*.pyc' -delete |
| 13 |
rm -f debian/cyborg-common.config debian/cyborg-common.postinst |
| 14 |
rm -f debian/cyborg-api.config debian/cyborg-api.postinst debian/cyborg-common.postrm |
| 15 |
rm -f debian/*.init debian/*.service debian/*.templates |
| 16 |
rm -rf build *.egg-info $(CURDIR)/debian/po |
| 17 |
find . -iname '*.pyc' -delete |
| 18 |
for i in $$(find . -type d -iname __pycache__) ; do rm -rf $$i ; done |
| 19 |
|
| 20 |
override_dh_auto_build: |
| 21 |
/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func cyborg-common.config |
| 22 |
/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func cyborg-common.postinst |
| 23 |
/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func cyborg-api.config |
| 24 |
/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func cyborg-api.postinst |
| 25 |
/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_postrm cyborg-common.postrm |
| 26 |
pkgos-merge-templates cyborg-api cyborg endpoint |
| 27 |
pkgos-merge-templates cyborg-common cyborg db rabbit ksat |
| 28 |
|
| 29 |
override_dh_auto_install: |
| 30 |
echo "Do nothing..." |
| 31 |
|
| 32 |
override_dh_auto_test: |
| 33 |
echo "Do nothing..." |
| 34 |
|
| 35 |
override_dh_install: |
| 36 |
for i in $(PYTHON3S) ; do \ |
| 37 |
python$$i setup.py install --install-layout=deb --root $(CURDIR)/debian/tmp ; \ |
| 38 |
done |
| 39 |
|
| 40 |
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) |
| 41 |
|
| 42 |
|
| 43 |
pkgos-dh_auto_test --no-py2 'cyborg\.tests\.unit\.(?!accelerator\.drivers\.fpga\.test_base\.TestFPGADriver\.test_program)' |
| 44 |
endif |
| 45 |
|
| 46 |
mkdir -p $(CURDIR)/debian/cyborg-common/usr/share/cyborg-common |
| 47 |
PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslo-config-generator \ |
| 48 |
--output-file $(CURDIR)/debian/cyborg-common/usr/share/cyborg-common/cyborg.conf \ |
| 49 |
--namespace cyborg \ |
| 50 |
--namespace oslo.db \ |
| 51 |
--namespace oslo.messaging \ |
| 52 |
--namespace oslo.policy \ |
| 53 |
--namespace oslo.log \ |
| 54 |
--namespace oslo.service.service \ |
| 55 |
--namespace oslo.service.periodic_task \ |
| 56 |
--namespace oslo.service.sslutils \ |
| 57 |
--namespace keystonemiddleware.auth_token |
| 58 |
pkgos-readd-keystone-authtoken-missing-options $(CURDIR)/debian/cyborg-common/usr/share/cyborg-common/cyborg.conf keystone_authtoken cyborg |
| 59 |
|
| 60 |
mkdir -p $(CURDIR)/debian/cyborg-common/etc/cyborg/policy.d |
| 61 |
PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslopolicy-sample-generator \ |
| 62 |
--output-file $(CURDIR)/debian/cyborg-common/etc/cyborg/policy.d/00_default_policy.yaml \ |
| 63 |
--namespace cyborg.api |
| 64 |
|
| 65 |
mkdir -p $(CURDIR)/debian/cyborg-common/usr/share/cyborg-common |
| 66 |
cp $(CURDIR)/debian/tmp/usr/etc/cyborg/api-paste.ini $(CURDIR)/debian/cyborg-common/usr/share/cyborg-common |
| 67 |
rm -rf $(CURDIR)/debian/tmp/usr/etc |
| 68 |
|
| 69 |
dh_install |
| 70 |
dh_missing --fail-missing |
| 71 |
|
| 72 |
|
| 73 |
override_dh_sphinxdoc: |
| 74 |
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS))) |
| 75 |
|
| 76 |
set -e ; set -x ; if ! PYTHON=python3 python3 -m sphinx $(SPHINXOPTS) -b html doc/source $(CURDIR)/debian/cyborg-doc/usr/share/doc/cyborg-doc/html ; then \ |
| 77 |
cat /tmp/sphinx-err*.log ; \ |
| 78 |
exit 1 ; \ |
| 79 |
fi |
| 80 |
dh_sphinxdoc |
| 81 |
endif |
| 82 |
|
| 83 |
override_dh_installman: |
| 84 |
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS))) |
| 85 |
echo "No man pages for now" |
| 86 |
|
| 87 |
|
| 88 |
endif |
| 89 |
|
| 90 |
override_dh_python3: |
| 91 |
dh_python3 --shebang=/usr/bin/python3 |