tcl-snack/tcl-snack.spec

165 lines
5.9 KiB
RPMSpec
Raw Normal View History

# We used to define this dynamically, but the Fedora buildsystem chokes on
# using this for the versioned Requires on tcl(abi), so we hardcode it.
# This sucks, but there is no other clean way around it, because tcl
# (and tclsh) aren't in the default buildroot.
%{!?tcl_version: %define tcl_version 8.5}
2008-09-12 21:14:51 +00:00
%{!?tcl_sitearch: %define tcl_sitearch %{_libdir}/tcl%{tcl_version}}
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%define realname snack
Name: tcl-%{realname}
Version: 2.2.10
Release: 12%{?dist}
2008-09-12 21:14:51 +00:00
Summary: Sound toolkit
Group: System Environment/Libraries
License: GPLv2+
URL: http://www.speech.kth.se/snack/
# The upstream source has two files which implement MP3 decoding.
# ./generic/jkFormatMP3.c and ./generic/jkFormatMP3.h
# Due to patent concerns, we cannot ship that code, thus, the modified tarball.
# Those files are not present in the tarball, all other related removals is done
# with a patch.
# Upstream source can be found here: http://www.speech.kth.se/snack/dist/snack2.2.10.tar.gz
Source0: %{realname}%{version}-nomp3.tar.gz
Patch0: snack2.2.10-nomp3.patch
Patch1: snack2.2.10-extracflags.patch
Patch2: snack2.2.10-shared-stubs.patch
2008-09-22 18:37:30 +00:00
Patch3: snack2.2.10-newALSA.patch
2008-09-12 21:14:51 +00:00
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
2008-10-22 18:19:46 +00:00
BuildRequires: tcl-devel, tk-devel, libogg-devel, libvorbis-devel
2008-12-25 03:24:03 +00:00
BuildRequires: libXft-devel
2009-07-22 21:33:58 +00:00
BuildRequires: alsa-lib-devel
2008-09-12 21:14:51 +00:00
BuildRequires: python-devel
2008-09-17 19:05:34 +00:00
Requires: tcl(abi) = %{tcl_version}
2008-09-12 21:14:51 +00:00
Provides: %{realname} = %{version}-%{release}
%description
The Snack Sound Toolkit is designed to be used with a scripting language such
as Tcl/Tk or Python. Using Snack you can create powerful multi-platform audio
applications with just a few lines of code. Snack has commands for basic sound
handling, such as playback, recording, file and socket I/O. Snack also provides
primitives for sound visualization, e.g. waveforms and spectrograms. It was
developed mainly to handle digital recordings of speech, but is just as useful
for general audio. Snack has also successfully been applied to other
one-dimensional signals. The combination of Snack and a scripting language
makes it possible to create sound tools and applications with a minimum of
effort. This is due to the rapid development nature of scripting languages. As
a bonus you get an application that is cross-platform from start. It is also
easy to integrate Snack based applications with existing sound analysis
software.
2009-03-17 22:29:21 +00:00
%package devel
Summary: Development files for Snack Sound Toolkit
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
This package contains development files for the Snack Sound Toolkit.
2008-09-12 21:14:51 +00:00
%package -n python-%{realname}
Summary: Python bindings for Snack Sound Toolkit
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
%description -n python-%{realname}
This package contains python bindings for the Snack Sound Toolkit. Tcl, Tk, and
Tkinter are also required to use Snack.
%prep
%setup -q -n %{realname}%{version}
%patch0 -p1 -b .nomp3
%patch1 -p1 -b .extracflags
%patch2 -p1 -b .shared-stubs
2008-09-22 18:37:30 +00:00
%patch3 -p1 -b .newALSA
2008-09-12 21:14:51 +00:00
chmod -x generic/*.c generic/*.h unix/*.c COPYING README demos/python/*
iconv -f iso-8859-1 -t utf-8 -o README{.utf8,}
mv README{.utf8,}
sed -i -e 's|\r||g' demos/python/*.txt
%build
cd unix/
2009-07-22 21:33:58 +00:00
%configure --disable-static --with-tcl=%{_libdir} --with-tk=%{_libdir} --with-ogg-include=%{_includedir} --with-ogg-lib=%{_libdir} --enable-alsa
2008-09-12 21:14:51 +00:00
make %{?_smp_mflags} EXTRACFLAGS="%{optflags}"
cd ../python
%{__python} setup.py build
%install
rm -rf %{buildroot}
2009-03-17 22:29:21 +00:00
pushd unix/
2008-09-12 21:14:51 +00:00
make install DESTDIR=%{buildroot}
find %{buildroot} -name '*.la' -exec rm -f {} ';'
2009-03-17 22:29:21 +00:00
popd
pushd python
2008-09-12 21:14:51 +00:00
%{__python} setup.py install --skip-build --root %{buildroot}
install -d %{buildroot}%{tcl_sitearch}
mv %{buildroot}%{_libdir}/%{realname}2.2 %{buildroot}%{tcl_sitearch}/%{realname}2.2
chmod -x %{buildroot}%{tcl_sitearch}/%{realname}2.2/snack.tcl
2009-03-17 22:29:21 +00:00
popd
# Devel bits
mkdir -p %{buildroot}%{_includedir}
install -p generic/*.h %{buildroot}%{_includedir}
install -p unix/snackConfig.sh %{buildroot}%{_libdir}
2008-09-12 21:14:51 +00:00
%clean
rm -rf %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc COPYING README
%{_libdir}/libsnackstub2.2.so
%{tcl_sitearch}/%{realname}2.2/
2009-03-17 22:29:21 +00:00
%files devel
%defattr(-,root,root,-)
%{_includedir}/*.h
%{_libdir}/snackConfig.sh
2008-09-12 21:14:51 +00:00
%files -n python-%{realname}
%defattr(-,root,root,-)
%doc doc/python-man.html demos/python/
%{python_sitelib}/tkSnack*
%changelog
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.10-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
2009-07-22 21:33:58 +00:00
* Wed Jul 22 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 2.2.10-11
- turn alsa back on, /dev/dsp is dead
2009-03-17 22:29:21 +00:00
* Mon Mar 16 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 2.2.10-10
- enable -devel package
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.10-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
2008-12-25 03:24:03 +00:00
* Wed Dec 24 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 2.2.10-8
- fix missing BR: libXft-devel
2008-11-29 17:21:19 +00:00
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.2.10-7
- Rebuild for Python 2.6
2008-10-22 18:19:46 +00:00
* Wed Oct 22 2008 Tom "spot" Callaway <tcallawa@redhat.com> 2.2.10-6
- disable alsa (bz 463259)
2008-09-22 18:37:30 +00:00
* Mon Sep 22 2008 Tom "spot" Callaway <tcallawa@redhat.com> 2.2.10-5
- fix to work with new alsa (from Jeremiah at Myah OS)
* Thu Sep 18 2008 Tom "spot" Callaway <tcallawa@redhat.com> 2.2.10-4
- *sigh* hardcoding the tcl version is the only way to get it through the buildsystem
2008-09-17 19:05:34 +00:00
* Wed Sep 17 2008 Tom "spot" Callaway <tcallawa@redhat.com> 2.2.10-3
- don't hardcode tcl abi version
2008-09-12 21:14:51 +00:00
* Mon Aug 4 2008 Tom "spot" Callaway <tcallawa@redhat.com> 2.2.10-2
- add BR: python
* Wed Jun 11 2008 Tom "spot" Callaway <tcallawa@redhat.com> 2.2.10-1
- Initial package for Fedora