%define major 0 %define libname %mklibname foma %{major} %define devname %mklibname foma -d Name: foma Summary: finite-state compiler and C library Version: 0.9.18 Release: %mkrel 1 License: ASL 2.0 Group: Text tools Url: https://foma.googlecode.com/ Source0: https://bitbucket.org/mhulden/foma/downloads/foma-%{version}.tar.gz BuildRequires: readline-devel BuildRequires: ncurses-devel BuildRequires: zlib-devel %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} Summary: finite-state C library 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 -n %{devname} Summary: finite-state C library development files and headers Group: Development/C Requires: %{libname} = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} %description -n %{devname} Development files and headers for %{name}. %prep %setup -q %build %make_build \ CFLAGS="%{optflags} -D_GNU_SOURCE -std=c99 -fPIC" \ LDFLAGS="%{ldflags} -lreadline -lz -ltermcap" %install %make_install \ prefix=%{buildroot}%{_prefix} \ libdir=%{buildroot}%{_libdir} rm -rf %{buildroot}%{_libdir}/*.a %files %{_bindir}/cgflookup %{_bindir}/flookup %{_bindir}/foma %files -n %{devname} %{_includedir}/fomalib.h %{_includedir}/fomalibconf.h %{_libdir}/libfoma.so %files -n %{libname} %{_libdir}/libfoma.so.%{major} %{_libdir}/libfoma.so.%{version} %changelog * Sat Jan 28 2017 wally <wally> 0.9.18-1.mga6 + Revision: 1083804 - imported package foma