%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Summary: Vnc screen recorder Name: pyvnc2swf Version: 0.9.3 Release: 4%{?dist} License: GPLv2+ Group: System Environment/Base URL: http://www.unixuser.org/~euske/vnc2swf/pyvnc2swf.html Source0: http://www.unixuser.org/~euske/vnc2swf/%{name}-%{version}.tar.gz # This desktop icon is a combination of the icons for vnc viewer, swfdec # player, screenshot, and an arrow from gthumb. Source1: %{name}.png # This desktop file was created by hand. Source2: %{name}.desktop Patch0: %{name}.0.9.3.exit_after_usage.diff BuildArch: noarch BuildRequires: python BuildRequires: desktop-file-utils Requires: pygame Requires: tkinter Requires: hicolor-icon-theme BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description Vnc2swf is a cross-platform screen recording tool creating ShockWave Flash (swf) format media. %prep %setup -q %patch0 -p1 %build # included make is for the author to make web releases of the application. %install %{__rm} -rf %{buildroot} mkdir -p %{buildroot}%{python_sitelib}/pyvnc2swf install -p -m 0755 pyvnc2swf/* %{buildroot}%{python_sitelib}/pyvnc2swf %{__rm} %{buildroot}%{python_sitelib}/pyvnc2swf/play.py mkdir -p %{buildroot}%{_bindir} install -m 755 bin/recordwin.sh %{buildroot}%{_bindir} # create symlinks in /usr/bin for easy access to the cli tools ## rpmlint generates W: dangling-relative-symlink ## cd %{buildroot}%{python_sitelib}/pyvnc2swf/ ## ln -s vnc2swf.py ../../../../bin/vnc2swf cd %{buildroot}%{_bindir} ln -s ../..%{python_sitelib}/pyvnc2swf/vnc2swf.py vnc2swf ln -s ../..%{python_sitelib}/pyvnc2swf/edit.py vnc2swf-edit ## or is it better to just use the actual path ? ## ln -s vnc2swf ../lib/python2.5/site-packages/pyvnc2swf/vnc2swf.py mkdir -p %{buildroot}/%{_datadir}/icons/hicolor/48x48/apps/ install -p -m 644 %{SOURCE1} \ %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/ mkdir -p %{buildroot}%{_datadir}/applications desktop-file-install --vendor fedora \ --dir %{buildroot}%{_datadir}/applications %{SOURCE2} %clean %{__rm} -rf %{buildroot} %post touch --no-create %{_datadir}/icons/hicolor || : if [ -x %{_bindir}/gtk-update-icon-cache ]; then %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : fi %postun touch --no-create %{_datadir}/icons/hicolor || : if [ -x %{_bindir}/gtk-update-icon-cache ]; then %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : fi %files %defattr(-, root, root, -) %doc README.txt LICENCE.TXT docs/*.html %{python_sitelib}/pyvnc2swf #%{python_sitelib}/* %{_bindir}/vnc2swf* %{_bindir}/recordwin.sh %{_datadir}/applications/fedora-%{name}.desktop %{_datadir}/icons/hicolor/*/apps/%{name}.png # x11vnc is required for this so exclude it for now. %exclude %{_bindir}/recordwin.sh %changelog * Sat Aug 16 2008 David Timms 0.9.3-4 - fix rpmlint W: symlink-should-be-relative - mod to use file exclude for the recordwin scripts * Wed Jul 16 2008 David Timms 0.9.3-3 - del preun symbolic link removes - already done by files section - add Requires hicolor-icon-theme, so that icon dir is owned correctly - fix license tag to GPLv2+ since sources say: or later version - fix some comments spelling * Sat Jun 21 2008 David Timms 0.9.3-2 - del bash wrapper scripts, create symlinks instead. - fix the python_sitelib generation - del play.py from package, since it requires pymedia libary - del recordwin.sh from package, since it requires x11vnc * Fri Jun 13 2008 David Timms 0.9.3-1 - del explicit python requires; rpm picks this up automatically - add Requires: pygame - add wrapper scripts for vnc2swf.py, edit.py and play.py * Sun May 25 2008 David Timms 0.9.3-0.2 - add BR desktop-file-utils since it now installs the desktop file and icon. * Sat May 24 2008 David Timms 0.9.3-0.1 - initial package for fedora.