packages: tcl-snack/tcl-snack.spec - packaging improvements pld ways

glen glen at pld-linux.org
Thu Feb 25 23:40:42 CET 2010


Author: glen                         Date: Thu Feb 25 22:40:42 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- packaging improvements pld ways

---- Files affected:
packages/tcl-snack:
   tcl-snack.spec (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: packages/tcl-snack/tcl-snack.spec
diff -u packages/tcl-snack/tcl-snack.spec:1.2 packages/tcl-snack/tcl-snack.spec:1.3
--- packages/tcl-snack/tcl-snack.spec:1.2	Thu Feb 25 23:29:29 2010
+++ packages/tcl-snack/tcl-snack.spec	Thu Feb 25 23:40:37 2010
@@ -1,5 +1,5 @@
 # $Revision$, $Date$
-%define realname snack
+%define		realname	snack
 Summary:	Sound toolkit
 Name:		tcl-%{realname}
 Version:	2.2.10
@@ -17,6 +17,8 @@
 BuildRequires:	libogg-devel
 BuildRequires:	libvorbis-devel
 BuildRequires:	python-devel
+BuildRequires:	rpmbuild(macros) >= 1.219
+BuildRequires:	sed >= 4.0
 BuildRequires:	tcl-devel
 BuildRequires:	tk-devel
 BuildRequires:	xorg-lib-libXft-devel
@@ -26,19 +28,21 @@
 
 %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.
+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.
 
 %package devel
 Summary:	Development files for Snack Sound Toolkit
@@ -89,17 +93,19 @@
 %{__make} -C unix install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
-
 cd python
 %{__python} setup.py install \
-	--root $RPM_BUILD_ROOT \
-	--skip-build
+	--skip-build \
+	--optimize=2 \
+	--root $RPM_BUILD_ROOT
+cd -
+install -d $RPM_BUILD_ROOT%{_examplesdir}/python-%{realname}-%{version}
+cp -a demos/python/* $RPM_BUILD_ROOT%{_examplesdir}/python-%{realname}-%{version}
+
+%py_postclean
 
 install -d $RPM_BUILD_ROOT%{tcl_sitearch}
 mv $RPM_BUILD_ROOT%{_libdir}/%{realname}2.2 $RPM_BUILD_ROOT%{tcl_sitearch}/%{realname}2.2
-chmod -x $RPM_BUILD_ROOT%{tcl_sitearch}/%{realname}2.2/snack.tcl
-cd -
 
 # Devel bits
 install -d $RPM_BUILD_ROOT%{_includedir}
@@ -114,9 +120,14 @@
 
 %files
 %defattr(644,root,root,755)
-%doc COPYING README
-%{_libdir}/libsnackstub2.2.so
-%{tcl_sitearch}/%{realname}2.2/
+%doc README
+%attr(755,root,root) %{_libdir}/libsnackstub2.2.so
+%dir %{tcl_sitearch}/%{realname}2.2
+%{tcl_sitearch}/%{realname}2.2/pkgIndex.tcl
+%{tcl_sitearch}/%{realname}2.2/snack.tcl
+%attr(755,root,root) %{tcl_sitearch}/%{realname}2.2/libsnack.so
+%attr(755,root,root) %{tcl_sitearch}/%{realname}2.2/libsnackogg.so
+%attr(755,root,root) %{tcl_sitearch}/%{realname}2.2/libsound.so
 
 %files devel
 %defattr(644,root,root,755)
@@ -125,8 +136,12 @@
 
 %files -n python-%{realname}
 %defattr(644,root,root,755)
-%doc doc/python-man.html demos/python/
-%{py_sitedir}/tkSnack*
+%doc doc/python-man.html
+%{py_sitescriptdir}/tkSnack.py[co]
+%if "%{py_ver}" > "2.4"
+%{py_sitescriptdir}/tkSnack-*.egg-info
+%endif
+%{_examplesdir}/python-%{realname}-%{version}
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -134,6 +149,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.3  2010/02/25 22:40:37  glen
+- packaging improvements pld ways
+
 Revision 1.2  2010/02/25 22:29:29  glen
 - add glibc2.10.patch from debian
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/tcl-snack/tcl-snack.spec?r1=1.2&r2=1.3&f=u



More information about the pld-cvs-commit mailing list