|
 |
267b1c2 |
# We used to define this dynamically, but the Fedora buildsystem chokes on
|
|
 |
267b1c2 |
# using this for the versioned Requires on tcl(abi), so we hardcode it.
|
|
 |
267b1c2 |
# This sucks, but there is no other clean way around it, because tcl
|
|
 |
267b1c2 |
# (and tclsh) aren't in the default buildroot.
|
|
 |
267b1c2 |
%{!?tcl_version: %define tcl_version 8.5}
|
|
 |
1033bc6 |
%{!?tcl_sitearch: %define tcl_sitearch %{_libdir}/tcl%{tcl_version}}
|
|
 |
1033bc6 |
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
 |
1033bc6 |
%define realname snack
|
|
 |
1033bc6 |
|
|
 |
1033bc6 |
Name: tcl-%{realname}
|
|
 |
1033bc6 |
Version: 2.2.10
|
|
 |
267b1c2 |
Release: 4%{?dist}
|
|
 |
1033bc6 |
Summary: Sound toolkit
|
|
 |
1033bc6 |
Group: System Environment/Libraries
|
|
 |
1033bc6 |
License: GPLv2+
|
|
 |
1033bc6 |
URL: http://www.speech.kth.se/snack/
|
|
 |
1033bc6 |
# The upstream source has two files which implement MP3 decoding.
|
|
 |
1033bc6 |
# ./generic/jkFormatMP3.c and ./generic/jkFormatMP3.h
|
|
 |
1033bc6 |
# Due to patent concerns, we cannot ship that code, thus, the modified tarball.
|
|
 |
1033bc6 |
# Those files are not present in the tarball, all other related removals is done
|
|
 |
1033bc6 |
# with a patch.
|
|
 |
1033bc6 |
# Upstream source can be found here: http://www.speech.kth.se/snack/dist/snack2.2.10.tar.gz
|
|
 |
1033bc6 |
Source0: %{realname}%{version}-nomp3.tar.gz
|
|
 |
1033bc6 |
Patch0: snack2.2.10-nomp3.patch
|
|
 |
1033bc6 |
Patch1: snack2.2.10-extracflags.patch
|
|
 |
1033bc6 |
Patch2: snack2.2.10-shared-stubs.patch
|
|
 |
1033bc6 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
 |
1033bc6 |
BuildRequires: tcl-devel, tk-devel, alsa-lib-devel, libogg-devel, libvorbis-devel
|
|
 |
1033bc6 |
BuildRequires: python-devel
|
|
 |
f26d632 |
Requires: tcl(abi) = %{tcl_version}
|
|
 |
1033bc6 |
Provides: %{realname} = %{version}-%{release}
|
|
 |
1033bc6 |
|
|
 |
1033bc6 |
%description
|
|
 |
1033bc6 |
The Snack Sound Toolkit is designed to be used with a scripting language such
|
|
 |
1033bc6 |
as Tcl/Tk or Python. Using Snack you can create powerful multi-platform audio
|
|
 |
1033bc6 |
applications with just a few lines of code. Snack has commands for basic sound
|
|
 |
1033bc6 |
handling, such as playback, recording, file and socket I/O. Snack also provides
|
|
 |
1033bc6 |
primitives for sound visualization, e.g. waveforms and spectrograms. It was
|
|
 |
1033bc6 |
developed mainly to handle digital recordings of speech, but is just as useful
|
|
 |
1033bc6 |
for general audio. Snack has also successfully been applied to other
|
|
 |
1033bc6 |
one-dimensional signals. The combination of Snack and a scripting language
|
|
 |
1033bc6 |
makes it possible to create sound tools and applications with a minimum of
|
|
 |
1033bc6 |
effort. This is due to the rapid development nature of scripting languages. As
|
|
 |
1033bc6 |
a bonus you get an application that is cross-platform from start. It is also
|
|
 |
1033bc6 |
easy to integrate Snack based applications with existing sound analysis
|
|
 |
1033bc6 |
software.
|
|
 |
1033bc6 |
|
|
 |
1033bc6 |
%package -n python-%{realname}
|
|
 |
1033bc6 |
Summary: Python bindings for Snack Sound Toolkit
|
|
 |
1033bc6 |
Group: System Environment/Libraries
|
|
 |
1033bc6 |
Requires: %{name} = %{version}-%{release}
|
|
 |
1033bc6 |
|
|
 |
1033bc6 |
%description -n python-%{realname}
|
|
 |
1033bc6 |
This package contains python bindings for the Snack Sound Toolkit. Tcl, Tk, and
|
|
 |
1033bc6 |
Tkinter are also required to use Snack.
|
|
 |
