From 4781cfbe4e7c91aa12455ad016ce0235e14a6daa Mon Sep 17 00:00:00 2001 From: Andrey Bondrov Date: Sat, 23 Aug 2014 02:13:12 +1100 Subject: [PATCH] Re-work package structure, drop man files, fix build --- sphinx3-0.8-libutil.patch | 18 +++++ sphinx3.spec | 136 +++++++++++++++++++++----------------- 2 files changed, 92 insertions(+), 62 deletions(-) create mode 100644 sphinx3-0.8-libutil.patch diff --git a/sphinx3-0.8-libutil.patch b/sphinx3-0.8-libutil.patch new file mode 100644 index 0000000..0f77331 --- /dev/null +++ b/sphinx3-0.8-libutil.patch @@ -0,0 +1,18 @@ +--- src/libs3decoder/libsearch/fsg_history.c ++++ src/libs3decoder/libsearch/fsg_history.c +@@ -55,7 +55,6 @@ + #include + /*#include */ + #include +-#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 + #include "s3_cfg.h" + #include "fsg.h" + diff --git a/sphinx3.spec b/sphinx3.spec index 2bf2468..4340668 100644 --- a/sphinx3.spec +++ b/sphinx3.spec @@ -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 +