2017-04-26 12:58:21 +02:00
|
|
|
#
|
|
|
|
# spec file for package foma
|
|
|
|
#
|
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%define libname libfoma0
|
|
|
|
Name: foma
|
2017-05-17 11:17:56 +02:00
|
|
|
Version: 0.9.18+git20170507.07bb944
|
2017-04-26 13:07:08 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Finite-state compiler and C library
|
2017-04-26 12:58:21 +02:00
|
|
|
License: Apache-2.0
|
|
|
|
Group: Productivity/Text/Utilities
|
2017-04-26 13:14:08 +02:00
|
|
|
Url: https://fomafst.github.io/
|
2017-05-17 11:17:56 +02:00
|
|
|
# Source must be from git tarball has different license than git, no idea why
|
|
|
|
Source0: foma-%{version}.tar.xz
|
|
|
|
BuildRequires: flex bison
|
2017-04-26 12:58:21 +02:00
|
|
|
BuildRequires: ncurses-devel
|
|
|
|
BuildRequires: pkgconfig
|
|
|
|
BuildRequires: readline-devel
|
|
|
|
BuildRequires: pkgconfig(zlib)
|
|
|
|
|
|
|
|
%description
|
|
|
|
Foma is a compiler, programming language, and C library for constructing
|
|
|
|
finite-state automata and transducers for various uses. It has specific
|
|
|
|
support for many natural language processing applications such as producing
|
|
|
|
morphological analyzers. Although NLP applications are probably the main
|
|
|
|
use of foma, it is sufficiently generic to use for a large number of purposes.
|
|
|
|
|
|
|
|
%package -n %{libname}
|
2017-04-26 13:07:08 +02:00
|
|
|
Summary: Finite-state C library
|
2017-04-26 12:58:21 +02:00
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n %{libname}
|
|
|
|
The library contains efficient implementations of all classical
|
|
|
|
automata/transducer algorithms: determinization, minimization,
|
|
|
|
epsilon-removal, composition, boolean operations. Also, more
|
|
|
|
advanced construction methods are available: context restriction,
|
|
|
|
quotients, first-order regular logic, transducers from replacement
|
|
|
|
rules, etc.
|
|
|
|
|
|
|
|
%package devel
|
2017-04-26 13:07:08 +02:00
|
|
|
Summary: Finite-state C library development files and headers
|
2017-04-26 12:58:21 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
2017-04-26 13:07:08 +02:00
|
|
|
Requires: %{libname} = %{version}
|
2017-04-26 12:58:21 +02:00
|
|
|
|
|
|
|
%description devel
|
2017-04-26 13:07:08 +02:00
|
|
|
Finite-state C library development files and headers for %{name}.
|
2017-04-26 12:58:21 +02:00
|
|
|
|
|
|
|
%prep
|
2017-05-17 11:17:56 +02:00
|
|
|
%setup -q -n %{name}-%{version}/%{name}
|
2017-04-26 12:58:21 +02:00
|
|
|
|
|
|
|
%build
|
2017-05-17 11:32:38 +02:00
|
|
|
# hand written Makefile that gets to be quite PITA
|
|
|
|
make -j1 \
|
2017-04-26 12:58:21 +02:00
|
|
|
CFLAGS="%{optflags} -D_GNU_SOURCE -std=c99 -fPIC" \
|
2017-04-26 13:07:08 +02:00
|
|
|
LDFLAGS="-lreadline -lz"
|
2017-04-26 12:58:21 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
%make_install \
|
|
|
|
prefix=%{buildroot}%{_prefix} \
|
|
|
|
libdir=%{buildroot}%{_libdir}
|
|
|
|
rm -rf %{buildroot}%{_libdir}/*.a
|
|
|
|
|
2017-04-26 13:07:08 +02:00
|
|
|
%post -n %{libname} -p /sbin/ldconfig
|
|
|
|
%postun -n %{libname} -p /sbin/ldconfig
|
|
|
|
|
2017-04-26 12:58:21 +02:00
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2017-05-17 11:17:56 +02:00
|
|
|
%doc COPYING
|
2017-04-26 12:58:21 +02:00
|
|
|
%{_bindir}/cgflookup
|
|
|
|
%{_bindir}/flookup
|
|
|
|
%{_bindir}/foma
|
|
|
|
|
2017-04-26 13:07:08 +02:00
|
|
|
%files devel
|
2017-04-26 12:58:21 +02:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_includedir}/fomalib.h
|
|
|
|
%{_includedir}/fomalibconf.h
|
|
|
|
%{_libdir}/libfoma.so
|
|
|
|
|
|
|
|
%files -n %{libname}
|
|
|
|
%defattr(-,root,root)
|
2017-04-26 13:07:08 +02:00
|
|
|
%{_libdir}/libfoma.so.*
|
2017-04-26 12:58:21 +02:00
|
|
|
|
|
|
|
%changelog
|