summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoraxionl2018-08-16 11:25:34 +0800
committeraxionl2018-08-16 11:25:34 +0800
commit2d64f448cd1a1ff90afa501870effba3367d0208 (patch)
tree60a0fa892f1570e223d49acdc08eed27669d173d
parenta55e632c549b89146f14f69503027e04ebe82ccb (diff)
downloadaur-2d64f448cd1a1ff90afa501870effba3367d0208.tar.gz
[Update] netease-musicbox: update to latest version: 0.2.5.3
-rw-r--r--.SRCINFO20
-rw-r--r--0001Remove_python_requests_cache_as_depends.patch37
-rw-r--r--0002Replace_pyqt4_to_pyqt5_as_depends.patch48
-rw-r--r--PKGBUILD31
4 files changed, 117 insertions, 19 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 48ba8460427b..0af105f82eb4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,28 +1,30 @@
pkgbase = netease-musicbox
pkgdesc = A sexy command line interface musicbox for NetEase based on Python
- pkgver = 0.2.5.2
+ pkgver = 0.2.5.3
pkgrel = 1
url = https://github.com/darknessomi/musicbox
install = netease-musicbox.install
arch = any
license = MIT
- depends = python
- depends = python-requests
- depends = python-setuptools
+ makedepends = python-setuptools
depends = mpg123
- depends = python-future
depends = python-pycryptodomex
- depends = python-requests-cache
+ depends = python-requests
optdepends = aria2: music caching
optdepends = libnotify: notifications
- optdepends = python-pyqt4: lyrics support
+ optdepends = qt5-base: lyrics support
+ optdepends = python-pyqt5: lyrics support
optdepends = python-dbus: lyrics support
provides = netease-musicbox
conflicts = netease-musicbox
- source = musicbox-0.2.5.2.tar.gz::https://files.pythonhosted.org/packages/8e/54/17fb71a184020e2da960c4fbf1a0abf9fc8f774fa39a844ec47ef41ec4d9/NetEase-MusicBox-0.2.5.2.tar.gz
+ source = musicbox-0.2.5.3.tar.gz::https://files.pythonhosted.org/packages/12/63/d65c908d4e76ad04622597f5d6e1f5742bc50fbd12e20f80a23736d533fe/NetEase-MusicBox-0.2.5.3.tar.gz
source = LICENSE::https://raw.githubusercontent.com/darknessomi/musicbox/master/LICENSE.txt
- sha256sums = 017d452c2852d5f647e6917ad0d8a5e359fcc32e7ad34f6ea6db2c88d07d4086
+ source = 0001Remove_python_requests_cache_as_depends.patch
+ source = 0002Replace_pyqt4_to_pyqt5_as_depends.patch
+ sha256sums = 1688d8ff1898bc4a0b785187d122eed47c61a1ec017cf07d95139692dd0ea008
sha256sums = 50efc98142cfffe413d73c87c91f2687dfb774217af923f03dfdc8426c9d9552
+ sha256sums = 85c4bd50059c6f038bcb1add01d67ecdb4f87d2861a30bcbe0ef97b8ee5172a2
+ sha256sums = 0d1a68ccb2c588753a1548775ae7a94de39f33d54744bde507a3bf9532039b0c
pkgname = netease-musicbox
diff --git a/0001Remove_python_requests_cache_as_depends.patch b/0001Remove_python_requests_cache_as_depends.patch
new file mode 100644
index 000000000000..722ccbc3357e
--- /dev/null
+++ b/0001Remove_python_requests_cache_as_depends.patch
@@ -0,0 +1,37 @@
+diff -ura NetEase-MusicBox-0.2.5.2/NEMbox/api.py NetEase-MusicBox-0.2.5.2.new/NEMbox/api.py
+--- NetEase-MusicBox-0.2.5.2/NEMbox/api.py 2018-06-07 17:35:47.000000000 +0800
++++ NetEase-MusicBox-0.2.5.2.new/NEMbox/api.py 2018-08-16 10:49:27.764830182 +0800
+@@ -14,15 +14,12 @@
+ from http.cookiejar import LWPCookieJar
+
+ import requests
+-import requests_cache
+
+ from .config import Config
+ from .storage import Storage
+ from .encrypt import encrypted_request
+ from . import logger
+
+-requests_cache.install_cache('nemcache', expire_after=3600)
+-
+ log = logger.getLogger(__name__)
+
+ # 歌曲榜单地址
+diff -ura NetEase-MusicBox-0.2.5.2/NetEase_MusicBox.egg-info/requires.txt NetEase-MusicBox-0.2.5.2.new/NetEase_MusicBox.egg-info/requires.txt
+--- NetEase-MusicBox-0.2.5.2/NetEase_MusicBox.egg-info/requires.txt 2018-06-08 21:09:53.000000000 +0800
++++ NetEase-MusicBox-0.2.5.2.new/NetEase_MusicBox.egg-info/requires.txt 2018-08-16 10:48:44.245429224 +0800
+@@ -1,3 +1,2 @@
+-requests-cache
+ pycryptodomex
+ future
+diff -ura NetEase-MusicBox-0.2.5.2/setup.py NetEase-MusicBox-0.2.5.2.new/setup.py
+--- NetEase-MusicBox-0.2.5.2/setup.py 2018-06-07 17:35:47.000000000 +0800
++++ NetEase-MusicBox-0.2.5.2.new/setup.py 2018-08-16 10:49:04.110035044 +0800
+@@ -53,7 +53,6 @@
+ license=about['__license__'],
+ packages=find_packages(),
+ install_requires=[
+- 'requests-cache',
+ 'pycryptodomex',
+ 'future',
+ ],
diff --git a/0002Replace_pyqt4_to_pyqt5_as_depends.patch b/0002Replace_pyqt4_to_pyqt5_as_depends.patch
new file mode 100644
index 000000000000..6b1ed914d4f2
--- /dev/null
+++ b/0002Replace_pyqt4_to_pyqt5_as_depends.patch
@@ -0,0 +1,48 @@
+diff -ura NetEase-MusicBox-0.2.5.3/NEMbox/osdlyrics.py NetEase-MusicBox-0.2.5.3.new/NEMbox/osdlyrics.py
+--- NetEase-MusicBox-0.2.5.3/NEMbox/osdlyrics.py 2018-06-08 21:01:27.000000000 +0800
++++ NetEase-MusicBox-0.2.5.3.new/NEMbox/osdlyrics.py 2018-08-16 11:11:04.421430904 +0800
+@@ -19,16 +19,16 @@
+ config = Config()
+
+ try:
+- from PyQt4 import QtGui, QtCore, QtDBus
++ from PyQt5 import QtGui, QtWidgets, QtCore, QtDBus
+ pyqt_activity = True
+ except ImportError:
+ pyqt_activity = False
+- log.warn("PyQt4 module not installed.")
++ log.warn("PyQt5 module not installed.")
+ log.warn("Osdlyrics Not Available.")
+
+ if pyqt_activity:
+
+- class Lyrics(QtGui.QWidget):
++ class Lyrics(QtWidgets.QWidget):
+
+ def __init__(self):
+ super(Lyrics, self).__init__()
+@@ -52,10 +52,10 @@
+ self.setMinimumSize(600, 50)
+ osdlyrics_size = config.get("osdlyrics_size")
+ self.resize(osdlyrics_size[0], osdlyrics_size[1])
+- scn = QtGui.QApplication.desktop().screenNumber(
+- QtGui.QApplication.desktop().cursor().pos())
+- bl = QtGui.QApplication.desktop().screenGeometry(scn).bottomLeft()
+- br = QtGui.QApplication.desktop().screenGeometry(scn).bottomRight()
++ scn = QtWidgets.QApplication.desktop().screenNumber(
++ QtWidgets.QApplication.desktop().cursor().pos())
++ bl = QtWidgets.QApplication.desktop().screenGeometry(scn).bottomLeft()
++ br = QtWidgets.QApplication.desktop().screenGeometry(scn).bottomRight()
+ bc = (bl + br) / 2
+ frameGeo = self.frameGeometry()
+ frameGeo.moveCenter(bc)
+@@ -114,7 +114,7 @@
+
+ def show_lyrics():
+
+- app = QtGui.QApplication(sys.argv)
++ app = QtWidgets.QApplication(sys.argv)
+ lyrics = Lyrics()
+ QtDBus.QDBusConnection.sessionBus().registerService('org.musicbox.Bus')
+ QtDBus.QDBusConnection.sessionBus().registerObject('/', lyrics)
+只在 NetEase-MusicBox-0.2.5.3.new/NEMbox 存在:__pycache__
diff --git a/PKGBUILD b/PKGBUILD
index 722b01886173..dce8fc87c5e9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,32 +3,43 @@
pkgname=netease-musicbox
_gitname=musicbox
-pkgver=0.2.5.2
+pkgver=0.2.5.3
pkgrel=1
pkgdesc="A sexy command line interface musicbox for NetEase based on Python"
arch=(any)
url="https://github.com/darknessomi/musicbox"
-depends=('python' 'python-requests' 'python-setuptools' 'mpg123'
- 'python-future' 'python-pycryptodomex' 'python-requests-cache')
+depends=('mpg123' 'python-pycryptodomex' 'python-requests')
+makedepends=('python-setuptools')
optdepends=('aria2: music caching'
'libnotify: notifications'
- 'python-pyqt4: lyrics support'
+ 'qt5-base: lyrics support'
+ 'python-pyqt5: lyrics support'
'python-dbus: lyrics support')
provides=('netease-musicbox')
conflicts=('netease-musicbox')
install=$pkgname.install
license=('MIT')
-source=("musicbox-$pkgver.tar.gz::https://files.pythonhosted.org/packages/8e/54/17fb71a184020e2da960c4fbf1a0abf9fc8f774fa39a844ec47ef41ec4d9/NetEase-MusicBox-$pkgver.tar.gz"
- "LICENSE::https://raw.githubusercontent.com/darknessomi/musicbox/master/LICENSE.txt")
+source=("musicbox-$pkgver.tar.gz::https://files.pythonhosted.org/packages/12/63/d65c908d4e76ad04622597f5d6e1f5742bc50fbd12e20f80a23736d533fe/NetEase-MusicBox-$pkgver.tar.gz"
+ "LICENSE::https://raw.githubusercontent.com/darknessomi/musicbox/master/LICENSE.txt"
+ "0001Remove_python_requests_cache_as_depends.patch"
+ "0002Replace_pyqt4_to_pyqt5_as_depends.patch")
-sha256sums=('017d452c2852d5f647e6917ad0d8a5e359fcc32e7ad34f6ea6db2c88d07d4086'
- '50efc98142cfffe413d73c87c91f2687dfb774217af923f03dfdc8426c9d9552')
+sha256sums=('1688d8ff1898bc4a0b785187d122eed47c61a1ec017cf07d95139692dd0ea008'
+ '50efc98142cfffe413d73c87c91f2687dfb774217af923f03dfdc8426c9d9552'
+ '85c4bd50059c6f038bcb1add01d67ecdb4f87d2861a30bcbe0ef97b8ee5172a2'
+ '0d1a68ccb2c588753a1548775ae7a94de39f33d54744bde507a3bf9532039b0c')
+
+prepare() {
+ cd "${srcdir}/NetEase-MusicBox-${pkgver}"
+ patch -Np1 -i "${srcdir}/0001Remove_python_requests_cache_as_depends.patch"
+ patch -Np1 -i "${srcdir}/0002Replace_pyqt4_to_pyqt5_as_depends.patch"
+}
package() {
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
- cd "$srcdir/NetEase-MusicBox-$pkgver"
- python setup.py install --root="$pkgdir/" --optimize=1
+ cd "${srcdir}/NetEase-MusicBox-${pkgver}"
+ python setup.py install --root="${pkgdir}/" --optimize=1
mkdir -p "${pkgdir}/usr/share/licenses/${pkgname}"
}
# vim:set ts=2 sw=2 et: