1 |
Summary: Script-driven sound processing toolkit |
2 |
Name: snack |
3 |
Version: 2.2.10 |
4 |
%define subrel 1 |
5 |
Release: %{mkrel 8} |
6 |
License: BSD |
7 |
Group: Sound |
8 |
URL: http://www.speech.kth.se/snack/ |
9 |
Source0: http://www.speech.kth.se/~kare/%{name}%{version}.tar.bz2 |
10 |
# Fix underlinking |
11 |
Patch0: snack-2.2.10-underlinking.patch |
12 |
Patch1: snack-2.2.10-unity-linux-fix-roundf.patch |
13 |
Patch2: snack-2.2.10-unity-linux-gcc44.patch |
14 |
Patch3: snack-2.2.10-mdv-fix-string-format.patch |
15 |
Patch4: tcl-snack-2.2.10-CVE-2012-6303-fix.patch |
16 |
|
17 |
BuildRequires: tcl |
18 |
BuildRequires: tk |
19 |
BuildRequires: libogg-devel |
20 |
BuildRequires: libvorbis-devel |
21 |
BuildRequires: X11-devel |
22 |
BuildRequires: python-devel |
23 |
BuildRequires: dos2unix |
24 |
BuildRequires: tcl-devel |
25 |
BuildRequires: tk-devel |
26 |
|
27 |
%description |
28 |
Snack is a sound processing toolkit designed as an extension |
29 |
to a scripting language. Snack currently works with the scripting |
30 |
languages Tcl/Tk, Python, and Ruby. |
31 |
|
32 |
Snack has commands to play, record, process, and visualize sound. |
33 |
Snack provides high level sound objects, with flexible storage management, |
34 |
and streaming support. It handles most common sound file formats. |
35 |
The visualization canvas item types update in real-time and can output |
36 |
postscript. The same scripts run on Unix (Linux, Solaris, HP-UX, IRIX, |
37 |
FreeBSD, NetBSD), Macintosh, and Windows 95/98/NT/2000/XP. |
38 |
|
39 |
%package -n tcl-%{name} |
40 |
Summary: Snack Sound Toolkit for Tcl |
41 |
Group: Sound |
42 |
Requires: tcl |
43 |
Obsoletes: %{mklibname snack} < 2.2.10-6mdv |
44 |
Obsoletes: %{mklibname snack -d} < 2.2.10-6mdv |
45 |
|
46 |
%description -n tcl-%{name} |
47 |
Snack Sound Toolkit for Tcl. |
48 |
|
49 |
%package -n python-%{name} |
50 |
Summary: Snack Sound Toolkit for Python |
51 |
Group: Sound |
52 |
Requires: tcl-%{name} = %{version} |
53 |
Requires: tkinter |
54 |
|
55 |
%description -n python-%{name} |
56 |
Snack Sound Toolkit for Python. |
57 |
|
58 |
%prep |
59 |
%setup -q -n %{name}%{version} |
60 |
%patch0 -p1 -b .underlink |
61 |
%patch1 -p1 |
62 |
%patch2 -p1 |
63 |
%patch3 -p0 |
64 |
%patch4 -p1 |
65 |
chmod 644 COPYING README changes |
66 |
|
67 |
%build |
68 |
cd unix |
69 |
%configure2_5x --with-tcl=/usr/lib --with-tk=/usr/lib --with-ogg-include=/usr/include/ogg --with-ogg-lib=/usr/lib |
70 |
%make TCL_INCPATH=/usr/include TK_INCPATH=/usr/include CC="gcc %{optflags}" |
71 |
%make TCL_INCPATH=/usr/include TK_INCPATH=/usr/include CC="gcc %{optflags}" libsnackogg.so |
72 |
|
73 |
%install |
74 |
rm -rf %{buildroot} |
75 |
chmod 644 doc/* |
76 |
chmod 755 python/*.py |
77 |
chmod 644 demos/tcl/* |
78 |
chmod 755 demos/tcl/*.tcl |
79 |
dos2unix demos/tcl/*.txt |
80 |
rm -f demos/tcl/tclkit-linux-x86 |
81 |
chmod 644 demos/python/* |
82 |
chmod 755 demos/python/*.py |
83 |
dos2unix demos/python/*.txt |
84 |
|
85 |
cd unix |
86 |
mkdir -p %{buildroot}%{tcl_sitearch}/%{name}%{version} |
87 |
mkdir -p %{buildroot}%{py_puresitedir} |
88 |
cp *.so %{buildroot}%{tcl_sitearch}/%{name}%{version} |
89 |
install -m 0755 *.tcl %{buildroot}%{tcl_sitearch}/%{name}%{version} |
90 |
cd ../python |
91 |
python setup.py install --root=%{buildroot} --compile --optimize=2 |
92 |
|
93 |
%clean |
94 |
rm -rf %{buildroot} |
95 |
|
96 |
%files -n tcl-%{name} |
97 |
%defattr(-,root,root) |
98 |
%doc changes COPYING doc/tcl-man.html demos/tcl/* doc/A* doc/C* doc/F* README doc/S* |
99 |
%{tcl_sitearch}/%{name}%{version} |
100 |
|
101 |
%files -n python-%{name} |
102 |
%defattr(-,root,root) |
103 |
%doc doc/python-man.html demos/python/* |
104 |
%{py_puresitedir}/* |
105 |
|
106 |
|
107 |
|