]> git.pld-linux.org Git - packages/hfst.git/blobdiff - hfst.spec
- release 5 (by relup.sh)
[packages/hfst.git] / hfst.spec
index 9d97b6b9a91d34dc91620c91c7eab11050618f8c..4d3ec07682127ee9b8965b8d7f3475d5edb88815 100644 (file)
--- a/hfst.spec
+++ b/hfst.spec
@@ -1,21 +1,43 @@
+#
+# 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:       2.4.1
-Release:       1
-License:       GPL v3+
+Version:       3.11.0
+Release:       5
+License:       LGPL v3 (library), GPL v3 (tools)
 Group:         Applications/Text
-Source0:       http://downloads.sourceforge.net/hfst/%{name}-%{version}.tar.gz
-# Source0-md5: 4e501d68f1ef67ab45029ce14e3ce559
-Patch0:                %{name}-link.patch
-Patch1:                %{name}-rules.patch
+#Source0Download: https://github.com/hfst/hfst/releases
+Source0:       https://github.com/hfst/hfst/releases/download/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 6cbdddcb9ef28aa5681081a8a1dc6b54
+Patch0:                %{name}-pc.patch
 URL:           http://www.ling.helsinki.fi/kieliteknologia/tutkimus/hfst/
-BuildRequires: autoconf >= 2.61
-BuildRequires: automake
+# bundled library is used
+#BuildRequires:        SFST-devel
+BuildRequires: autoconf >= 2.62
+BuildRequires: automake >= 1:1.11
 BuildRequires: bison
 BuildRequires: flex >= 2.5.35
+BuildRequires: glib2-devel >= 1:2.16
 BuildRequires: libstdc++-devel
-BuildRequires: libtool >= 2:2.0
+BuildRequires: libtool >= 2:2.2
+# disabled in sources
+#BuildRequires:        libxml2-devel >= 2
+BuildRequires: ncurses-devel
+# bundled library is used
+#BuildRequires:        openfst-devel
+BuildRequires: pkgconfig >= 1:0.14
+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)
 
 %description
@@ -29,12 +51,30 @@ 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
+License:       GPL v3
+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
+License:       LGPL v3
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
+#Requires:     SFST-devel
+Requires:      glib2-devel >= 1:2.16
 Requires:      libstdc++-devel
+#Requires:     openfst-devel
+Requires:      readline-devel
 
 %description devel
 Header files for HFST library.
@@ -45,6 +85,7 @@ Pliki nagłówkowe biblioteki HFST.
 %package static
 Summary:       Static HFST library
 Summary(pl.UTF-8):     Statyczna biblioteka HFST
+License:       LGPL v3
 Group:         Development/Libraries
 Requires:      %{name}-devel = %{version}-%{release}
 
@@ -54,51 +95,83 @@ Static HFST library.
 %description static -l pl.UTF-8
 Statyczna biblioteka HFST.
 
+%package -n python-hfst
+Summary:       Python 2 binding for HFST library
+Summary(pl.UTF-8):     Wiązanie Pythona 2 do biblioteki HFST
+License:       LGPL v3
+Group:         Libraries/Python
+Requires:      %{name} = %{version}-%{release}
+
+%description -n python-hfst
+Python 2 binding for HFST library.
+
+%description -n python-hfst -l pl.UTF-8
+Wiązanie Pythona 2 do biblioteki HFST.
+
+%package -n python3-hfst
+Summary:       Python 3 binding for HFST library
+Summary(pl.UTF-8):     Wiązanie Pythona 3 do biblioteki HFST
+License:       LGPL v3
+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
-cd hfst2
-%{__libtoolize}
-%{__aclocal}
-%{__autoconf}
-%{__autoheader}
-%{__automake}
-cd ../hfst-tools
 %{__libtoolize}
 %{__aclocal}
 %{__autoconf}
 %{__autoheader}
 %{__automake}
-cd hfst-lexc
-%{__libtoolize}
-%{__aclocal}
-%{__autoconf}
-%{__autoheader}
-%{__automake}
-cd ../hfst-twolc
-%{__libtoolize}
-%{__aclocal}
-%{__autoconf}
-%{__autoheader}
-%{__automake}
-cd ../..
-%{__aclocal}
-%{__autoconf}
-%{__automake}
 %configure \
-       --enable-static
-
-%{__make}
+       --enable-calculate \
+       --enable-foma-wrapper \
+       --enable-lexc \
+       --enable-lexc-wrapper \
+       --enable-proc \
+       --disable-silent-rules \
+       --enable-tagger \
+       --enable-xfst \
+       %{?with_readline:--with-readline} \
+       --with-unicode-handler=glib
+
+# parallel build is broken with foma backend
+%{__make} -j1
+
+cd python
+%py_build
+%if %{with python3}
+%py3_build
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_bindir}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
+# obsoleted by pkgconfig
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libhfst.la
+
+# for transducer data
+install -d $RPM_BUILD_ROOT%{_datadir}/hfst
+
+cd python
+%py_install
+%py_postclean
+%if %{with python3}
+%py3_install
+%endif
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -107,34 +180,47 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS BUGS ChangeLog NEWS README THANKS
+%doc AUTHORS NEWS README THANKS
 %attr(755,root,root) %{_bindir}/hfst-*
+%attr(755,root,root) %{_bindir}/hfst_foma
 %attr(755,root,root) %{_bindir}/htwolcpre*
-%attr(755,root,root) %{_bindir}/hwfst-calculate
 %attr(755,root,root) %{_libdir}/libhfst.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libhfst.so.0
-%attr(755,root,root) %{_libdir}/libhfstlexc.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libhfstlexc.so.0
+%attr(755,root,root) %ghost %{_libdir}/libhfst.so.46
+%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)
 %attr(755,root,root) %{_libdir}/libhfst.so
-%attr(755,root,root) %{_libdir}/libhfstlexc.so
-%{_libdir}/libhfst.la
-%{_libdir}/libhfstlexc.la
-%{_includedir}/hfst2
-%{_includedir}/flex-utils.h
-%{_includedir}/lexc.h
-%{_includedir}/lexcio.h
-%{_includedir}/string-munging.h
-%{_includedir}/xducer.h
-%{_includedir}/xymbol.h
-%{_includedir}/xymbol-bridges.h
-%{_includedir}/xymbol-table.h
+%{_includedir}/hfst
+%{_aclocaldir}/hfst.m4
 %{_pkgconfigdir}/hfst.pc
 
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libhfst.a
-%{_libdir}/libhfstlexc.a
+
+%files -n python-hfst
+%defattr(644,root,root,755)
+%attr(755,root,root) %{py_sitedir}/_libhfst.so
+%{py_sitedir}/hfst
+%{py_sitedir}/libhfst.py[co]
+%{py_sitedir}/libhfst_swig-%{version}_beta-py*.egg-info
+
+%if %{with python3}
+%files -n python3-hfst
+%defattr(644,root,root,755)
+%attr(755,root,root) %{py3_sitedir}/_libhfst.cpython-*.so
+%{py3_sitedir}/hfst
+%{py3_sitedir}/libhfst.py
+%{py3_sitedir}/__pycache__/libhfst.cpython-*.py[co]
+%{py3_sitedir}/libhfst_swig-%{version}_beta-py*.egg-info
+%endif
This page took 0.059147 seconds and 4 git commands to generate.