Re-work package structure, drop man files, fix build

This commit is contained in:
Andrey Bondrov 2014-08-23 02:13:12 +11:00
parent de514a359b
commit 4781cfbe4e
2 changed files with 92 additions and 62 deletions

18
sphinx3-0.8-libutil.patch Normal file
View file

@ -0,0 +1,18 @@
--- src/libs3decoder/libsearch/fsg_history.c
+++ src/libs3decoder/libsearch/fsg_history.c
@@ -55,7 +55,6 @@
#include <kb.h>
/*#include <phone.h>*/
#include <search.h>
-#include "libutil.h"
#define __FSG_DBG__ 0
--- src/libs3decoder/libcfg/s3_cfg_convert.c
+++ src/libs3decoder/libcfg/s3_cfg_convert.c
@@ -1,5 +1,4 @@
-#include <libutil.h>
#include "s3_cfg.h"
#include "fsg.h"

View file

@ -1,74 +1,86 @@
Name: sphinx3
Version: 0.8
Release: 5
Summary: CMU Sphinx Recognition System
#Summary(ru_RU.UTF-8): Система распознавания речи
Group: Sound
License: BSD-style (see COPYING)
Url: http://cmusphinx.sourceforge.net/
Source: %{name}-%{version}.tar.gz
Requires: sphinxbase
BuildRequires: sphinxbase
BuildRequires: pkgconfig(sphinxbase)
BuildRequires: pkgconfig(libbsd)
Source1: Makefile.patch
Source2: Makefile.inc.patch
Source3: Makefile.an4.patch
Source4: Makefile2.patch
%define Werror_cflags %{nil}
%define _disable_ld_no_undefined 1
%define major 0
%define libs3decoder %mklibname s3decoder %{major}
%define devname %mklibname %{name} -d
Summary: CMU Sphinx Recognition System
Name: sphinx3
Version: 0.8
Release: 6
License: BSD-style (see COPYING)
Group: Sound
Url: http://cmusphinx.sourceforge.net/
Source0: %{name}-%{version}.tar.gz
Patch0: sphinx3-0.8-libutil.patch
Source1: Makefile.patch
Source2: Makefile.inc.patch
Source3: Makefile.an4.patch
Source4: Makefile2.patch
BuildRequires: pkgconfig(sphinxbase)
BuildRequires: sphinxbase
Requires: sphinxbase
%description
The CMU Sphinx Recognition System is a library and a set
of examples and utilities for speech recognition.
This package will install the sphinx3 library and some examples.
%package devel
Summary: libraries and header files for Sphinx
Group: Development/C
Requires: %{name} = %{version}-%{release}
%description devel
The CMU Sphinx Recognition System is a library and a set
of examples and utilities for speech recognition.
This package contains libraries and header files need for development.
%prep
%setup
patch -p0 -F 90 Makefile.in %{SOURCE1}
patch -p0 -F 90 include/Makefile.in %{SOURCE2}
patch -p0 -F 90 model/lm/an4/Makefile.in %{SOURCE3}
%build
%{__libtoolize}
%{__aclocal}
%{__autoconf}
%{__automake} --add-missing
# ./autogen.sh
cp configure.ac configure.in
%configure
patch -p0 -F 90 Makefile %{SOURCE4}
patch -p0 -F 90 include/Makefile %{SOURCE4}
patch -p0 -F 90 model/lm/an4/Makefile %{SOURCE4}
%make
%install
make install DESTDIR=%{buildroot}
The CMU Sphinx Recognition System is a library and a set of examples and
utilities for speech recognition.
%files
%doc AUTHORS COPYING INSTALL README NEWS doc/*.ppt
%doc doc/*.html doc/*.pdf doc/*.txt doc/*.gif
%{_bindir}/*
%{_datadir}/%{name}
%{_libdir}/*.so.*
%{_libdir}/*.so
%files devel
%{_libdir}/*.a
%{_includedir}/%{name}/
#----------------------------------------------------------------------------
%package -n %{libs3decoder}
Summary: Shared library for %{name}
Group: System/Libraries
Conflicts: %{name} < 0.8-6
%description -n %{libs3decoder}
Shared library for %{name}.
%files -n %{libs3decoder}
%{_libdir}/libs3decoder.so.%{major}*
#----------------------------------------------------------------------------
%package -n %{devname}
Summary: Development files for %{name}
Group: Development/C
Requires: %{libs3decoder} = %{EVRD}
Provides: %{name}-devel = %{EVRD}
Conflicts: %{name}-devel < 0.8-6
Obsoletes: %{name}-devel < 0.8-6
Conflicts: %{name} < 0.8-6
%description -n %{devname}
Development files for %{name}.
%files -n %{devname}
%{_libdir}/libs3decoder.so
%{_libdir}/pkgconfig/%{name}.pc
%{_includedir}/%{name}/
#----------------------------------------------------------------------------
%prep
%setup -q
%patch0 -p0
patch -p0 -F 90 Makefile.in %{SOURCE1}
patch -p0 -F 90 include/Makefile.in %{SOURCE2}
patch -p0 -F 90 model/lm/an4/Makefile.in %{SOURCE3}
%build
autoreconf -fi
%configure2_5x --disable-static
patch -p0 -F 90 Makefile %{SOURCE4}
patch -p0 -F 90 include/Makefile %{SOURCE4}
patch -p0 -F 90 model/lm/an4/Makefile %{SOURCE4}
%make
%install
%makeinstall_std