tcl-snack/tcl-snack.spec

299 lines
12 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.
2016-01-26 18:54:26 +00:00
%{!?tcl_version: %global tcl_version 8.6}
%{!?tcl_sitearch: %global tcl_sitearch %{_libdir}/tcl%{tcl_version}}
%global realname snack
2008-09-12 21:14:51 +00:00
Name: tcl-%{realname}
Version: 2.2.10
Release: 52%{?dist}
2008-09-12 21:14:51 +00:00
Summary: Sound toolkit
2013-02-12 21:04:04 +00:00
# generic/snackDecls.h, generic/snackStubInit.c and generic/snackStubLib.c
# are under the TCL "license.terms", a copy of which can be found in the tcl package.
2019-07-30 21:24:36 +00:00
License: GPLv2+ and TCL and BSD
2008-09-12 21:14:51 +00:00
URL: http://www.speech.kth.se/snack/
# The upstream source has two files which implement MP3 decoding.
# ./generic/jkFormatMP3.c and ./generic/jkFormatMP3.h
2019-07-30 21:24:36 +00:00
# Those files are non-free so we cannot ship that code, thus, the modified tarball.
# We implement MP3 support the same way that Debian does (libsnackmpg)
2013-02-12 21:04:04 +00:00
# Also, mac/snack.mcp.sit.hqx is a mysterious old compressed file with no clear license.
# It is removed.
2008-09-12 21:14:51 +00:00
# Upstream source can be found here: http://www.speech.kth.se/snack/dist/snack2.2.10.tar.gz
Source0: %{realname}%{version}-nomp3.tar.gz
2013-02-13 21:42:21 +00:00
# License confirmation email for generic/ffa.c
Source1: LICENSE-ffa.c.txt
2019-07-30 21:24:36 +00:00
# Copied from debian sources
Source2: SnackMpg.c
Patch0: snack2.2.10-mpg123.patch
2008-09-12 21:14:51 +00:00
Patch1: snack2.2.10-extracflags.patch
2008-09-22 18:37:30 +00:00
Patch3: snack2.2.10-newALSA.patch
Patch4: tcl-snack-2.2.10-CVE-2012-6303-fix.patch
2013-12-09 21:28:16 +00:00
Patch5: snack2.2.10-format-security.patch
2019-07-30 21:24:36 +00:00
# Credit to Sergei Golovan, patches taken from Debian
2018-10-04 20:02:19 +00:00
Patch6: tcl-snack-2.2.10-python3.patch
2019-07-30 21:24:36 +00:00
Patch7: snack2.2.10-seektell-fix.patch
BuildRequires: make
BuildRequires: gcc-c++
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
2018-10-04 20:02:19 +00:00
BuildRequires: python3-devel
2019-07-30 21:24:36 +00:00
BuildRequires: mpg123-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
2016-01-26 18:54:26 +00:00
Requires: %{name}%{?_isa} = %{version}-%{release}
2009-03-17 22:29:21 +00:00
%description devel
This package contains development files for the Snack Sound Toolkit.
2018-10-04 20:02:19 +00:00
%package -n python3-%{realname}
%{?python_provide:%python_provide python3-%{realname}}
%{?python_provide:%python_provide python3-tcl-snack}
2008-09-12 21:14:51 +00:00
Summary: Python bindings for Snack Sound Toolkit
2016-01-26 18:54:26 +00:00
Requires: %{name}%{?_isa} = %{version}-%{release}
2008-09-12 21:14:51 +00:00
2018-10-04 20:02:19 +00:00
%description -n python3-%{realname}
This package contains python3 bindings for the Snack Sound Toolkit. Tcl, Tk, and
2008-09-12 21:14:51 +00:00
Tkinter are also required to use Snack.
%prep
%setup -q -n %{realname}%{version}
2019-07-30 21:24:36 +00:00
%patch0 -p1 -b .mpg123
2008-09-12 21:14:51 +00:00
%patch1 -p1 -b .extracflags
2008-09-22 18:37:30 +00:00
%patch3 -p1 -b .newALSA
%patch4 -p1 -b .CVE20126303
2013-12-09 21:28:16 +00:00
%patch5 -p1 -b .format-security
2018-10-04 20:02:19 +00:00
%patch6 -p1 -b .py3
2019-07-30 21:24:36 +00:00
%patch7 -p1 -b .seektell
2013-02-13 21:42:21 +00:00
cp %{SOURCE1} .
2019-07-30 21:24:36 +00:00
cp %{SOURCE2} generic/
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
2019-07-30 21:24:36 +00:00
make %{?_smp_mflags} EXTRACFLAGS="%{optflags}" stublib all libsnackogg.so libsnackmpg.so
2008-09-12 21:14:51 +00:00
cd ../python
2018-10-04 20:02:19 +00:00
%{__python3} setup.py build
2008-09-12 21:14:51 +00:00
%install
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
2018-10-04 20:02:19 +00:00
%{__python3} setup.py install --skip-build --root %{buildroot}
2008-09-12 21:14:51 +00:00
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
2019-07-30 21:24:36 +00:00
%filter_from_requires /libsnackstub2.2.so/d
%ldconfig_scriptlets
2008-09-12 21:14:51 +00:00
%files
2016-01-26 18:54:26 +00:00
%doc README
%license COPYING LICENSE-ffa.c.txt
2008-09-12 21:14:51 +00:00
%{tcl_sitearch}/%{realname}2.2/
2019-07-30 21:24:36 +00:00
# %%{_libdir}/libsnackstub*.so
2008-09-12 21:14:51 +00:00
2009-03-17 22:29:21 +00:00
%files devel
%{_includedir}/*.h
2019-07-30 21:24:36 +00:00
%{_libdir}/libsnackstub2.2.a
2009-03-17 22:29:21 +00:00
%{_libdir}/snackConfig.sh
2018-10-04 20:02:19 +00:00
%files -n python3-%{realname}
2008-09-12 21:14:51 +00:00
%doc doc/python-man.html demos/python/
2018-10-04 20:02:19 +00:00
%{python3_sitelib}/tkSnack*
%{python3_sitelib}/__pycache__/tkSnack*
2008-09-12 21:14:51 +00:00
%changelog
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.10-52
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
2022-06-13 13:24:26 +00:00
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 2.2.10-51
- Rebuilt for Python 3.11
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.10-50
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.10-49
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
2021-06-04 19:16:23 +00:00
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 2.2.10-48
- Rebuilt for Python 3.10
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.10-47
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.10-46
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
2020-05-26 01:51:40 +00:00
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 2.2.10-45
- Rebuilt for Python 3.9
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.10-44
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
2019-10-03 12:39:22 +00:00
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2.2.10-43
- Rebuilt for Python 3.8.0rc1 (#1748018)
2019-08-19 09:06:51 +00:00
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 2.2.10-42
- Rebuilt for Python 3.8
2019-07-30 21:24:36 +00:00
* Tue Jul 30 2019 Tom Callaway <spot@fedoraproject.org> - 2.2.10-41
- enable mp3 support the same way debian does
- fix issue where code tries to use old seektell
- disable sharedstubs, it does not work
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.10-40
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.10-39
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
2018-10-04 20:02:19 +00:00
* Thu Oct 4 2018 Tom Callaway <spot@fedoraproject.org> - 2.2.10-38
- move to python3
2018-07-23 20:23:14 +00:00
* Mon Jul 23 2018 Tom Callaway <spot@fedoraproject.org> - 2.2.10-37
- fix FTBFS
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.10-36
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Feb 21 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.2.10-35
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.10-34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.2.10-33
- Python 2 binary package renamed to python2-tcl-snack
See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.10-32
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.10-31
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.10-30
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.10-29
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.10-28
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
2016-01-26 18:54:26 +00:00
* Tue Jan 26 2016 Tom Callaway <spot@fedoraproject.org> - 2.2.10-27
- modernize spec file
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.10-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.10-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.10-24
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
2014-05-28 15:14:40 +00:00
* Wed May 28 2014 Jaroslav Škarvada <jskarvad@redhat.com> - 2.2.10-23
- Changed requires to require tcl-8.6
* Wed May 21 2014 Jaroslav Škarvada <jskarvad@redhat.com> - 2.2.10-22
- Rebuilt for https://fedoraproject.org/wiki/Changes/f21tcl86
2013-12-09 21:28:16 +00:00
* Mon Dec 9 2013 Tom Callaway <spot@fedoraproject.org> - 2.2.10-21
- fix format-security issues
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.10-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
2013-02-12 21:04:04 +00:00
* Tue Feb 12 2013 Tom Callaway <spot@fedoraproject.org> - 2.2.10-18
- remove unlicensed compressed mac file from source tarball
- update license tag to include TCL
* Wed Jan 2 2013 Tom Callaway <spot@fedoraproject.org> - 2.2.10-17
- apply fix from Michael Karcher to fix CVE-2012-6303 (bz 885893)
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.10-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.10-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.10-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.2.10-13
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
* 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