diff options
Diffstat (limited to 'macros.openstack-common')
-rw-r--r-- | macros.openstack-common | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/macros.openstack-common b/macros.openstack-common new file mode 100644 index 0000000..109bdd9 --- /dev/null +++ b/macros.openstack-common @@ -0,0 +1,25 @@ +# Macros for building OpenStack RPMs. +# + +# +# OpenStack macros +# + +# the directory where the test files will be installed +%openstack_test_package_dir %{_localstatedir}/lib/%{name}-test + +# Installing a test package is always done the same way. +# the macro takes a single parameter - the component which is the +# name that is installed into site-packages +# e.g. for python-novaclient the name is novaclient +%openstack_test_package_install() \ +install -d -m 755 %{buildroot}/%{openstack_test_package_dir} \ +# Some packages differ here, try to install as much as possible: \ +cp -av \\\ + README.md README.rst PKG-INFO .testr.conf .stestr.conf .*tests bin \\\ + etc examples run_tests.* setup.cfg setup.py \\\ + smoketests static test tests tools tox.ini \\\ + %{buildroot}/%{openstack_test_package_dir} || : \ +rm -rf %{buildroot}/%{openstack_test_package_dir}/%1 \ +ln -s %{python2_sitelib}/%1 %{buildroot}/%{openstack_test_package_dir}/%1 \ +%nil |