File julius.spec of Package julius

#
# spec file for package julius
#
# Copyright (c) 2018 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/
#


Name:           julius
Version:        4.4.2.1
Release:        0
Summary:        Large Vocabulary CSR Engine
License:        open source revised BSD like Japanese Universities Consortium
Group:          Productivity/Office/Other
URL:            http://julius.sourceforge.jp/en_index.php
Source0:        %{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM julius-4.4.2.1-DESTDIR.patch - http://pkgs.fedoraproject.org/cgit/julius.git/
Patch0:         julius-4.4.2.1-DESTDIR.patch
# PATCH-FIX-UPSTREAM julius-4.4.2.1-sharedlibs.patch - http://pkgs.fedoraproject.org/cgit/julius.git/
Patch1:         julius-4.4.2.1-sharedlibs.patch
# PATCH-FIX-UPSTREAM julius-4.4.2.1-fix-the-broken-build-system.patch
Patch2:         julius-4.4.2.1-fix-the-broken-build-system.patch
BuildRequires:  dos2unix
BuildRequires:  fdupes
%if 0%{?suse_version} > 1500
# fails to build with default gcc on Tumbleweed
BuildRequires:  gcc7
%endif
BuildRequires:  pkgconfig
BuildRequires:  readline-devel
BuildRequires:  pkgconfig(alsa)
BuildRequires:  pkgconfig(libpulse)
BuildRequires:  pkgconfig(sdl2)
BuildRequires:  pkgconfig(sndfile)

%description
Julius is an open-source, high-performance large vocabulary continuous speech
recognition (LVCSR) engine for speech-related researchs and developments.
With HMM acoustic model and language model, you can construct your own speech
recognition system.

%package devel
Summary:        Large Vocabulary CSR Engine
Group:          Development/Languages/Other
Requires:       %{name} = %{version}

%description devel
Development files for Julius.
Large Vocabulary Continuous Speech Recognition Engine Julius

%prep
%autosetup -p1

# Fix EOLs in all txt files
find ./ -type f -name \*.txt -exec dos2unix {} \;

%build
%if 0%{?suse_version} > 1500
# fails to build with default gcc on Tumbleweed
export CC="gcc-7"
%endif
%configure
# Parallel build fails
make -j1

%install
%make_install

%fdupes -s %{buildroot}

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%license LICENSE.txt
%doc Release.txt 00readme.txt
%{_bindir}/*
%{_libdir}/libjulius.so.*
%{_libdir}/libsent.so.*
%{_mandir}/*/man1/*
%{_mandir}/man1/*

%files devel
%{_includedir}/julius/
%{_includedir}/sent/
%{_libdir}/libjulius.so
%{_libdir}/libsent.so
%{_libdir}/pkgconfig/*.pc

%changelog
openSUSE Build Service is sponsored by