From 953d3daef982f16903d3f0042bd16d8f46796d63 Mon Sep 17 00:00:00 2001 From: Mohamed El Morabity Date: Feb 13 2017 13:20:36 +0000 Subject: - New upstream - Update to 1.4.1 - Spec cleanup - Add AppData file --- diff --git a/.gitignore b/.gitignore index f1b4de3..5f8d5bf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ nicotine+-1.2.15.tar.bz2 /nicotine+-1.2.16-without-nonfree-sounds.tar.bz2 +/nicotine+-1.4.1-without-nonfree-sounds.tar.gz diff --git a/nicotine+-1.2.16-ListModels_casts.patch b/nicotine+-1.2.16-ListModels_casts.patch deleted file mode 100644 index f006d3c..0000000 --- a/nicotine+-1.2.16-ListModels_casts.patch +++ /dev/null @@ -1,29 +0,0 @@ -Index: /trunk/nicotine+/pynicotine/gtkgui/transferlist.py -=================================================================== ---- /trunk/nicotine+/pynicotine/gtkgui/transferlist.py (revision 1317) -+++ /trunk/nicotine+/pynicotine/gtkgui/transferlist.py (revision 1463) -@@ -442,5 +442,5 @@ - if i[2] != transfer: - continue -- self.transfersmodel.set(i[1], 1, shortfn, 2, status, 3, place, 4, percent, 5, hsize, 6, speed, 7, elap, 8, left, 9, self.frame.np.decode(transfer.path), 11, istatus, 12, size, 13, currentbytes) -+ self.transfersmodel.set(i[1], 1, shortfn, 2, status, 3, str(place), 4, percent, 5, str(hsize), 6, speed, 7, elap, 8, left, 9, self.frame.np.decode(transfer.path), 11, istatus, 12, size, 13, currentbytes) - break - else: -@@ -460,5 +460,5 @@ - - path = self.frame.np.decode(transfer.path) -- iter = self.transfersmodel.append(parent, [user, shortfn, status, place, percent, hsize, speed, elap, left, path, fn, istatus, size, icurrentbytes, True]) -+ iter = self.transfersmodel.append(parent, [user, shortfn, status, str(place), percent, str(hsize), speed, elap, left, path, fn, istatus, size, icurrentbytes, True]) - - # Expand path -Index: /trunk/nicotine+/pynicotine/gtkgui/search.py -=================================================================== ---- /trunk/nicotine+/pynicotine/gtkgui/search.py (revision 1446) -+++ /trunk/nicotine+/pynicotine/gtkgui/search.py (revision 1463) -@@ -665,5 +665,5 @@ - self.filtersCheck.set_active(1) - -- for i in [0, 128, 160, 192, 256, 320]: -+ for i in ['0', '128', '160', '192', '256', '320']: - self.FilterBitrate.get_model().append([i]) - for i in [">10MiB", "<10MiB", "<5MiB", "<1MiB", ">0"]: diff --git a/nicotine+-1.2.16-RHBZ1009934.patch b/nicotine+-1.2.16-RHBZ1009934.patch deleted file mode 100644 index 39214bf..0000000 --- a/nicotine+-1.2.16-RHBZ1009934.patch +++ /dev/null @@ -1,105 +0,0 @@ -diff -up nicotine+-1.2.16/pynicotine/metadata_mutagen.py.orig nicotine+-1.2.16/pynicotine/metadata_mutagen.py ---- nicotine+-1.2.16/pynicotine/metadata_mutagen.py.orig 2009-09-30 17:53:21.000000000 +0200 -+++ nicotine+-1.2.16/pynicotine/metadata_mutagen.py 2014-07-31 01:30:44.187442933 +0200 -@@ -1,7 +1,9 @@ - #!/usr/bin/env python - -+# Python core - from __future__ import division - -+# Python modules - import mutagen - - from mutagen.mp3 import MP3, MPEGInfo -@@ -14,13 +16,20 @@ from mutagen.asf import ASFInfo - from mutagen.monkeysaudio import MonkeysAudioInfo - from mutagen.mp4 import MP4Info - -+# Application specific -+from logfacility import log -+ -+ - def detect(path): - try: - audio = mutagen.File(path) - except IOError: - return None -- # mutagen didn't think the file was audio -+ except Exception, e: -+ log.addwarning("Mutagen crashed on '%s': %s" % (path, e)) -+ return None - if not audio: -+ # mutagen didn't think the file was audio - return None - if type(audio.info) == MPEGInfo: - return processMPEG(audio) -diff -up nicotine+-1.2.16/pynicotine/shares.py.orig nicotine+-1.2.16/pynicotine/shares.py ---- nicotine+-1.2.16/pynicotine/shares.py.orig 2010-07-11 12:29:58.000000000 +0200 -+++ nicotine+-1.2.16/pynicotine/shares.py 2014-07-31 01:30:50.608262924 +0200 -@@ -5,6 +5,7 @@ import dircache - import gobject - import string, sys, os - import time -+import struct - - # N+ imports - import slskmessages -@@ -53,9 +54,13 @@ class Shares: - self.queue.put(slskmessages.SharedFoldersFiles(sharedfolders, sharedfiles)) - - def RescanShares(self, msg, rebuild=False): -- files, streams, wordindex, fileindex, mtimes = self.rescandirs(msg.shared, self.config.sections["transfers"]["sharedmtimes"], self.config.sections["transfers"]["sharedfiles"], self.config.sections["transfers"]["sharedfilesstreams"], msg.yieldfunction, self.np.frame.SharesProgress, name=_("Shares"), rebuild=rebuild) -- time.sleep(0.5) -- self.np.frame.RescanFinished([files, streams, wordindex, fileindex, mtimes], "normal") -+ try: -+ files, streams, wordindex, fileindex, mtimes = self.rescandirs(msg.shared, self.config.sections["transfers"]["sharedmtimes"], self.config.sections["transfers"]["sharedfiles"], self.config.sections["transfers"]["sharedfilesstreams"], msg.yieldfunction, self.np.frame.SharesProgress, name=_("Shares"), rebuild=rebuild) -+ time.sleep(0.5) -+ self.np.frame.RescanFinished([files, streams, wordindex, fileindex, mtimes], "normal") -+ except: -+ log.addwarning("Failed to rebuild share, serious error occurred. If this problem persists delete ~/.nicotine/*.db and try again. If that doesn't help please file a bug report with the stack trace included (see terminal output after this message)") -+ raise - - def RebuildShares(self, msg): - self.RescanShares(msg, rebuild=True) -@@ -651,23 +656,26 @@ class Shares: - def getByteStream(self, fileinfo): - message = slskmessages.SlskMessage() - -- #size = long(fileinfo[1]) -- #size1 = size & 0xffffffff -- #size2 = size >> 32 -- -- #X print "chr1-" + repr(chr(1) + message.packObject(fileinfo[0]) + message.packObject(fileinfo[1])) -- #X print "chr1+" + repr(chr(1) + message.packObject(fileinfo[0]) + message.packObject(NetworkIntType(fileinfo[1]))) - stream = chr(1) + message.packObject(fileinfo[0]) + message.packObject(NetworkLongLongType(fileinfo[1])) - if fileinfo[2] is not None: -- stream += message.packObject('mp3') + message.packObject(3) -- #X print "net-" + repr(message.packObject(0) + message.packObject(fileinfo[2][0]) + message.packObject(1) + message.packObject(fileinfo[3]) + message.packObject(2) + message.packObject(fileinfo[2][1])) -- #X print "net+" + repr(message.packObject(0) + message.packObject(NetworkIntType(fileinfo[2][0])) + message.packObject(1) + message.packObject(NetworkIntType(fileinfo[3])) + message.packObject(2) + message.packObject(NetworkIntType(fileinfo[2][1]))) -- stream += (message.packObject(0) + -- message.packObject(NetworkIntType(fileinfo[2][0])) + -- message.packObject(1) + -- message.packObject(NetworkIntType(fileinfo[3])) + -- message.packObject(2) + -- message.packObject(NetworkIntType(fileinfo[2][1]))) -+ try: -+ msgbytes = '' -+ msgbytes += message.packObject('mp3') + message.packObject(3) -+ msgbytes += (message.packObject(0) + -+ message.packObject(NetworkIntType(fileinfo[2][0])) + -+ message.packObject(1) + -+ message.packObject(NetworkIntType(fileinfo[3])) + -+ message.packObject(2) + -+ message.packObject(NetworkIntType(fileinfo[2][1]))) -+ stream += msgbytes -+ except struct.error: -+ log.addwarning(_("Found meta data that couldn't be encoded, possible corrupt file: '%(file)s' has a bitrate of %(bitrate)s kbs, a length of %(length)s seconds and a VBR of %(vbr)s" % { -+ 'file': fileinfo[0], -+ 'bitrate': fileinfo[2][0], -+ 'length': fileinfo[3], -+ 'vbr': fileinfo[2][1] -+ })) -+ stream += message.packObject('') + message.packObject(0) - else: - stream += message.packObject('') + message.packObject(0) - return stream diff --git a/nicotine+-1.2.16-RHBZ662786.patch b/nicotine+-1.2.16-RHBZ662786.patch deleted file mode 100644 index ccd7716..0000000 --- a/nicotine+-1.2.16-RHBZ662786.patch +++ /dev/null @@ -1,113 +0,0 @@ -Index: /trunk/nicotine+/pynicotine/gtkgui/privatechat.py -=================================================================== ---- /trunk/nicotine+/pynicotine/gtkgui/privatechat.py (revision 1291) -+++ /trunk/nicotine+/pynicotine/gtkgui/privatechat.py (revision 1457) -@@ -30,4 +30,7 @@ - from pynicotine.logfacility import log - -+CTCP_VERSION = "\x01VERSION\x01" -+ -+ - class PrivateChats(IconNotebook): - CMDS = set(["/alias ", "/unalias ", "/whois ", "/browse ", "/ip ", "/pm ", "/msg ", "/search ", "/usearch ", "/rsearch ", -@@ -87,5 +90,5 @@ - tab.GetUserStatus(msg.status) - -- def SendMessage(self, user, text = None, direction = None): -+ def SendMessage(self, user, text = None, direction = None, bytestring = False): - if user not in self.users: - tab = PrivateChat(self, user) -@@ -98,5 +101,5 @@ - self.set_current_page(self.page_num(self.users[user].Main)) - if text is not None: -- self.users[user].SendMessage(text) -+ self.users[user].SendMessage(text, bytestring=bytestring) - - def TabPopup(self, user): -@@ -189,10 +192,10 @@ - # SEND CLIENT VERSION to user if the following string is sent - ctcpversion = 0 -- if text == "\x01VERSION\x01": -+ if text == CTCP_VERSION: - ctcpversion = 1 - text = "CTCP VERSION" - self.users[msg.user].ShowMessage(text, status, msg.timestamp) - if ctcpversion and self.frame.np.config.sections["server"]["ctcpmsgs"] == 0: -- self.SendMessage(msg.user, "Nicotine-Plus %s" % version) -+ self.SendMessage(msg.user, u"Nicotine-Plus %s" % version) - self.frame.pluginhandler.IncomingPrivateChatNotification(msg.user, text) - -@@ -480,9 +483,9 @@ - autoreply = self.frame.np.config.sections["server"]["autoreply"] - if self.frame.away and not self.autoreplied and autoreply: -- self.SendMessage("[Auto-Message] %s" % autoreply) -+ self.SendMessage(u"[Auto-Message] %s" % autoreply) - self.autoreplied = 1 - self.frame.Notifications.new_tts(self.frame.np.config.sections["ui"]["speechprivate"] %{"user":self.frame.Notifications.tts_clean(self.user), "message": self.frame.Notifications.tts_clean(speech)} ) - -- def SendMessage(self, text): -+ def SendMessage(self, text, bytestring=False): - user_text = self.frame.pluginhandler.OutgoingPrivateChatEvent(self.user, text) - if user_text == None: -@@ -496,5 +499,5 @@ - else: - -- if text == "\x01VERSION\x01": -+ if text == CTCP_VERSION: - line = "CTCP VERSION" - else: -@@ -508,10 +511,14 @@ - self.logfile = WriteLog(self.logfile, self.frame.np.config.sections["logging"]["privatelogsdir"], self.user, line) - -+ if bytestring: -+ payload = text -+ else: -+ payload = ToBeEncoded(self.frame.AutoReplace(text), self.encoding) -+ - if self.PeerPrivateMessages.get_active(): - # not in the soulseek protocol -- self.frame.np.ProcessRequestToPeer(self.user, slskmessages.PMessageUser(None, my_username, ToBeEncoded(self.frame.AutoReplace(text), self.encoding))) -- else: -- self.frame.np.queue.put(slskmessages.MessageUser(self.user, ToBeEncoded(self.frame.AutoReplace(text), self.encoding))) -- -+ self.frame.np.ProcessRequestToPeer(self.user, slskmessages.PMessageUser(None, my_username, payload)) -+ else: -+ self.frame.np.queue.put(slskmessages.MessageUser(self.user, payload)) - - -@@ -633,5 +640,5 @@ - elif cmd == "/ctcpversion": - if args: -- self.frame.privatechats.SendMessage(args, "\x01VERSION\x01", 1) -+ self.frame.privatechats.SendMessage(args, CTCP_VERSION, 1, bytestring=True) - elif cmd in ["/clear", "/cl"]: - self.ChatScroll.get_buffer().set_text("") -Index: /trunk/nicotine+/pynicotine/gtkgui/chatrooms.py -=================================================================== ---- /trunk/nicotine+/pynicotine/gtkgui/chatrooms.py (revision 1454) -+++ /trunk/nicotine+/pynicotine/gtkgui/chatrooms.py (revision 1457) -@@ -1275,9 +1275,8 @@ - elif cmd in ["/m", "/msg"]: - if byteargs: -- s = byteargs.split(" ", 1) -- user = s[0] -- if len(s) == 2: -- msg = s[1] -- else: -+ user = byteargs.split(" ", 1)[0] -+ try: -+ msg = args.split(" ", 1)[1] -+ except IndexError: - msg = None - self.frame.privatechats.SendMessage(user, msg) -Index: /trunk/nicotine+/pynicotine/gtkgui/utils.py -=================================================================== ---- /trunk/nicotine+/pynicotine/gtkgui/utils.py (revision 1454) -+++ /trunk/nicotine+/pynicotine/gtkgui/utils.py (revision 1457) -@@ -1021,5 +1021,5 @@ - - def OnVersion(self, widget): -- self.frame.privatechats.SendMessage(self.user, "\x01VERSION\x01") -+ self.frame.privatechats.SendMessage(self.user, "\x01VERSION\x01", bytestring=True) - - def OnCopyUser(self, widget): diff --git a/nicotine+-1.2.16-documentation.patch b/nicotine+-1.2.16-documentation.patch deleted file mode 100644 index c669f5a..0000000 --- a/nicotine+-1.2.16-documentation.patch +++ /dev/null @@ -1,18 +0,0 @@ -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 2014-07-31 01:58:31.541832333 +0200 -@@ -110,12 +110,8 @@ for sounds in sound_dirs: - 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: -- 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-tab_labels.patch b/nicotine+-1.2.16-tab_labels.patch deleted file mode 100644 index c55e6f1..0000000 --- a/nicotine+-1.2.16-tab_labels.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up nicotine+-1.2.16/pynicotine/gtkgui/frame.py.orig nicotine+-1.2.16/pynicotine/gtkgui/frame.py ---- nicotine+-1.2.16/pynicotine/gtkgui/frame.py.orig 2010-10-30 15:39:55.000000000 +0200 -+++ nicotine+-1.2.16/pynicotine/gtkgui/frame.py 2011-03-16 22:48:33.373505657 +0100 -@@ -1177,6 +1177,7 @@ class NicotineFrame: - elif "TabLabel" in id: - label_tab = ImageLabel(string2, self.images["empty"]) - eventbox = gtk.EventBox() -+ eventbox.set_visible_window(False) - label_tab.show() - eventbox.add(label_tab) - eventbox.show() diff --git a/nicotine+-1.2.16-urls_commands.patch b/nicotine+-1.2.16-urls_commands.patch deleted file mode 100644 index 4ccb34c..0000000 --- a/nicotine+-1.2.16-urls_commands.patch +++ /dev/null @@ -1,12 +0,0 @@ -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+-1.4.1-documentation.patch b/nicotine+-1.4.1-documentation.patch new file mode 100644 index 0000000..d9ef778 --- /dev/null +++ b/nicotine+-1.4.1-documentation.patch @@ -0,0 +1,33 @@ +diff -up ./pynicotine/gtkgui/frame.py.orig ./pynicotine/gtkgui/frame.py +--- ./pynicotine/gtkgui/frame.py.orig 2017-02-12 13:27:48.000000000 +0100 ++++ ./pynicotine/gtkgui/frame.py 2017-02-13 12:32:56.635437036 +0100 +@@ -2521,6 +2521,9 @@ class NicotineFrame: + + paths.append(os.getcwd()) + ++ path1 = "%s/share/nicotine" % sys.prefix ++ paths.append(path1) ++ + # For distros that puts documentation in /usr/share/doc + path2 = "%s/share/doc/nicotine" % sys.prefix + paths.append(path2) +diff -up ./setup.py.orig ./setup.py +--- ./setup.py.orig 2017-02-12 13:27:48.000000000 +0100 ++++ ./setup.py 2017-02-13 12:32:44.487414755 +0100 +@@ -106,14 +106,14 @@ for sounds in sound_dirs: + ) + + # Documentation +-for (path, dirs, docfiles) in os.walk("doc"): ++for (path, dirs, docfiles) in os.walk("doc/NicotinePlusGuide"): + + dst_path = os.sep.join(path.split("/")[1:]) + + for f in docfiles: + files.append( + ( +- os.path.join(sys.prefix, "share/doc/nicotine", dst_path), ++ os.path.join(sys.prefix, "share/nicotine", dst_path), + [os.path.join(path, f)] + ) + ) diff --git a/nicotine+-generate-tarball.sh b/nicotine+-generate-tarball.sh index 279352e..8b9d2a8 100644 --- a/nicotine+-generate-tarball.sh +++ b/nicotine+-generate-tarball.sh @@ -4,8 +4,12 @@ # Sampling Plus 1.0) VERSION=$1 +SHORT_VERSION=$VERSION +[[ "$VERSION" =~ [a-z0-9]{7,} ]] && SHORT_VERSION=${VERSION:0:7} -wget http://downloads.sourceforge.net/nicotine-plus/nicotine+-$VERSION.tar.bz2 -tar -xjf nicotine+-$VERSION.tar.bz2 -rm -r nicotine+-$VERSION/sounds/ -tar -cjf nicotine+-$VERSION-without-nonfree-sounds.tar.bz2 nicotine+-$VERSION +SRC_TARBALL=nicotine+-$SHORT_VERSION.tar.gz +DEST_TARBALL=nicotine+-$SHORT_VERSION-without-nonfree-sounds.tar.gz + +curl -L -R -O https://github.com/Nicotine-plus/nicotine-plus/archive/$VERSION/$SRC_TARBALL +gunzip <$SRC_TARBALL | tar --delete nicotine-plus-$VERSION/sounds | gzip >$DEST_TARBALL +rm $SRC_TARBALL diff --git a/nicotine+.appdata.xml b/nicotine+.appdata.xml new file mode 100644 index 0000000..529f320 --- /dev/null +++ b/nicotine+.appdata.xml @@ -0,0 +1,41 @@ + + + + nicotine.desktop + CC0-1.0 + GPL-3.0+ + Nicotine+ + A graphical client for the SoulSeek peer-to-peer system + +

