[packages/hfst] - updated to 3.9.0 (note: new soname) - removed obsolete link patch - package python parts
qboosh
qboosh at pld-linux.org
Mon Dec 28 17:54:21 CET 2015
commit 8fe469cee5c6251376f72c5eff6de4544bbd51a0
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Mon Dec 28 17:55:44 2015 +0100
- updated to 3.9.0 (note: new soname)
- removed obsolete link patch
- package python parts
hfst-link.patch | 12 --------
hfst.spec | 87 +++++++++++++++++++++++++++++++++++++++++++++++++--------
2 files changed, 75 insertions(+), 24 deletions(-)
---
diff --git a/hfst.spec b/hfst.spec
index ece2ee9..8516a31 100644
--- a/hfst.spec
+++ b/hfst.spec
@@ -1,20 +1,21 @@
#
# Conditional build:
+%bcond_without python3 # Python 3 binding
%bcond_without readline # readline in interactive programs
#
Summary: Helsinki Finite-State Transducer (library and application suite)
Summary(pl.UTF-8): Helsinki Finite-State Transducer (biblioteka i zestaw aplikacji)
Name: hfst
-Version: 3.4.5
+Version: 3.9.0
Release: 1
License: GPL v3
Group: Applications/Text
Source0: http://downloads.sourceforge.net/hfst/%{name}-%{version}.tar.gz
-# Source0-md5: 4632cef7aa20564dba25eec3747f069a
+# Source0-md5: b1fb133e5ef27bb059bb15cdd558f17d
Patch0: %{name}-pc.patch
-Patch1: %{name}-link.patch
URL: http://www.ling.helsinki.fi/kieliteknologia/tutkimus/hfst/
-BuildRequires: SFST-devel
+# bundled library is used
+#BuildRequires: SFST-devel
BuildRequires: autoconf >= 2.62
BuildRequires: automake >= 1:1.11
BuildRequires: bison
@@ -22,13 +23,18 @@ BuildRequires: flex >= 2.5.35
BuildRequires: glib2-devel >= 1:2.16
BuildRequires: libstdc++-devel
BuildRequires: libtool >= 2:2.2
-# would be used only with --enable-expand-equivalences, but header checks are broken (no -I...)
+# disabled in sources
#BuildRequires: libxml2-devel >= 2
BuildRequires: ncurses-devel
-BuildRequires: openfst-devel
+# bundled library is used
+#BuildRequires: openfst-devel
BuildRequires: pkgconfig >= 1:0.14
-BuildRequires: python >= 2.4
+BuildRequires: python >= 1:2.4
+%{?with_python3:BuildRequires: python3 >= 1:3.2}
%{?with_readline:BuildRequires: readline-devel}
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+%{?with_python3:BuildRequires: swig-python}
BuildRequires: zlib-devel
Requires: glib2 >= 1:2.16
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -44,15 +50,28 @@ służące do implementacji analizatorów morfologicznych i innych
narzędzi opartych na technice przetwarzania ze skończoną liczbą
stanów z wagami lub bez.
+%package tagger
+Summary: HFST Tagger scripts
+Summary(pl.UTF-8): Skrypty HFST Tagger
+Group: Applications/Text
+Requires: %{name} = %{version}-%{release}
+
+%description tagger
+HFST Tagger scripts written in Python.
+
+%description tagger -l pl.UTF-8
+Skrypty HFST Tagger napisane w Pythonie.
+
%package devel
Summary: Header files for HFST library
Summary(pl.UTF-8): Pliki nagłówkowe biblioteki HFST
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
-Requires: SFST-devel
+#Requires: SFST-devel
Requires: glib2-devel >= 1:2.16
Requires: libstdc++-devel
-Requires: openfst-devel
+#Requires: openfst-devel
+Requires: readline-devel
%description devel
Header files for HFST library.
@@ -72,10 +91,21 @@ Static HFST library.
%description static -l pl.UTF-8
Statyczna biblioteka HFST.
+%package -n python3-hfst
+Summary: Python 3 binding for HFST library
+Summary(pl.UTF-8): Wiązanie Pythona 3 do biblioteki HFST
+Group: Libraries/Python
+Requires: %{name} = %{version}-%{release}
+
+%description -n python3-hfst
+Python 3 binding for HFST library.
+
+%description -n python3-hfst -l pl.UTF-8
+Wiązanie Pythona 3 do biblioteki HFST.
+
%prep
%setup -q
%patch0 -p1
-%patch1 -p1
%build
%{__libtoolize}
@@ -84,27 +114,43 @@ Statyczna biblioteka HFST.
%{__autoheader}
%{__automake}
%configure \
+ --enable-calculate \
+ --enable-foma-wrapper \
--enable-lexc \
+ --enable-lexc-wrapper \
--disable-silent-rules \
- --enable-static \
+ --enable-tagger \
+ --enable-xfst \
%{?with_readline:--with-readline} \
--with-unicode-handler=glib
# parallel build is broken with foma backend
%{__make} -j1
+%if %{with python3}
+cd python
+%py3_build
+%endif
+
%install
rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_bindir}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
+%py_postclean
# obsoleted by pkgconfig
%{__rm} $RPM_BUILD_ROOT%{_libdir}/libhfst.la
# for transducer data
install -d $RPM_BUILD_ROOT%{_datadir}/hfst
+%if %{with python3}
+cd python
+%py3_install
+%endif
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -118,9 +164,17 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_bindir}/hfst_foma
%attr(755,root,root) %{_bindir}/htwolcpre*
%attr(755,root,root) %{_libdir}/libhfst.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libhfst.so.28
+%attr(755,root,root) %ghost %{_libdir}/libhfst.so.42
%dir %{_datadir}/hfst
%{_mandir}/man1/hfst-*.1*
+%{_mandir}/man1/htwolcpre?.1*
+
+%files tagger
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/hfst_tagger_compute_data_statistics.py
+%{py_sitescriptdir}/hfst_tagger_compute_data_statistics.py[co]
+%{py_sitescriptdir}/tagger_aux.py[co]
+%{_mandir}/man1/hfst_tagger_compute_data_statistics.py.1*
%files devel
%defattr(644,root,root,755)
@@ -132,3 +186,12 @@ rm -rf $RPM_BUILD_ROOT
%files static
%defattr(644,root,root,755)
%{_libdir}/libhfst.a
+
+%if %{with python3}
+%files -n python3-hfst
+%defattr(644,root,root,755)
+%attr(755,root,root) %{py3_sitedir}/_libhfst.cpython-*.so
+%{py3_sitedir}/libhfst.py
+%{py3_sitedir}/__pycache__/libhfst.cpython-*.py[co]
+%{py3_sitedir}/libhfst_swig-%{version}_beta-py*.egg-info
+%endif
diff --git a/hfst-link.patch b/hfst-link.patch
deleted file mode 100644
index b8cc241..0000000
--- a/hfst-link.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- hfst-3.4.5/configure.ac.orig 2013-06-10 12:58:12.000000000 +0200
-+++ hfst-3.4.5/configure.ac 2013-06-28 19:41:03.140615707 +0200
-@@ -533,7 +533,8 @@
-
- # Checks for libraries
-
--AC_CHECK_LIB([xml2], [main])
-+AC_CHECK_LIB([xml2], [main], [LIBXML2_LIBS="-lxml2"], [LIBXML2_LIBS=])
-+AC_SUBST([LIBXML2_LIBS])
- AC_LANG_PUSH([C++])
- AS_IF([test "x$with_openfst" != "xno" -a "x$enable_mingw" == "xno"],
- [AC_CHECK_LIB([dl], [main])])
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/hfst.git/commitdiff/8fe469cee5c6251376f72c5eff6de4544bbd51a0
More information about the pld-cvs-commit
mailing list