From 9b598b3e2231c8b6a5b747b6575c7b2ebcb454fa Mon Sep 17 00:00:00 2001 From: Leigh Scott Date: Sat, 8 Jun 2019 10:58:51 +0100 Subject: [PATCH] Update spec file to comply with packaging guidelines --- libpst.spec | 35 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/libpst.spec b/libpst.spec index c52ca09..665689f 100644 --- a/libpst.spec +++ b/libpst.spec @@ -3,18 +3,15 @@ Name: libpst Version: 0.6.72 Release: 3%{?dist} License: GPLv2+ -Source: http://www.five-ten-sg.com/%{name}/packages/%{name}-%{version}.tar.gz URL: http://www.five-ten-sg.com/%{name}/ -Requires: ImageMagick libgsf -Requires: %{name}-libs = %{version}-%{release} +Source: %{url}/packages/%{name}-%{version}.tar.gz + BuildRequires: libtool gcc-c++ BuildRequires: ImageMagick gd-devel zlib-devel boost-devel libgsf-devel BuildRequires: python3 python3-devel boost-python3 boost-python3-devel - -%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} - +Requires: ImageMagick%{?_isa} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description The Libpst utilities include readpst which can convert email messages @@ -33,8 +30,9 @@ utilities. %package -n python3-%{name} -Requires: python3 -Provides: %{name}-python = %{version}-%{release} +Summary: Python bindings for libpst +Provides: %{name}-python = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} %global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}^%{python_sitearch}/_.*\.so$ @@ -46,8 +44,7 @@ from python code. %package devel Summary: Library links and header files for libpst application development -Requires: pkgconfig -Requires: %{name}-libs = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description devel The libpst-devel package contains the library links and header files @@ -80,7 +77,7 @@ libpst utilities. %build -autoreconf -v -f -i +autoreconf -fiv %configure --enable-libpst-shared \ --with-boost-python=boost_python%{python3_version_nodots} %make_build @@ -88,48 +85,40 @@ autoreconf -v -f -i %install %make_install -rm $RPM_BUILD_ROOT%{_libdir}/libpst.la -rm $RPM_BUILD_ROOT%{_libdir}/libpst.a -mv $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version} $RPM_BUILD_ROOT%{_datadir}/doc/%{name} +#Remove libtool archives. +find %{buildroot} -name '*.la' -or -name '*.a' | xargs rm -f +mv %{buildroot}%{_datadir}/doc/%{name}-%{version} %{buildroot}%{_datadir}/doc/%{name} %ldconfig_scriptlets libs %files -%defattr(-,root,root,-) %{_bindir}/* %{_mandir}/man1/* %{_mandir}/man5/* %files libs -%defattr(-,root,root,-) %{_libdir}/libpst.so.* %doc COPYING %files -n python3-%{name} -%defattr(-,root,root,-) %{python3_sitearch}/_*.so -%exclude %{python3_sitearch}/*.a -%exclude %{python3_sitearch}/*.la %files devel -%defattr(-,root,root,-) %{_libdir}/libpst.so %{_includedir}/%{name}-4/ %{_libdir}/pkgconfig/libpst.pc %files devel-doc -%defattr(-,root,root,-) %{_datadir}/doc/%{name}/devel/ %files doc -%defattr(-,root,root,-) %dir %{_datadir}/doc/%{name}/ %{_datadir}/doc/%{name}/*.html %{_datadir}/doc/%{name}/AUTHORS