# sitelib for noarch packages, sitearch for others (remove the unneeded one) %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} #%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Name: tivion Version: 0.0.3 Release: 1%{?dist} Summary: Plays some streaming TV and radio channels available Group: Development/Languages License: GPLv3 URL: https://launchpad.net/tivion Source0: http://launchpad.net/tivion/trunk/tivion-%{version}/+download/tivion_%{version}-0ubuntu1~karmic.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: /usr/bin/dos2unix, python-devel, gettext-devel, pygtk2-devel >= 2.16 Requires: mplayer, python, gettext, pygtk >= 2.16 %description A simple player to online TV streaming. It plays some streaming TV and radio channels available. For the moment, 447 channels from 67 countries. %prep %setup -q %build # Remove CFLAGS=... for noarch packages (unneeded) #CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT #%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT for DIR in %{_bindir} %{_datadir}/locale %{_datadir}/applications %{_datadir}/%{name} %{python_sitelib} %{_mandir}/man1; do mkdir -p ${RPM_BUILD_ROOT}/$DIR; done dos2unix src/*.py chmod 0755 src/*.py install -m 0755 -c src/tivion ${RPM_BUILD_ROOT}/%{_bindir}/ rm ./src/lang/*/LC_MESSAGES/*.po cp -r ./src/lang/* ${RPM_BUILD_ROOT}/%{_datadir}/locale/ chmod 0644 debian/* cp debian/tivion.1 ${RPM_BUILD_ROOT}/%{_mandir}/man1/ install -c -m 0644 src/tivion.desktop ${RPM_BUILD_ROOT}/%{_datadir}/${name}/ for PY in src/channels.py src/constants.py src/countries.py src/data src/tivion.pot src/tivion.py src/utils.py; do cp -r $PY ${RPM_BUILD_ROOT}/%{python_sitelib}/ done %find_lang %{name} %clean rm -rf $RPM_BUILD_ROOT %files -f %{name}.lang %defattr(-,root,root,-) %doc AUTHORS README THANKS debian/README.Debian debian/changelog debian/copyright # For noarch packages: sitelib #%{python_sitelib}/* # For arch-specific packages: sitearch %{python_sitearch}/* %{_bindir}/tivion %{_mandir}/man1/tivion.1* %{_datadir}/tivion.desktop %changelog * Mon Dec 14 2009 "Angel Guzman Maeso" 0.0.3-1 - Initial spec