Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.3:Update
openstack-macros
macros.openstack
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File macros.openstack of Package openstack-macros
# Macros for building OpenStack RPMs. # # Copyright: (c) 2012 SUSE Linux Products GmbH # Cleanup unnecessary files, avoid usage of 'git' to generate timestamps and # do not use intersphinx module, it requires internet access and fix # non-executable scripts in Python module paths (sitelib/sitearch): %openstack_cleanup_prep() \ find . -name "*.placeholder" -delete -print \ find . -name "*.git*" -delete -print \ sed -i -e "s|html_last_updated_fmt = .*|html_last_updated_fmt = '%{version}'|" doc/source/conf.py || : \ sed -i -e "s|'sphinx.ext.intersphinx',\\?||" doc/source/conf.py || : \ find %{component} -type f -exec sed -i "s|^#!.*||" {} \\; \ sed -i -e "/^\\[testenv\\]/ a\\sitepackages = True" tox.ini \ # We use obs-service-git_tarballs, thus we don't need to depend on python-setuptools-git: \ sed -i -e "s|'setuptools[-_]git.*'||" setup.py \ %nil # If you only want to build man-pages, this macro is better than # 'setup.py build_sphinx': it's slow and will generate errors. Instead, # directly call sphinx-build on a copy of the man pages sources (to # avoid having other docs to build) %openstack_sphinx_build_manpages_only() \ mkdir doc/source-man \ cp -a doc/source/{conf.py,man} doc/source-man/ \ sphinx-build -b man doc/source-man/ doc/build/man/ \ rm -r doc/source-man doc/build/man/.doctrees \ %nil # Installing a test package is always done the same way: %openstack_test_package_install() \ install -d -m 755 %{buildroot}%{_localstatedir}/lib/%{name}-test \ # Some packages differ here, try to install as much as possible: \ cp -av README.rst .*tests bin etc examples run_tests.* setup.cfg setup.py smoketests test tests tools tox.ini %{buildroot}%{_localstatedir}/lib/%{name}-test || : \ rm -rf %{buildroot}%{_localstatedir}/lib/%{name}-test/%{component} \ ln -s %{python_sitelib}/%{component} %{buildroot}%{_localstatedir}/lib/%{name}-test/%{component} \ %nil # To generate self-signed certificates to be used in (demo) setups # with Apache2, you can use the following set of macros: #NOTE: This one can't really be used in practice, the "build" script doesn't know this # macro, it would have to be put into the PrjConf, which doesn't seem worth it: %openstack_apache_ssl_cert_requires() \ Requires(post): apache2-utils \ Requires(post): openssl \ Requires(post): sysconfig \ %nil %openstack_apache_ssl_cert_install() \ install -d %{buildroot}%{_sysconfdir}/apache2/ssl.{crt,csr,key} \ install -d %{buildroot}/srv/www/htdocs \ touch %{buildroot}%{_sysconfdir}/apache2/ssl.key/%{name}-{ca,server}.key \ touch %{buildroot}%{_sysconfdir}/apache2/ssl.csr/%{name}-server.csr \ touch %{buildroot}%{_sysconfdir}/apache2/ssl.crt/%{name}-{ca,server}.crt \ %nil #TODO: Parameterize so that one can set a custom domain, etc. %openstack_apache_ssl_cert_post() \ if [ ! -s %{_sysconfdir}/apache2/ssl.csr/%{name}-server.csr ] ; then \ (umask 377 ; /usr/bin/gensslcert -C %{name} -n %{name}.example.com) \ fi \ %nil %openstack_apache_ssl_cert_files() \ %ghost %{_sysconfdir}/apache2/ssl.key/%{name}-*.key \ %ghost %{_sysconfdir}/apache2/ssl.csr/%{name}-server.csr \ %ghost %{_sysconfdir}/apache2/ssl.crt/%{name}-*.crt \ %nil
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor