Browse Source

Merge "Refactor on nova-api-proxy.spec for opensuse"

changes/11/688011/1
Zuul 3 years ago committed by Gerrit Code Review
parent
commit
334bab12c1
  1. 6
      nova-api-proxy/opensuse/nova-api-proxy.changes
  2. 55
      nova-api-proxy/opensuse/nova-api-proxy.spec

6
nova-api-proxy/opensuse/nova-api-proxy.changes

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Oct 3 17:24:23 UTC 2019 - Erich Cordoba <erich.cordoba.malibran@intel.com> 1.0.0-1
- Refactor on spec file to remove unneeded lines.
- The %pre/%post sections were added.
-------------------------------------------------------------------
Tue Sep 17 06:45:00 UTC 2019 - Dominig ar Foll Intel Open Source <dominig.arfoll@fridu.net>

55
nova-api-proxy/opensuse/nova-api-proxy.spec

@ -9,18 +9,17 @@ Source0: %{name}-%{version}.tar.gz
%define debug_package %{nil}
BuildRequires: fdupes
BuildRequires: python-setuptools
BuildRequires: python2-pip
Requires: python-eventlet
Requires: python2-Routes
Requires: python-webob
Requires: python-paste
BuildRequires: fdupes
%description
The Nova Compute API Proxy
%define local_bindir %{_bindir}
%define local_initddir %{_sysconfdir}/rc.d/init.d
%define pythonroot %{_libdir}/python2.7/site-packages
%define local_etc_systemd %{_sysconfdir}/systemd/system/
@ -33,44 +32,60 @@ The Nova Compute API Proxy
%{__python} setup.py build
%install
%{__python} setup.py install --root=$RPM_BUILD_ROOT \
%{__python} setup.py install --root=%{buildroot} \
--install-lib=%{pythonroot} \
--prefix=%{_prefix} \
--install-data=%{_prefix}/share \
--single-version-externally-managed
install -d -m 755 %{buildroot}%{local_etc_systemd}
install -p -D -m 644 nova_api_proxy/scripts/api-proxy.service %{buildroot}%{local_etc_systemd}/api-proxy.service
install -d -m 755 %{buildroot}%{local_initddir}
install -p -D -m 755 nova_api_proxy/scripts/api-proxy %{buildroot}%{local_initddir}/api-proxy
install -d -m 755 %{buildroot}%{_sysconfdir}/rc.d/init.d
install -d -m 755 %{buildroot}%{local_proxy_conf}
install -p -D -m 600 nova_api_proxy/nova-api-proxy.conf %{buildroot}%{local_proxy_conf}/nova-api-proxy.conf
install -p -D -m 600 nova_api_proxy/api-proxy-paste.ini %{buildroot}%{local_proxy_conf}/api-proxy-paste.ini
install -p -D -m 644 nova_api_proxy/scripts/api-proxy.service \
%{buildroot}%{_unitdir}/api-proxy.service
install -p -D -m 755 nova_api_proxy/scripts/api-proxy \
%{buildroot}%{_sysconfdir}/rc.d/init.d/api-proxy
install -p -D -m 600 nova_api_proxy/nova-api-proxy.conf \
%{buildroot}%{local_proxy_conf}/nova-api-proxy.conf
install -p -D -m 600 nova_api_proxy/api-proxy-paste.ini \
%{buildroot}%{local_proxy_conf}/api-proxy-paste.ini
%fdupes %{buildroot}%{pythonroot}
%clean
rm -rf $RPM_BUILD_ROOT
rm -rf %{buildroot}
%pre
%service_add_pre api-proxy.service
%preun
%service_del_preun api-proxy.service
%post
%service_add_post api-proxy.service
%set_permissions %{pythonroot}/nova_api_proxy/api_proxy.py
%postun
%service_del_postun api-proxy.service
# Note: Package name is nova-api-proxy but import is nova_api_proxy so can't
# use '%%{name}'.
%files
%defattr(-,root,root,-)
%dir %{_sysconfdir}/proxy
%dir %{_sysconfdir}/rc.d
%dir %{_sysconfdir}/rc.d/init.d
%dir %{_sysconfdir}/systemd
%dir %{_sysconfdir}/systemd/system
%dir %{_libdir}/python2.7/site-packages/api_proxy-1.0.0-py2.7.egg-info
%doc LICENSE
%{local_bindir}/*
%{local_initddir}/*
%{local_etc_systemd}/*
%config(noreplace) %{local_proxy_conf}/nova-api-proxy.conf
%{local_proxy_conf}/api-proxy-paste.ini
%dir %{_sysconfdir}/proxy
%dir %{pythonroot}/api_proxy-%{version}-py2.7.egg-info
%dir %{pythonroot}/nova_api_proxy
%{_bindir}/nova-api-proxy
%{_unitdir}/api-proxy.service
%{_sysconfdir}/rc.d/init.d/api-proxy
%{pythonroot}/nova_api_proxy/*
%{pythonroot}/api_proxy-%{version}-py2.7.egg-info/*
%config(noreplace) %{_sysconfdir}/proxy/nova-api-proxy.conf
%config %{_sysconfdir}/proxy/api-proxy-paste.ini
%license LICENSE
%changelog

Loading…
Cancel
Save