Update to 4.3

- Add GPG signature check for the source
- Fix pycached stuff
- Remove old python_provide macro
- Remove ldconfig_scriptlets macro
- Only use VFST for now, HFST can be provided in a later update
This commit is contained in:
Ville-Pekka Vainio 2021-01-28 17:30:27 +02:00
parent b550d2b835
commit 374ff8b09f

View File

@ -1,21 +1,29 @@
%global _hardened_build 1
Name: libvoikko
Version: 4.1.1
Release: 9%{?dist}
Version: 4.3
Release: 2%{?dist}
Summary: Voikko is a library for spellcheckers and hyphenators
License: GPLv2+
URL: http://voikko.puimula.org
URL: https://voikko.puimula.org
# The usual format of stable release URLs
Source0: http://www.puimula.org/voikko-sources/%{name}/%{name}-%{version}.tar.gz
Source0: https://www.puimula.org/voikko-sources/%{name}/%{name}-%{version}.tar.gz
# The usual format of test release URLs
#Source0: http://www.puimula.org/htp/testing/%%{name}-%%{version}rc1.tar.gz
#Source0: https://www.puimula.org/htp/testing/%%{name}-%%{version}rc1.tar.gz
# See https://voikko.puimula.org/sources.html for the key fingerprint.
# I did
# gpg --recv-keys "AC5D 65F1 0C85 96D7 E2DA E263 3D30 9B60 4AE3 942E"
# and then
# gpg2 --export --export-options export-minimal AC5D65F10C8596D7E2DAE2633D309B604AE3942E > gpgkey-AC5D65F10C8596D7E2DAE2633D309B604AE3942E.gpg
Source1: http://www.puimula.org/voikko-sources/%{name}/%{name}-%{version}.tar.gz.asc
Source2: gpgkey-AC5D65F10C8596D7E2DAE2633D309B604AE3942E.gpg
BuildRequires: gcc-c++
BuildRequires: python3-devel
BuildRequires: make
# Require the Finnish morphology because Finnish is currently the only language
# supported by libvoikko in Fedora.
Requires: malaga-suomi-voikko
BuildRequires: gnupg2
%description
This is libvoikko, library for spellcheckers and hyphenators using Malaga
@ -51,7 +59,6 @@ scripts.
Summary: Python interface to %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%{?python_provide:%python_provide python3-libvoikko}
%description -n python3-libvoikko
Python interface to libvoikko, library of Finnish language tools.
@ -59,18 +66,20 @@ This module can be used to perform various natural language analysis
tasks on Finnish text.
%prep
%setup -q
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%autosetup
%build
# The dictionary path must be the same where malaga-suomi-voikko is installed
# Use malaga for now, no hfst or vfst. We need to package foma for the vfst dictionaries.
%configure --with-dictionary-path=%{_libdir}/voikko --disable-hfst --disable-vfst --disable-buildtools --enable-malaga
# Use vfst for now, no hfst yet. We need to package hfst-ospell for the hfst dictionaries.
# Use /usr/lib/voikko for the dictionaries, this is where the voikko-fi package will put them.
%configure --disable-hfst --with-dictionary-path=/usr/lib/voikko
# Remove rpath,
# https://fedoraproject.org/wiki/Packaging/Guidelines#Removing_Rpath
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags} CXXFLAGS="$CXXFLAGS"
%make_build CXXFLAGS="$CXXFLAGS"
%install
@ -82,34 +91,42 @@ find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} ';'
install -d $RPM_BUILD_ROOT%{python3_sitelib}
install -pm 0644 python/libvoikko.py $RPM_BUILD_ROOT%{python3_sitelib}/
%ldconfig_scriptlets
%files
%doc ChangeLog COPYING README
%{_libdir}/*.so.*
%{_libdir}/libvoikko.so.1*
%files -n voikko-tools
%{_bindir}/voikkospell
%{_bindir}/voikkohyphenate
%{_bindir}/voikkogc
%{_bindir}/voikkovfstc
%{_mandir}/man1/voikkohyphenate.1*
%{_mandir}/man1/voikkospell.1*
%{_mandir}/man1/voikkogc.1*
%{_mandir}/man1/voikkovfstc.1*
%files devel
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/libvoikko.so
%{_libdir}/pkgconfig/libvoikko.pc
%files -n python3-libvoikko
%{python3_sitelib}/%{name}.py*
%{python3_sitelib}/__pycache__/*
%pycached %{python3_sitelib}/%{name}.py
%changelog
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.1-9
* Sun Jan 24 2021 Ville-Pekka Vainio <vpvainio AT iki.fi> - 4.3-2
- Bump release for a new Copr build
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Sat Jan 16 2021 Ville-Pekka Vainio <vpvainio AT iki.fi> - 4.3-1
- Update to 4.3
- Add GPG signature check for the source
- Fix pycached stuff
- Remove old python_provide macro
- Remove ldconfig_scriptlets macro
- Only use VFST for now, HFST can be provided in a later update
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild