%define name openfst %define version 1.8.0 %define rel 2 %define major 23 %define libname %mklibname %{name} %define develname %mklibname %{name} -d Name: %{name} Version: %{version} Release: %mkrel %{rel} Summary: Library for managing weighted finite-state transducers License: ASL 2.0 URL: https://github.com/alphacep/openfst Source0: openfst-%{version}.tar.gz BuildRequires: libtool BuildRequires: make BuildRequires: gcc-c++ BuildRequires: zlib-devel Provides: %{name} = %{version}-%{release} Group: System/Libraries %description OpenFst is a library for constructing, combining, optimizing, and searching weighted finite-state transducers (FSTs). These version is adapted by alphacep for kaldi project. %package -n %{libname} Summary: Main library for openfst Group: System/Libraries Provides: %{name} = %{version}-%{release} %description -n %{libname} OpenFst is a library for constructing, combining, optimizing, and searching weighted finite-state transducers (FSTs). These version is adapted by alphacep for kaldi project. %package -n %{develname} Summary: Development files for %{name} Group: Development/C Requires: %{libname} = %{version} Provides: %{name}-devel = %{version}-%{release} %description -n %{develname} This package contains libraries and header files for developing applications that use %{name}. %prep %autosetup # la compilation sur 32 bit échoue sur ce test : https://github.com/mjansche/openfst/blob/5be570c4e84a5eae1325d8c6c43fdbba3683863e/configure.ac#L155-183 %build autoreconf -fi %ifarch aarch64 export CFLAGS="%{optflags} -flax-vector-conversions" %endif %ifarch %ix86 export CFLAGS="%{optflags} -msse2 -mfpmath=sse" %endif export CXXFLAGS="$CFLAGS" %configure --enable-static=no --enable-shared --enable-far --enable-ngram-fsts --enable-lookahead-fsts --with-pic --disable-bin %make_build %install %make_install find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' %{?ldconfig_scriptlets} %files -n %{libname} %license COPYING %doc README %{_libdir}/libfstfar.so.%{major} %{_libdir}/libfstlookahead.so.%{major} %{_libdir}/libfstngram.so.%{major} %{_libdir}/libfst.so.%{major} %{_libdir}/fst/*.so %{_libdir}/*.so %files -n %{develname} %license COPYING %doc README %{_includedir}/* %{_libdir}/*.so.* %changelog * Fri Jul 16 22:20:36 CEST 2021 Papoteur -