Blob Blame History Raw
%define _epel   %{?epel:%{epel}}%{!?epel:0}

Name:		fasttext
Version:	0.9.2
Release:	1%{?dist}
Summary:	Efficient learning of word representations and sentence classification

License:	MIT
# Enable to install %%{_libdir} instead of hardcoded lib directory
Patch0:		enable-install-lib64.patch
# Respect CMake CXXFLAGS set by %%cmake (Needed for hardening with -fPIC)
Patch1:		respect-cmake-cxxflags.patch

BuildRequires:	cmake
%if %{_epel} == 7
BuildRequires:	devtoolset-7-gcc
BuildRequires:	devtoolset-7-gcc-c++
BuildRequires:	gcc
BuildRequires:	gcc-c++
Requires:	%{name}-libs = %{version}-%{release}

The fastText is a library for efficient learning of
word representations and sentence classification.

%package libs
Summary:	Runtime libraries for fastText

%description libs
This package contains the libraries for fastText.

%package tools
Summary:	Tools for fastText
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
Requires:	%{name}-libs = %{version}-%{release}

%description devel
This package contains header files to develop a software using fastText.

%autosetup -p1 -n fastText-%{version}

%if %{_epel} == 7
. /opt/rh/devtoolset-7/enable
export CXXFLAGS="%build_cxxflags -fPIC"
%cmake .
V=1 %cmake_build

find %{buildroot}%{_libdir} -name '*.a' -delete


%ldconfig_scriptlets libs

%files libs
%license LICENSE

%files devel
%dir %{_includedir}/fasttext

* Thu Oct 01 2020 Kentaro Hayashi <> - 0.9.2-1
- New upstream release

* Sat Aug 01 2020 Fedora Release Engineering <> - 0.9.1-4
- Second attempt - Rebuilt for

* Mon Jul 27 2020 Fedora Release Engineering <> - 0.9.1-3
- Rebuilt for

* Tue Jan 28 2020 Fedora Release Engineering <> - 0.9.1-2
- Rebuilt for

* Tue Oct 1 2019 Kentaro Hayashi <> - 0.9.1-1
- initial packaging