snowball/snowball.spec

89 lines
2.4 KiB
RPMSpec

Name: snowball
Version: 0.20170814git
Release: 2mamba
Summary: Snowball compiler and stemming algorithms
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://snowballstem.org/
## GITSOURCE https://github.com/snowballstem/snowball.git master
Source: https://github.com/snowballstem/snowball.git/master/snowball-%{version}.tar.bz2
Patch0: snowball-0.20170814git-dynlibrary.patch
License: BSD
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
## AUTOBUILDREQ-END
Requires: libstemmer = %{?epoch:%epoch:}%{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
Snowball compiler and stemming algorithms.
%package -n libstemmer
Group: System/Libraries
Summary: Shared libraries for %{name}
%description -n libstemmer
This package contains shared libraries for %{name}.
%package -n libstemmer-devel
Group: Development/Libraries
Summary: Development files for %{name}
Requires: libstemmer = %{?epoch:%epoch:}%{version}-%{release}
%description -n libstemmer-devel
This package contains libraries and header files for developing applications that use %{name}.
%debug_package
%prep
%setup -q
%patch0 -p1
%build
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
for f in snowball stemwords; do
install -D -m0755 $f %{buildroot}%{_bindir}/$f
done
install -D -m0644 include/libstemmer.h %{buildroot}%{_includedir}/libstemmer.h
install -D -m0755 libstemmer.so.0.0.0 %{buildroot}%{_libdir}/libstemmer.so.0.0.0
ln -s libstemmer.so.0.0.0 %{buildroot}%{_libdir}/libstemmer.so.0
ln -s libstemmer.so.0 %{buildroot}%{_libdir}/libstemmer.so
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post -n libstemmer -p /sbin/ldconfig
%postun -n libstemmer -p /sbin/ldconfig
%files
%defattr(-,root,root)
%{_bindir}/snowball
%{_bindir}/stemwords
%files -n libstemmer
%defattr(-,root,root)
%{_libdir}/libstemmer.so.*
%doc AUTHORS COPYING
%files -n libstemmer-devel
%defattr(-,root,root)
%{_includedir}/libstemmer.h
%{_libdir}/libstemmer.so
%doc README
%changelog
* Thu Dec 17 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 0.20170814git-2mamba
- fixed permissions of shared library
* Mon Aug 14 2017 Silvan Calarco <silvan.calarco@mambasoft.it> 0.20170814git-1mamba
- package created using the webbuild interface