Initial import to Tizen
[profile/ivi/pocketsphinx.git] / packaging / pocketsphinx.spec
1 Name:       pocketsphinx
2 Version:    0.7
3 Release:    1
4 Group:      System/Libraries
5 License:    BSD
6 URL:        http://www.pocketsphinx.org/
7 Summary:    Speech Recognition Engine
8 Source:     http://sourceforge.net/projects/cmusphinx/files/%{name}/%{version}/%{name}-%{version}.tar.gz
9 Patch0:     0001-pocketsphinx-0.7-fix_build_error_with_stdio.patch
10 BuildRequires:  pkgconfig(gstreamer-0.10)
11 BuildRequires:  pkgconfig(gstreamer-plugins-base-0.10)
12 BuildRequires:  pkgconfig(sphinxbase)
13 BuildRequires:  pkgconfig(python)
14 BuildRequires:  python-setuptools
15
16 %description
17 PocketSphinx is a version of the open-source Sphinx-II speech recognition
18 system which is able to recognize speech in real-time.  While it may be
19 somewhat less accurate than the offline speech recognizers, it is lightweight
20 enough to run on handheld and embedded devices.
21
22 %package devel
23 Summary:        Header files for developing with pocketsphinx
24 Group:          Applications/Multimedia
25 Requires:       %{name}-libs = %{version}-%{release}, pkgconfig
26 Requires:       sphinxbase-devel
27
28 %description devel
29 Header files for developing with pocketsphinx.
30
31 %package libs
32 Summary:        Shared libraries for pocketsphinx executables
33 Group:          Applications/Multimedia
34
35 %description libs
36 Shared libraries for pocketsphinx executables.
37
38 %package plugin
39 Summary:        Pocketsphinx gstreamer plugin
40 Group:          Applications/Multimedia
41 Requires:       %{name}-libs = %{version}-%{release}, gst-plugins-base
42
43 %description plugin
44 A gstreamer plugin for pocketsphinx.
45
46 %package python
47 Summary:        Python interface to pocketsphinx
48 Group:          Applications/Multimedia
49 Requires:       %{name}-libs = %{version}-%{release}, sphinxbase-python
50
51 %description python
52 Python interface to pocketsphinx.
53
54 %prep
55 %setup -q
56 %patch0 -p1
57
58 %build
59 %configure --disable-static
60
61
62 make %{?_smp_mflags}
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66 mkdir -p $RPM_BUILD_ROOT%{python_sitearch}
67 make install DESTDIR=$RPM_BUILD_ROOT
68
69 # Install the man pages
70 mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
71 cp -p doc/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
72
73 # Get rid of files we don't want packaged
74 rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
75 rm -f $RPM_BUILD_ROOT%{_libdir}/gstreamer-0.10/*.la
76 rm -f doc/html/installdox
77
78 %clean
79 rm -rf $RPM_BUILD_ROOT
80
81 %post libs -p /sbin/ldconfig
82
83 %postun libs -p /sbin/ldconfig
84
85 %files
86 %defattr(-,root,root,-)
87 %{_bindir}/*
88 %{_datadir}/pocketsphinx
89 %{_mandir}/man1/*
90
91 %files devel
92 %defattr(-,root,root,-)
93 %{_includedir}/pocketsphinx
94 %{_libdir}/libpocketsphinx.so
95 %{_libdir}/pkgconfig/pocketsphinx.pc
96
97 %files libs
98 %defattr(-,root,root,-)
99 %doc AUTHORS ChangeLog COPYING NEWS README
100 %{_libdir}/libpocketsphinx.so.*
101
102 %files plugin
103 %defattr(-,root,root,-)
104 %{_libdir}/gstreamer-0.10/*
105
106 %files python
107 %defattr(-,root,root,-)
108 %{python_sitearch}/*
109 %changelog