1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
|
#!/usr/bin/make -f
include /usr/share/openstack-pkg-tools/pkgos.make
%:
dh $@ --buildsystem=python_distutils --with python3,sphinxdoc,systemd
override_dh_auto_clean:
python3 setup.py clean
rm -f debian/designate-common.postinst debian/designate-common.config debian/designate-api.config debian/designate-api.postinst debian/designate-common.postrm
rm -rf doc/build build *.egg-info
rm -f debian/*.init debian/*.upstart debian/*.service
find . -name '*.pyc' -exec rm {} \;
rm -f ChangeLog
rm -f AUTHORS
rm -rf .testrepository
rm -f doc/source/_static/designate.conf.sample
rm -rf debian/*.templates debian/po
override_dh_auto_build:
/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func designate-common.postinst
/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func designate-common.config
/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func designate-api.config
/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func designate-api.postinst
/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_postrm designate-common.postrm
pkgos-merge-templates designate-api designate endpoint
pkgos-merge-templates designate-common designate db rabbit ksat
override_dh_auto_install:
echo "Do nothing..."
override_dh_install:
for i in $(PYTHON3S) ; do \
python$$i setup.py install --install-layout=deb --root=$(CURDIR)/debian/tmp ; \
done
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
pkgos-dh_auto_test --no-py2 'designate\.tests\.unit\.(?!.*test_pool_manager\.test_service\.PoolManagerInitTest\.test_init_no_pool_targets.*|.*agent\.backends\.test_denominator\.DenominatorAgentBackendTestCase\.test_create_zone.*|.*agent\.backends\.test_denominator\.DenominatorAgentBackendTestCase\.test_update_zone.*)'
endif
rm -rf $(CURDIR)/debian/tmp/usr/etc
mkdir -p $(CURDIR)/debian/designate-common/usr/share/designate-common
PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslo-config-generator \
--output-file $(CURDIR)/debian/designate-common/usr/share/designate-common/designate.conf \
--wrap-width 140 \
--namespace designate.conf \
--namespace oslo.log \
--namespace oslo.messaging \
--namespace oslo.policy \
--namespace oslo.service.periodic_task \
--namespace oslo.service.service \
--namespace oslo.service.sslutils \
--namespace oslo.service.wsgi \
--namespace oslo.db \
--namespace oslo.middleware \
--namespace oslo.concurrency \
--namespace keystonemiddleware.auth_token
pkgos-readd-keystone-authtoken-missing-options $(CURDIR)/debian/designate-common/usr/share/designate-common/designate.conf keystone_authtoken designate
mkdir -p $(CURDIR)/debian/designate-common/etc/designate/policy.d
PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslopolicy-sample-generator \
--output-file $(CURDIR)/debian/designate-common/etc/designate/policy.d/00_default_policy.yaml \
--format yaml \
--namespace designate
# Use the policy.d folder
pkgos-fix-config-default $(CURDIR)/debian/designate-common/usr/share/designate-common/designate.conf oslo_policy policy_dirs /etc/designate/policy.d
pkgos-fix-config-default $(CURDIR)/debian/designate-common/usr/share/designate-common/designate.conf DEFAULT pybasedir /usr/lib/python3/dist-packages
pkgos-fix-config-default $(CURDIR)/debian/designate-common/usr/share/designate-common/designate.conf oslo_concurrency lock_path /run/lock/designate
dh_install
dh_missing --fail-missing
# Install other config files
mkdir -p $(CURDIR)/debian/designate-common/etc/designate
cp etc/designate/rootwrap.conf.sample $(CURDIR)/debian/designate-common/etc/designate/rootwrap.conf
cp -r etc/designate/rootwrap.d $(CURDIR)/debian/designate-common/etc/designate
cp etc/designate/pools.yaml.sample $(CURDIR)/debian/designate-common/usr/share/designate-common/pools.yaml
mkdir -p $(CURDIR)/debian/designate-common/usr/share/designate-common/examples
cp etc/designate/pools.yaml.* $(CURDIR)/debian/designate-common/usr/share/designate-common/examples
override_dh_sphinxdoc:
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
PYTHONPATH=. PYTHON=python3 python3 -m sphinx -b html doc/source $(CURDIR)/debian/designate-doc/usr/share/doc/designate-doc/html
dh_sphinxdoc -O--buildsystem=python_distutils
endif
override_dh_python3:
dh_python3 --shebang=/usr/bin/python3
|