Dominique Leuenberger 2017-06-01 14:22:58 +00:00 committed by Git OBS Bridge
commit c8bbd66fb7
2 changed files with 12 additions and 3 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon May 15 22:33:42 UTC 2017 - toddrme2178@gmail.com
- Provide a basic api version macro
-------------------------------------------------------------------
Sat Apr 8 13:52:52 UTC 2017 - hpj@urpla.net

View File

@ -49,6 +49,7 @@ for any C or C++ library.
Summary: SIP tool to create python bindings
Group: Development/Libraries/Python
Requires: %{name} = %{version}
Requires: %{name}-common = %{version}
Requires: c++_compiler
Requires: python-devel
Provides: %{name}-bin = %{version}
@ -142,15 +143,17 @@ mv %{buildroot}%{_bindir}/sip %{buildroot}%{_bindir}/sip-%{$python_bin_suffix}
mkdir -p %{buildroot}/%{_sysconfdir}/rpm/
echo "%%python_sip_api_ver %{python_sip_api}" > %{buildroot}/%{_sysconfdir}/rpm/macros.python_all-sip
%if 0%{have_python2}
echo "%%requires_python2_sip_api Requires: %{python2_prefix}-sip(api) = %{python_sip_api}" > %{buildroot}/%{_sysconfdir}/rpm/macros.%{python2_prefix}-sip
echo "%%requires_python_sip_api Requires: %{python2_prefix}-sip(api) = %{python_sip_api}" >> %{buildroot}/%{_sysconfdir}/rpm/macros.%{python2_prefix}-sip
echo "%%requires_python2_sip_api Requires: %{python2_prefix}-sip(api) = %%python_sip_api_ver" > %{buildroot}/%{_sysconfdir}/rpm/macros.%{python2_prefix}-sip
echo "%%requires_python_sip_api Requires: %{python2_prefix}-sip(api) = %%python_sip_api_ver" >> %{buildroot}/%{_sysconfdir}/rpm/macros.%{python2_prefix}-sip
%py_compile %{buildroot}%{python2_sitearch}
%endif
%if 0%{have_python3}
echo "%%requires_python3_sip_api Requires: %{python3_prefix}-sip(api) = %{python_sip_api}" > %{buildroot}/%{_sysconfdir}/rpm/macros.%{python3_prefix}-sip
echo "%%requires_python3_sip_api Requires: %{python3_prefix}-sip(api) = %%python_sip_api_ver" > %{buildroot}/%{_sysconfdir}/rpm/macros.%{python3_prefix}-sip
%py3_compile %{buildroot}%{python3_sitearch}
%endif
@ -190,6 +193,7 @@ mkdir -p %{buildroot}%{_datadir}/sip
%files -n python-sip-common
%defattr(-,root,root,-)
%doc LICENSE*
%config %{_sysconfdir}/rpm/macros.python_all-sip
%{_datadir}/sip/
%changelog