Remove stuff not applicable in F26+

The spec file in F25 is going to be quite different, so commits
cannot be cherry-picked from one branch to the other anyway, so
let's just maximally simplify the spec file.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2017-08-19 13:05:41 -04:00
parent e1b565f728
commit 063034b9fc

View File

@ -3,23 +3,13 @@ Name: libpst
Version: 0.6.71 Version: 0.6.71
Release: 4%{?dist} Release: 4%{?dist}
License: GPLv2+ License: GPLv2+
Group: Applications/Productivity
Source: http://www.five-ten-sg.com/%{name}/packages/%{name}-%{version}.tar.gz Source: http://www.five-ten-sg.com/%{name}/packages/%{name}-%{version}.tar.gz
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
URL: http://www.five-ten-sg.com/%{name}/ URL: http://www.five-ten-sg.com/%{name}/
Requires: ImageMagick libgsf Requires: ImageMagick libgsf
Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release}
BuildRequires: libtool BuildRequires: libtool
BuildRequires: ImageMagick gd-devel zlib-devel boost-devel libgsf-devel BuildRequires: ImageMagick gd-devel zlib-devel boost-devel libgsf-devel
%if 0%{?fedora} > 25
BuildRequires: python2-devel BuildRequires: python2-devel
%else
BuildRequires: python-devel
%endif
%{!?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)")}
%description %description
The Libpst utilities include readpst which can convert email messages The Libpst utilities include readpst which can convert email messages
@ -31,46 +21,23 @@ Summation.
%package libs %package libs
Summary: Shared library used by the pst utilities Summary: Shared library used by the pst utilities
Group: Development/Libraries
%description libs %description libs
The libpst-libs package contains the shared library used by the pst The libpst-libs package contains the shared library used by the pst
utilities. utilities.
%if 0%{?fedora} > 25
%package python2 %package python2
Requires: python2
%else
%package python
Requires: python
%endif
Summary: Python bindings for libpst Summary: Python bindings for libpst
Group: Development/Libraries
Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release}
%if 0%{?fedora} >= 20
%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}^%{python_sitearch}/_.*\.so$
%else
%{?filter_setup:
%filter_provides_in %{python_sitearch}/_.*\.so$
%filter_setup
}
%endif
%if 0%{?fedora} > 25
%description python2 %description python2
%else
%description python
%endif
The libpst-python package allows you to use the libpst shared object The libpst-python package allows you to use the libpst shared object
from python code. from python code.
%package devel %package devel
Summary: Library links and header files for libpst application development Summary: Library links and header files for libpst application development
Group: Development/Libraries
Requires: pkgconfig Requires: pkgconfig
Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release}
@ -83,7 +50,6 @@ utilities.
%package devel-doc %package devel-doc
Summary: Documentation for libpst.so for libpst application development Summary: Documentation for libpst.so for libpst application development
Group: Documentation
Requires: %{name}-doc = %{version}-%{release} Requires: %{name}-doc = %{version}-%{release}
%description devel-doc %description devel-doc
@ -93,7 +59,6 @@ documentation for the libpst.so shared library.
%package doc %package doc
Summary: Documentation for the pst utilities in html format Summary: Documentation for the pst utilities in html format
Group: Documentation
%description doc %description doc
The libpst-doc package contains the html documentation for the pst The libpst-doc package contains the html documentation for the pst
@ -109,69 +74,49 @@ libpst utilities.
%build %build
autoreconf -v -f -i autoreconf -v -f -i
%configure --enable-libpst-shared %configure --enable-libpst-shared
make %{?_smp_mflags} %make_build
%install %install
rm -rf $RPM_BUILD_ROOT %make_install
make DESTDIR=$RPM_BUILD_ROOT install
rm $RPM_BUILD_ROOT%{_libdir}/libpst.la rm $RPM_BUILD_ROOT%{_libdir}/libpst.la
rm $RPM_BUILD_ROOT%{_libdir}/libpst.a rm $RPM_BUILD_ROOT%{_libdir}/libpst.a
mv $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version} $RPM_BUILD_ROOT%{_datadir}/doc/%{name} mv $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version} $RPM_BUILD_ROOT%{_datadir}/doc/%{name}
%clean
rm -rf $RPM_BUILD_ROOT
%post libs -p /sbin/ldconfig %post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig
%files %files
%defattr(-,root,root,-)
%{_bindir}/* %{_bindir}/*
%{_mandir}/man1/* %{_mandir}/man1/*
%{_mandir}/man5/* %{_mandir}/man5/*
%files libs %files libs
%defattr(-,root,root,-)
%{_libdir}/libpst.so.* %{_libdir}/libpst.so.*
%doc COPYING %doc COPYING
%if 0%{?fedora} > 25
%files python2 %files python2
%defattr(-,root,root,-)
%{python2_sitearch}/_*.so %{python2_sitearch}/_*.so
%exclude %{python2_sitearch}/*.a %exclude %{python2_sitearch}/*.a
%exclude %{python2_sitearch}/*.la %exclude %{python2_sitearch}/*.la
%else
%files python
%defattr(-,root,root,-)
%{python_sitearch}/_*.so
%exclude %{python_sitearch}/*.a
%exclude %{python_sitearch}/*.la
%endif
%files devel %files devel
%defattr(-,root,root,-)
%{_libdir}/libpst.so %{_libdir}/libpst.so
%{_includedir}/%{name}-4/ %{_includedir}/%{name}-4/
%{_libdir}/pkgconfig/libpst.pc %{_libdir}/pkgconfig/libpst.pc
%files devel-doc %files devel-doc
%defattr(-,root,root,-)
%{_datadir}/doc/%{name}/devel/ %{_datadir}/doc/%{name}/devel/
%files doc %files doc
%defattr(-,root,root,-)
%dir %{_datadir}/doc/%{name}/ %dir %{_datadir}/doc/%{name}/
%{_datadir}/doc/%{name}/*.html %{_datadir}/doc/%{name}/*.html
%{_datadir}/doc/%{name}/AUTHORS %{_datadir}/doc/%{name}/AUTHORS