summaryrefslogtreecommitdiff
path: root/macros.openstack-common
blob: 109bdd92b711e2d25f8859c40004028818b4d9ec (plain)
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
# 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