1033bc6 |
|
|
 |
1033bc6 |
%prep
|
|
 |
1033bc6 |
%setup -q -n %{realname}%{version}
|
|
 |
1033bc6 |
%patch0 -p1 -b .nomp3
|
|
 |
1033bc6 |
%patch1 -p1 -b .extracflags
|
|
 |
1033bc6 |
%patch2 -p1 -b .shared-stubs
|
|
 |
1033bc6 |
chmod -x generic/*.c generic/*.h unix/*.c COPYING README demos/python/*
|
|
 |
1033bc6 |
iconv -f iso-8859-1 -t utf-8 -o README{.utf8,}
|
|
 |
1033bc6 |
mv README{.utf8,}
|
|
 |
1033bc6 |
sed -i -e 's|\r||g' demos/python/*.txt
|
|
 |
1033bc6 |
|
|
 |
1033bc6 |
%build
|
|
 |
1033bc6 |
cd unix/
|
|
 |
1033bc6 |
%configure --disable-static --enable-alsa --with-tcl=%{_libdir} --with-tk=%{_libdir} --with-ogg-include=%{_includedir} --with-ogg-lib=%{_libdir}
|
|
 |
1033bc6 |
make %{?_smp_mflags} EXTRACFLAGS="%{optflags}"
|
|
 |
1033bc6 |
cd ../python
|
|
 |
1033bc6 |
%{__python} setup.py build
|
|
 |
1033bc6 |
|
|
 |
1033bc6 |
%install
|
|
 |
1033bc6 |
rm -rf %{buildroot}
|
|
 |
1033bc6 |
cd unix/
|
|
 |
1033bc6 |
make install DESTDIR=%{buildroot}
|
|
 |
1033bc6 |
find %{buildroot} -name '*.la' -exec rm -f {} ';'
|
|
 |
1033bc6 |
cd ../python
|
|
 |
1033bc6 |
%{__python} setup.py install --skip-build --root %{buildroot}
|
|
 |
1033bc6 |
install -d %{buildroot}%{tcl_sitearch}
|
|
 |
1033bc6 |
mv %{buildroot}%{_libdir}/%{realname}2.2 %{buildroot}%{tcl_sitearch}/%{realname}2.2
|
|
 |
1033bc6 |
chmod -x %{buildroot}%{tcl_sitearch}/%{realname}2.2/snack.tcl
|
|
 |
1033bc6 |
|
|
 |
1033bc6 |
%clean
|
|
 |
1033bc6 |
rm -rf %{buildroot}
|
|
 |
1033bc6 |
|
|
 |
1033bc6 |
%post -p /sbin/ldconfig
|
|
 |
1033bc6 |
|
|
 |
1033bc6 |
%postun -p /sbin/ldconfig
|
|
 |
1033bc6 |
|
|
 |
1033bc6 |
%files
|
|
 |
1033bc6 |
%defattr(-,root,root,-)
|
|
 |
1033bc6 |
%doc COPYING README
|
|
 |
1033bc6 |
%{_libdir}/libsnackstub2.2.so
|
|
 |
1033bc6 |
%{tcl_sitearch}/%{realname}2.2/
|
|
 |
1033bc6 |
|
|
 |
1033bc6 |
%files -n python-%{realname}
|
|
 |
1033bc6 |
%defattr(-,root,root,-)
|
|
 |
1033bc6 |
%doc doc/python-man.html demos/python/
|
|
 |
1033bc6 |
%{python_sitelib}/tkSnack*
|
|
 |
1033bc6 |
|
|
 |
1033bc6 |
%changelog
|
|
 |
267b1c2 |
* Thu Sep 18 2008 Tom "spot" Callaway <tcallawa@redhat.com> 2.2.10-4
|
|
 |
267b1c2 |
- *sigh* hardcoding the tcl version is the only way to get it through the buildsystem
|
|
 |
267b1c2 |
|
|
 |
f26d632 |
* Wed Sep 17 2008 Tom "spot" Callaway <tcallawa@redhat.com> 2.2.10-3
|
|
 |
f26d632 |
- don't hardcode tcl abi version
|
|
 |
f26d632 |
|
|
 |
1033bc6 |
* Mon Aug 4 2008 Tom "spot" Callaway <tcallawa@redhat.com> 2.2.10-2
|
|
 |
1033bc6 |
- add BR: python
|
|
 |
1033bc6 |
|
|
 |
1033bc6 |
* Wed Jun 11 2008 Tom "spot" Callaway <tcallawa@redhat.com> 2.2.10-1
|
|
 |
1033bc6 |
- Initial package for Fedora
|
|
 |
1033bc6 |
|