summaryrefslogtreecommitdiff
path: root/macros.openstack-common
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2025-02-17 02:42:11 +0000
committerCoprDistGit <infra@openeuler.org>2025-02-17 02:42:11 +0000
commit065a0eb79a491f2316d79e6962dc95eb1380d390 (patch)
tree47d0938334bfdcf3d45dbb9dc104d5fcdb8ff0b9 /macros.openstack-common
parent1cef8522b3ee08aa13706e0c005f156b4191d7ed (diff)
automatic import of openstack-macrosopeneuler22.03_LTS_SP4
Diffstat (limited to 'macros.openstack-common')
-rw-r--r--macros.openstack-common25
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