modernize spec file

This commit is contained in:
Tom Callaway 2016-01-26 13:54:26 -05:00
parent 0b895944d2
commit e33a5e92e4
1 changed files with 12 additions and 16 deletions

View File

@ -2,14 +2,14 @@
# 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.6}
%{!?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
%{!?tcl_version: %global tcl_version 8.6}
%{!?tcl_sitearch: %global tcl_sitearch %{_libdir}/tcl%{tcl_version}}
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%global realname snack
Name: tcl-%{realname}
Version: 2.2.10
Release: 26%{?dist}
Release: 27%{?dist}
Summary: Sound toolkit
Group: System Environment/Libraries
# generic/snackDecls.h, generic/snackStubInit.c and generic/snackStubLib.c
@ -33,7 +33,6 @@ Patch2: snack2.2.10-shared-stubs.patch
Patch3: snack2.2.10-newALSA.patch
Patch4: tcl-snack-2.2.10-CVE-2012-6303-fix.patch
Patch5: snack2.2.10-format-security.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: tcl-devel, tk-devel, libogg-devel, libvorbis-devel
BuildRequires: libXft-devel
BuildRequires: alsa-lib-devel
@ -59,7 +58,7 @@ software.
%package devel
Summary: Development files for Snack Sound Toolkit
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
This package contains development files for the Snack Sound Toolkit.
@ -67,7 +66,7 @@ This package contains development files for the Snack Sound Toolkit.
%package -n python-%{realname}
Summary: Python bindings for Snack Sound Toolkit
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n python-%{realname}
This package contains python bindings for the Snack Sound Toolkit. Tcl, Tk, and
@ -95,7 +94,6 @@ cd ../python
%{__python} setup.py build
%install
rm -rf %{buildroot}
pushd unix/
make install DESTDIR=%{buildroot}
find %{buildroot} -name '*.la' -exec rm -f {} ';'
@ -113,30 +111,28 @@ mkdir -p %{buildroot}%{_includedir}
install -p generic/*.h %{buildroot}%{_includedir}
install -p unix/snackConfig.sh %{buildroot}%{_libdir}
%clean
rm -rf %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc COPYING README LICENSE-ffa.c.txt
%doc README
%license COPYING LICENSE-ffa.c.txt
%{_libdir}/libsnackstub2.2.so
%{tcl_sitearch}/%{realname}2.2/
%files devel
%defattr(-,root,root,-)
%{_includedir}/*.h
%{_libdir}/snackConfig.sh
%files -n python-%{realname}
%defattr(-,root,root,-)
%doc doc/python-man.html demos/python/
%{python_sitelib}/tkSnack*
%changelog
* 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