%global snapshot 20130303 %global revision 1518 %global alt_name nicotine %global nicotine_pythonsitedir py%{alt_name} Name: nicotine+ Version: 1.2.17 Release: 0.n0i.1%{?snapshot:.%{snapshot}svn%{revision}}%{?dist} Summary: A client for the SoulSeek file sharing network Group: Applications/Internet License: GPLv3+ URL: http://www.nicotine-plus.org/ %if %{?snapshot:1}0 Source0: %{name}-%{snapshot}.tar.bz2 %else Source0: %{name}-%{version}-without-nonfree-sounds.tar.bz2 %endif # nicotine+ contains nonfree sounds, licensed under CC Sampling Plus # 1.0. Therefore we use this script to remove these files before shipping # it. Download the upstream tarball and invoke this script while in the # tarball's directory Source1: %{name}-generate-tarball.sh # + drop developer tools too (e.g. win32 installer) Source2: %{name}-snapshot.sh # Remove nonfree sound themes Patch0: nicotine+-1.2.16-remove_nonfree_sounds.patch # Use xdg-open to open URLs Patch1: nicotine+-urls_commands.patch # Disable installation of documentation files, except the manual needed by # application help Patch2: nicotine+-1.2.16-documentation.patch BuildRequires: desktop-file-utils BuildRequires: gettext BuildRequires: pygobject2 Requires: notify-python Requires: pygtk2-libglade Requires: python-GeoIP Requires: python-mutagen Requires: python-sexy Requires: xdg-utils BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description Nicotine+ is a client for the SoulSeek file sharing network. It was "forked" from Nicotine, Hyriand's Soulseek client, which in turn was forked from the PySoulSeek project by Alexander Kanavin. %prep %if %{?snapshot:1}0 %setup -q -n %{name}-%{snapshot} %else %setup -q %endif %patch1 -p0 -b .urls_commands %patch2 -p1 -b .documentation # Remove shebangs pushd pynicotine for file in gtkgui/glade2py.py metadata_mutagen.py mp3.py _testmp3.py upnp.py; do sed -i.orig -e 1d $file && \ touch -r $file.orig $file && \ rm $file.orig done popd # Disable sounds in default configuration (since there is no more sound themes) sed -i "s|\"soundenabled\": 1|\"soundenabled\": 0|" pynicotine/config.py %build %{__python} setup.py build %install %{__python} setup.py install \ --skip-build \ --root $RPM_BUILD_ROOT # Install the SVG version of the icon install -Dpm 0644 files/nicotine-plus.svg $RPM_BUILD_ROOT/%{_datadir}/pixmaps/nicotine-plus.svg # Rename nicotine.py executable to nicotine mv $RPM_BUILD_ROOT/%{_bindir}/%{alt_name}.py $RPM_BUILD_ROOT/%{_bindir}/%{alt_name} sed -i "s|Exec=%{alt_name}.py|Exec=%{alt_name}|" $RPM_BUILD_ROOT/%{_datadir}/applications/%{alt_name}.desktop desktop-file-validate $RPM_BUILD_ROOT/%{_datadir}/applications/%{alt_name}.desktop %find_lang %{alt_name} %files -f %{alt_name}.lang %defattr(-,root,root,-) %doc COPYING doc/{CHANGELOG,CHANGELOG_DOCS,KNOWN_BUGS,MAINTAINERS,README,README.import-winconfig,TODO,TRANSLATIONS,TRANSLATORS} %{_bindir}/* %dir %{_datadir}/%{alt_name} %doc %{_datadir}/%{alt_name}/documentation %{_datadir}/applications/*.desktop %{_datadir}/pixmaps/* %{_mandir}/man1/*.1.gz %{python_sitelib}/*.egg-info %{python_sitelib}/%{nicotine_pythonsitedir} %changelog * Sun Mar 03 2013 Marius FERARU - 1.2.17-0.n0i.1.20130303svn1518 - current svn build (r1518) - provide a different snapshot builder that strips more junk - drop obsolete patches - updated URL commands patch * Fri Jan 13 2012 Fedora Release Engineering - 1.2.16-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Wed Mar 16 2011 Mohamed El Morabity - 1.2.16-4 - Add nicotine+-1.2.16-ListModels_casts.patch to fix http://www.nicotine-plus.org/ticket/726 - Add nicotine+-1.2.16-tab_labels.patch to fix http://www.nicotine-plus.org/ticket/727 - Install (and use) a SVG icon for the application menu - Spec cleanup * Tue Feb 08 2011 Fedora Release Engineering - 1.2.16-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Wed Dec 29 2010 Mohamed El Morabity - 1.2.16-2 - Add nicotine+-1.2.16-RHBZ662786.patch paych to fix RHBZ #66278 * Tue Nov 09 2010 Mohamed El Morabity - 1.2.16-1 - Update to 1.2.16 - Repack source to remove nonfree sound themes (licensed under CC Sampling Plus 1.0) - Drop nicotine+-1.2.15-about_menu_item.patch patches (fixed upstream) - Fix nicotine+-1.2.15-urls_commands.patch patch (typo) and rename to nicotine+-1.2.16-urls_commands.patch - Remove useless Requires gstreamer-python - Disable sounds in default configuration (since there is no more sound themes) - Fix icon name in .desktop file - Add nicotine+-1.2.16-documentation.patch to disable documentation installation in %%{_datadir} (except NicotinePlusGuide.html, needed by application help) - Rename nicotine.py executable to nicotine * Wed Jul 21 2010 David Malcolm - 1.2.15-3 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild * Sat Feb 20 2010 ELMORABITY Mohamed 1.2.15-2 - Add nicotine+-1.2.15-about_menu_item.patch patch to add missing icon in the "About" menu item * Sat Feb 20 2010 ELMORABITY Mohamed 1.2.15-1 - Update to 1.2.15 - Drop nicotine+-1.2.14-glade_install.patch / nicotine+-1.2.14-desktop.patch / nicotine+-1.2.14-commands.patch / nicotine+-1.2.14-guide.patch patches (merged upstream) - Add nicotine+-1.2.15-urls_commands.patch to set xdg-open as the default program to open URLS - Update .spec from new Python guidelines * Mon Jan 25 2010 ELMORABITY Mohamed 1.2.14-6 - Own directory %%{_datadir}/%%{alt_name} * Thu Jan 14 2010 ELMORABITY Mohamed 1.2.14-5 - Drop no-shebang patch for a sed command * Sat Jan 2 2010 ELMORABITY Mohamed 1.2.14-4 - Add nicotine+-1.2.14-guide.patch to force the application to retrieve the installed guide in the right place * Fri Jan 1 2010 ELMORABITY Mohamed 1.2.14-3 - Update nicotine+-1.2.14-commands.patch patch to use GStreamer to play audio effects * Fri Jan 1 2010 ELMORABITY Mohamed 1.2.14-2 - Add nicotine+-1.2.14-commands.patch patch to set xdg-open as the default program to open files or URLs - Add therefore Requires on xdg-utils * Sun Dec 27 2009 ELMORABITY Mohamed 1.2.14-1 - Initial RPM release