[nicotine+] - Update to 1.2.16 - Repack source to remove nonfree sound themes (licensed under CC Sampling Plus

Mohamed ElMorabity melmorabity at fedoraproject.org
Tue Nov 9 14:04:01 UTC 2010


commit b4f7172d9710c7473d59b0a02168a288e26a6a89
Author: builder <builder at localhost.localdomain>
Date:   Tue Nov 9 15:03:39 2010 +0100

    - 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

 .gitignore                                   |    1 +
 nicotine+-1.2.15-about_menu_item.patch       |   12 -----
 nicotine+-1.2.15-urls_commands.patch         |   12 -----
 nicotine+-1.2.16-documentation.patch         |   18 +++++++
 nicotine+-1.2.16-remove_nonfree_sounds.patch |   20 ++++++++
 nicotine+-1.2.16-urls_commands.patch         |   12 +++++
 nicotine+-generate-tarball.sh                |   13 +++++
 nicotine+.spec                               |   62 ++++++++++++++++++-------
 sources                                      |    2 +-
 9 files changed, 109 insertions(+), 43 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index a958f1c..f1b4de3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 nicotine+-1.2.15.tar.bz2
+/nicotine+-1.2.16-without-nonfree-sounds.tar.bz2
diff --git a/nicotine+-1.2.16-documentation.patch b/nicotine+-1.2.16-documentation.patch
new file mode 100644
index 0000000..f6a9440
--- /dev/null
+++ b/nicotine+-1.2.16-documentation.patch
@@ -0,0 +1,18 @@
+diff -up nicotine+-1.2.16/setup.py.orig nicotine+-1.2.16/setup.py
+--- nicotine+-1.2.16/setup.py.orig	2010-11-09 13:52:43.000000000 +0100
++++ nicotine+-1.2.16/setup.py	2010-11-09 14:01:13.142538313 +0100
+@@ -100,12 +100,8 @@ for mo in mo_dirs:
+ 		files.append((os.path.join(sys.prefix, "share", "locale", lang, "LC_MESSAGES"), [os.path.join(mo, "nicotine.mo")]))
+ 
+ # data_files (documentation)
+-doc_files = glob.glob(os.path.join("doc", "*"))
+-for file in doc_files:
+-	if is_windows:
+-		files.append((os.path.join("share", "nicotine", "documentation"), [file]))
+-	else:
+-		files.append((os.path.join(sys.prefix, "share", "nicotine", "documentation"), [file]))
++doc_file = os.path.join("doc","NicotinePlusGuide.html")
++files.append((os.path.join(sys.prefix, "share", "nicotine", "documentation"), [doc_file]))
+ 
+ if __name__ == '__main__' :
+ 	from pynicotine.utils import version
diff --git a/nicotine+-1.2.16-remove_nonfree_sounds.patch b/nicotine+-1.2.16-remove_nonfree_sounds.patch
new file mode 100644
index 0000000..6303538
--- /dev/null
+++ b/nicotine+-1.2.16-remove_nonfree_sounds.patch
@@ -0,0 +1,20 @@
+diff -up nicotine+-1.2.16/setup.py.orig nicotine+-1.2.16/setup.py
+--- nicotine+-1.2.16/setup.py.orig	2010-01-17 22:57:24.000000000 +0100
++++ nicotine+-1.2.16/setup.py	2010-11-09 14:25:45.888948250 +0100
+@@ -99,16 +99,6 @@ for mo in mo_dirs:
+ 	else:
+ 		files.append((os.path.join(sys.prefix, "share", "locale", lang, "LC_MESSAGES"), [os.path.join(mo, "nicotine.mo")]))
+ 
+-# data_files (sounds)
+-sound_dirs = glob.glob(os.path.join("sounds", "*"))
+-for sounds in sound_dirs:
+-	p, theme = os.path.split(sounds)
+-	for file in ["private.ogg", "room_nick.ogg", "details.txt", "license.txt"]:
+-		if is_windows:
+-			files.append((os.path.join("share", "nicotine", "sounds", theme), [os.path.join(sounds, file)]))
+-		else:
+-			files.append((os.path.join(sys.prefix, "share", "nicotine", "sounds", theme), [os.path.join(sounds, file)]))
+-
+ # data_files (documentation)
+ doc_files = glob.glob(os.path.join("doc", "*"))
+ for file in doc_files:
diff --git a/nicotine+-1.2.16-urls_commands.patch b/nicotine+-1.2.16-urls_commands.patch
new file mode 100644
index 0000000..4ccb34c
--- /dev/null
+++ b/nicotine+-1.2.16-urls_commands.patch
@@ -0,0 +1,12 @@
+diff -up nicotine+-1.2.16/pynicotine/config.py.orig nicotine+-1.2.16/pynicotine/config.py
+--- nicotine+-1.2.16/pynicotine/config.py.orig	2010-07-22 15:32:20.000000000 +0200
++++ nicotine+-1.2.16/pynicotine/config.py	2010-11-09 13:32:15.176945245 +0100
+@@ -318,7 +318,7 @@ class Config:
+ \
+ "urls":{
+ 	"urlcatching":1, \
+-	"protocols":{"http":"", "https":""}, \
++	"protocols":{"http":"xdg-open \"%s\"", "https":"xdg-open \"%s\""}, \
+ 	"humanizeurls":1, \
+ 	}, \
+ \
diff --git a/nicotine+-generate-tarball.sh b/nicotine+-generate-tarball.sh
new file mode 100644
index 0000000..3fb4e68
--- /dev/null
+++ b/nicotine+-generate-tarball.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# Regenerate nicotine+ tarball without nonfree sound themes (licensed under CC
+# Sampling Plus 1.0).
+# Original tarball can be found at:
+# http://129.125.101.92/nicotine+/nicotine+-$VERSION.tar.bz2
+
+VERSION=$1
+
+tar -xjf nicotine+-$VERSION.tar.bz2
+rm -r nicotine+-$VERSION/sounds
+patch -d nicotine+-$VERSION -p1 < nicotine+-1.2.16-remove_nonfree_sounds.patch
+tar -cjf nicotine+-$VERSION-without-nonfree-sounds.tar.bz2 nicotine+-$VERSION
diff --git a/nicotine+.spec b/nicotine+.spec
index b908bf8..8e220d1 100644
--- a/nicotine+.spec
+++ b/nicotine+.spec
@@ -6,25 +6,31 @@
 %global nicotine_pythonsitedir py%{alt_name}
 
 Name:           nicotine+
-Version:        1.2.15
-Release:        3%{?dist}
-Summary:        A client for the SoulSeek filesharing network
+Version:        1.2.16
+Release:        1%{?dist}
+Summary:        A client for the SoulSeek file sharing network
 
 Group:          Applications/Internet
 License:        GPLv3+
 URL:            http://www.nicotine-plus.org/
-Source0:        http://129.125.101.92/%{name}/%{name}-%{version}.tar.bz2
+Source0:        %{name}-%{version}-without-nonfree-sounds.tar.bz2
+# 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
+# Remove nonfree sound themes
+Patch0:         nicotine+-1.2.16-remove_nonfree_sounds.patch
 # Use xdg-open to open URLs
-Patch0:         nicotine+-1.2.15-urls_commands.patch
-# Correct missing icon in the "About" menu item
-Patch1:         nicotine+-1.2.15-about_menu_item.patch
+Patch1:         nicotine+-1.2.16-urls_commands.patch
+# Disable installation of documentation files, except the manual needed by
+# application help
+Patch2:         nicotine+-1.2.16-documentation.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  desktop-file-utils
 BuildRequires:  gettext
 BuildRequires:  pygobject2
-BuildRequires:  python2-devel
-Requires:       gstreamer-python
 Requires:       notify-python
 Requires:       pygtk2-libglade
 Requires:       python-GeoIP
@@ -34,15 +40,15 @@ Requires:       xdg-utils
 BuildArch:      noarch
 
 %description
-Nicotine+ is a client for the SoulSeek filesharing network. It was "forked" from
-Nicotine, Hyriand's Soulseek client, which in turn was forked from the
+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
 %setup -q
-%patch0 -p1 -b .urls_commands
-%patch1 -p1 -b .about_menu_item
+%patch1 -p1 -b .urls_commands
+%patch2 -p1 -b .documentation
 
 # Remove shebangs
 pushd pynicotine
@@ -53,6 +59,12 @@ for file in gtkgui/glade2py.py metadata_mutagen.py mp3.py _testmp3.py upnp.py; d
 done
 popd
 
+# Disable sounds in default configuration (since there is no more sound themes)
+sed -i "s|\"soundenabled\": 1|\"soundenabled\": 0|" pynicotine/config.py
+
+# Fix icon name in .desktop file
+sed -i "s|Icon=nicotine-plus|Icon=nicotine-plus-32px|" files/%{alt_name}.desktop
+
 
 %build
 %{__python} setup.py build
@@ -65,8 +77,9 @@ rm -rf $RPM_BUILD_ROOT
   --skip-build \
   --root $RPM_BUILD_ROOT
 
-# Remove useless documentation
-rm -f $RPM_BUILD_ROOT%{_datadir}/%{alt_name}/documentation/{BUILD_win32.txt,py2app,README.trayicon}
+# 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
 
@@ -79,11 +92,10 @@ rm -rf $RPM_BUILD_ROOT
 
 %files -f %{alt_name}.lang
 %defattr(-,root,root,-)
-%doc COPYING
-%{_bindir}/nicotine*
+%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}/%{alt_name}/sounds
 %{_datadir}/applications/*.desktop
 %{_datadir}/pixmaps/*.png
 %{_mandir}/man1/*.1.gz
@@ -92,6 +104,20 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Tue Nov 09 2010 Mohamed El Morabity <melmorabity at fedoraproject.org> - 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 <dmalcolm at redhat.com> - 1.2.15-3
 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
 
diff --git a/sources b/sources
index 2aa2ca0..8989e9a 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-05dbaa15f51509f376833dfb0ad4e8ad  nicotine+-1.2.15.tar.bz2
+61382986b03bac2e0868a3cf4863e0ce  nicotine+-1.2.16-without-nonfree-sounds.tar.bz2


More information about the scm-commits mailing list