# avoid %Empty %files debugsourcefiles.list %global debug_package %{nil} # avoid hardening causes unexpected can not be used when making a PIE object; recompile with -fPIC %undefine _hardened_build Name: fasttext Version: 0.9.1 Release: 1%{?dist} Summary: Efficient learning of word representations and sentence classification Group: Applications/Text License: MIT URL: https://github.com/facebookresearch/fastText Source0: https://github.com/facebookresearch/fastText/archive/v%{version}.tar.gz Patch0: enable-soversion.patch Patch1: enable-pkg-config.patch Patch2: enable-install-lib64.patch Patch3: disable-static-fasttext.patch BuildRequires: cmake Requires: %{name}-libs = %{version}-%{release} %description The fastText is a library for efficient learning of word representations and sentence classification. %package libs Summary: Runtime libraries for fastText Group: System Environment/Libraries Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig %description libs This package contains the libraries for fastText %package tools Summary: Tools for fastText Group: Applications/Text Requires: %{name}-libs = %{version}-%{release} %description tools This package contains tools for manipulate models for fastText %package devel Summary: Libraries and header files for fastText Group: Development/Libraries Requires: %{name}-libs = %{version}-%{release} %description devel This package contains header files to develop a software using fastText %prep %setup -q -n fastText-%{version} %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %build %cmake . V=1 %make_build %install %make_install %clean %post libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig %files %defattr(-,root,root,-) %{_bindir}/fasttext %files libs %defattr(-,root,root,-) %{_libdir}/*.so.* %files devel %defattr(-,root,root,-) %{_includedir}/fasttext/*.h %{_libdir}/*.so %{_libdir}/pkgconfig/fasttext.pc %changelog * Tue Oct 1 2019 Kentaro Hayashi - 0.9.1-1 - initial packaging