+ Nicotine+ is a graphical client for the SoulSeek peer-to-peer system. +

+

+ Nicotine+ is an attempt to keep Nicotine working with the latest + libraries, kill bugs, keep current with the Soulseek protocol and add some + new features that users want and/or need. +

+
+ + + http://www.nicotine-plus.org/raw-attachment/wiki/ScreenShots/screenshot_downloads.png + + + http://www.nicotine-plus.org/raw-attachment/wiki/ScreenShots/screenshot_shares.png + + + http://www.nicotine-plus.org/raw-attachment/wiki/ScreenShots/screenshot_search.png + + + http://www.nicotine-plus.org/raw-attachment/wiki/ScreenShots/screenshot_userinfo.png + + + http://www.nicotine-plus.org/raw-attachment/wiki/ScreenShots/screenshot_private.png + + + http://www.nicotine-plus.org/raw-attachment/wiki/ScreenShots/screenshot_chat.png + + + http://www.nicotine-plus.org/ + melmorabity_at_fedoraproject.org +
diff --git a/nicotine+.spec b/nicotine+.spec index e39977b..0c4e2a8 100644 --- a/nicotine+.spec +++ b/nicotine+.spec @@ -1,37 +1,29 @@ -%global alt_name nicotine -%global nicotine_pythonsitedir py%{alt_name} +%global altname nicotine Name: nicotine+ -Version: 1.2.16 -Release: 13%{?dist} -Summary: A client for the SoulSeek file sharing network +Version: 1.4.1 +Release: 1%{?dist} +Summary: A graphical client for the SoulSeek peer-to-peer system Group: Applications/Internet License: GPLv3+ -URL: http://www.nicotine-plus.org/ -Source0: %{name}-%{version}-without-nonfree-sounds.tar.bz2 +URL: https://www.nicotine-plus.org/ +Source0: %{name}-%{version}-without-nonfree-sounds.tar.gz # nicotine+ contains nonfree sounds, licensed under CC Sampling Plus # 1.0. Therefore we use this script to remove these files before shipping # it. Invoke this script while in the tarball's directory to retrieve and # generate a tarball without nonfree bytes Source1: %{name}-generate-tarball.sh -# Use xdg-open to open URLs -Patch0: %{name}-1.2.16-urls_commands.patch -# Disable installation of documentation files outside %%{_docdir}, except the -# manual needed by application help -Patch1: %{name}-1.2.16-documentation.patch -# Fix RHBZ #662786 (see http://www.nicotine-plus.org/ticket/697) -Patch2: %{name}-1.2.16-RHBZ662786.patch -# Fix http://www.nicotine-plus.org/ticket/726 -Patch3: %{name}-1.2.16-ListModels_casts.patch -# Fix http://www.nicotine-plus.org/ticket/727 -Patch4: %{name}-1.2.16-tab_labels.patch -# Fix RHBZ #1009934 (see http://www.nicotine-plus.org/ticket/671) -Patch5: %{name}-1.2.16-RHBZ1009934.patch +Source2: %{name}.appdata.xml +# Install user guide, required by application help, outside of %%{_docdir} +Patch0: %{name}-1.4.1-documentation.patch BuildRequires: desktop-file-utils BuildRequires: gettext +BuildRequires: libappstream-glib BuildRequires: pygobject2 +BuildRequires: python2-devel +Requires: hicolor-icon-theme Requires: notify-python Requires: pygtk2-libglade Requires: python-GeoIP @@ -42,155 +34,64 @@ Requires: xdg-utils BuildArch: noarch %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. +Nicotine+ is a graphical client for the SoulSeek peer-to-peer system. + +Nicotine+ is an attempt to keep Nicotine working with the latest libraries, kill +bugs, keep current with the Soulseek protocol and add some new features that +users want and/or need. %prep -%setup -q -%patch0 -p1 -b .urls_commands -%patch1 -p1 -b .documentation -%patch2 -p3 -b .RHBZ662786 -%patch3 -p3 -b .ListModels_casts -%patch4 -p1 -b .tab_labels -%patch5 -p1 -b .RHBZ1009934 - -# 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 +%autosetup -n nicotine-plus-%{version} -p0 %build -%{__python} setup.py build +%py2_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 +%py2_install -%find_lang %{alt_name} +install -Dpm 0644 %{SOURCE2} $RPM_BUILD_ROOT/%{_datadir}/appdata/%{name}.appdata.xml +%find_lang %{altname} -%files -f %{alt_name}.lang -%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} +%check +desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/%{altname}.desktop -%changelog -* Tue Jul 19 2016 Fedora Release Engineering - 1.2.16-13 -- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages +appstream-util validate-relax --nonet $RPM_BUILD_ROOT%{_datadir}/appdata/%{name}.appdata.xml -* Thu Feb 04 2016 Fedora Release Engineering - 1.2.16-12 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild -* Wed Jun 17 2015 Fedora Release Engineering - 1.2.16-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild +%post +/bin/touch --no-create %{_datadir}/icons/hicolor/ &>/dev/null || : -* Thu Jul 31 2014 Mohamed El Morabity - 1.2.16-10 -- Fix #RHBZ 1009934 -- Add python-miniupnpc as Requires for UPnP support -- Spec cleanup +%postun +if [ $1 -eq 0 ]; then + /bin/touch --no-create %{_datadir}/icons/hicolor/ &>/dev/null + /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor/ &>/dev/null || : +fi -* Sat Jun 07 2014 Fedora Release Engineering - 1.2.16-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild -* Sat Aug 03 2013 Fedora Release Engineering - 1.2.16-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild +%posttrans +/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor/ &>/dev/null || : -* Thu Feb 14 2013 Fedora Release Engineering - 1.2.16-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild -* Fri Jul 20 2012 Fedora Release Engineering - 1.2.16-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild +%files -f %{altname}.lang +%doc AUTHORS.md NEWS README.md doc/TRANSLATORS.md +%license COPYING +%{_bindir}/* +%{_datadir}/%{altname}/ +%{_datadir}/applications/*.desktop +%{_datadir}/icons/hicolor/*/apps/nicotine-plus.* +%{_datadir}/appdata/*.appdata.xml +%{_mandir}/man1/*.1.gz +%{python2_sitelib}/* -* 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 +%changelog +* Mon Feb 13 2017 Mohamed El Morabity - 1.4.1-1 +- New upstream +- Update to 1.4.1 - 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 +- Add AppData file diff --git a/sources b/sources index c017308..c514168 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -63178cea7e4694cb34397af1dd5c06ac nicotine+-1.2.16-without-nonfree-sounds.tar.bz2 +SHA512 (nicotine+-1.4.1-without-nonfree-sounds.tar.gz) = 0438248274d80bc19ebd2a2f3b3b7f3db430e79e680108eb9cd787835207fbd57e267fba8fd575a731d3361a8962bb31f1d6739e443273cecb3ef29e842ac2ce