diff options
author | axionl | 2020-11-05 19:24:48 +0800 |
---|---|---|
committer | axionl | 2020-11-05 19:24:48 +0800 |
commit | 7e2fe8092563ea0739eb055e396750d441c8f82a (patch) | |
tree | 0a519e4a7f0b58cdce830e4d7ae2cf23ceacfcfb | |
parent | 2c878fb5578fa78116cf8a0f4055af97591b6582 (diff) | |
download | aur-7e2fe8092563ea0739eb055e396750d441c8f82a.tar.gz |
[Update] netease-musicbox: 0.3.0
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | 0001-Replace_pyqt4_to_pyqt5_as_depends.patch | 25 | ||||
-rw-r--r-- | PKGBUILD | 32 | ||||
-rw-r--r-- | netease-musicbox.install | 10 |
4 files changed, 46 insertions, 44 deletions
@@ -1,30 +1,31 @@ pkgbase = netease-musicbox pkgdesc = A sexy command line interface musicbox for NetEase based on Python - pkgver = 0.2.5.4 - pkgrel = 3 + pkgver = 0.3.0 + pkgrel = 1 url = https://github.com/darknessomi/musicbox - install = netease-musicbox.install arch = any license = MIT makedepends = python-setuptools + makedepends = python-poetry depends = mpg123 depends = python-pycryptodomex depends = python-requests depends = python-future + depends = python-fuzzywuzzy depends = python-requests-cache + depends = python-levenshtein optdepends = aria2: music caching optdepends = libnotify: notifications 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.4.tar.gz::https://github.com/darknessomi/musicbox/archive/0.2.5.4.tar.gz - source = LICENSE::https://raw.githubusercontent.com/darknessomi/musicbox/master/LICENSE.txt + provides = musicbox + conflicts = netease-musicbox-git + source = musicbox-0.3.0.tar.gz::https://github.com/darknessomi/musicbox/archive/0.3.0.tar.gz + source = LICENSE::https://raw.githubusercontent.com/darknessomi/musicbox/master/LICENSE source = 0001-Replace_pyqt4_to_pyqt5_as_depends.patch - sha256sums = 4fdfd9061dfdec181736b56166a11bfe27ae9c4011f9c266b57fdfbca232afa3 - sha256sums = e6ce649439eace57267c94e651e38370582f883e6341b3203e951b9497433641 - sha256sums = 4ce77308982339ef8f90ac34e3d9e0f1b2894d4d36a09a3071919bbc39b6dde5 + sha256sums = fc9a6e2947d491b08123ef6b826772c9d6539ce6aaa984e5f737264344edfd42 + sha256sums = 40aaf7aea7939284b07c487929472fa9cc5a842ff5f0c1e474ac93e6de7aa64e + sha256sums = b7e69d2fe2886ed9e66769e759add027a527089cf2770f8b7377a806e9079a03 pkgname = netease-musicbox - diff --git a/0001-Replace_pyqt4_to_pyqt5_as_depends.patch b/0001-Replace_pyqt4_to_pyqt5_as_depends.patch index 512ac1ca87cd..813295888225 100644 --- a/0001-Replace_pyqt4_to_pyqt5_as_depends.patch +++ b/0001-Replace_pyqt4_to_pyqt5_as_depends.patch @@ -1,12 +1,13 @@ -diff -ura --color musicbox-0.2.5.4/NEMbox/osdlyrics.py musicbox-0.2.5.4.new/NEMbox/osdlyrics.py ---- musicbox-0.2.5.4/NEMbox/osdlyrics.py 2018-11-28 15:23:07.000000000 +0900 -+++ musicbox-0.2.5.4.new/NEMbox/osdlyrics.py 2018-12-27 22:17:27.205920448 +0900 -@@ -19,16 +19,16 @@ +diff --unified --recursive --text musicbox-0.3.0/NEMbox/osdlyrics.py musicbox-0.3.0.new/NEMbox/osdlyrics.py +--- musicbox-0.3.0/NEMbox/osdlyrics.py 2020-10-23 19:52:11.000000000 +0800 ++++ musicbox-0.3.0.new/NEMbox/osdlyrics.py 2020-11-05 19:16:55.152042882 +0800 +@@ -13,17 +13,17 @@ config = Config() try: - from PyQt4 import QtGui, QtCore, QtDBus + from PyQt5 import QtGui, QtWidgets, QtCore, QtDBus + pyqt_activity = True except ImportError: pyqt_activity = False @@ -18,15 +19,16 @@ diff -ura --color musicbox-0.2.5.4/NEMbox/osdlyrics.py musicbox-0.2.5.4.new/NEMb - class Lyrics(QtGui.QWidget): + class Lyrics(QtWidgets.QWidget): - def __init__(self): super(Lyrics, self).__init__() -@@ -52,10 +52,10 @@ + self.__dbusAdaptor = LyricsAdapter(self) +@@ -47,11 +47,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()) +- QtGui.QApplication.desktop().cursor().pos() +- ) - bl = QtGui.QApplication.desktop().screenGeometry(scn).bottomLeft() - br = QtGui.QApplication.desktop().screenGeometry(scn).bottomRight() + scn = QtWidgets.QApplication.desktop().screenNumber( @@ -36,12 +38,13 @@ diff -ura --color musicbox-0.2.5.4/NEMbox/osdlyrics.py musicbox-0.2.5.4.new/NEMb bc = (bl + br) / 2 frameGeo = self.frameGeometry() frameGeo.moveCenter(bc) -@@ -114,7 +114,7 @@ +@@ -112,8 +111,7 @@ + self.parent().repaint() 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) + QtDBus.QDBusConnection.sessionBus().registerService("org.musicbox.Bus") + QtDBus.QDBusConnection.sessionBus().registerObject("/", lyrics) @@ -3,39 +3,47 @@ pkgname=netease-musicbox _gitname=musicbox -pkgver=0.2.5.4 -pkgrel=3 +_pyname=NetEase-MusicBox +pkgver=0.3.0 +pkgrel=1 pkgdesc="A sexy command line interface musicbox for NetEase based on Python" arch=(any) url="https://github.com/darknessomi/musicbox" -depends=('mpg123' 'python-pycryptodomex' 'python-requests' 'python-future' 'python-requests-cache') -makedepends=('python-setuptools') +depends=('mpg123' 'python-pycryptodomex' 'python-requests' 'python-future' + 'python-fuzzywuzzy' 'python-requests-cache' 'python-levenshtein') +makedepends=('python-setuptools' 'python-poetry') optdepends=('aria2: music caching' 'libnotify: notifications' 'qt5-base: lyrics support' 'python-pyqt5: lyrics support' 'python-dbus: lyrics support') -provides=('netease-musicbox') -conflicts=('netease-musicbox') -install=$pkgname.install +provides=('musicbox') +conflicts=('netease-musicbox-git') license=('MIT') source=("musicbox-$pkgver.tar.gz::https://github.com/darknessomi/musicbox/archive/${pkgver}.tar.gz" - "LICENSE::https://raw.githubusercontent.com/darknessomi/musicbox/master/LICENSE.txt" + "LICENSE::https://raw.githubusercontent.com/darknessomi/musicbox/master/LICENSE" "0001-Replace_pyqt4_to_pyqt5_as_depends.patch") -sha256sums=('4fdfd9061dfdec181736b56166a11bfe27ae9c4011f9c266b57fdfbca232afa3' - 'e6ce649439eace57267c94e651e38370582f883e6341b3203e951b9497433641' - '4ce77308982339ef8f90ac34e3d9e0f1b2894d4d36a09a3071919bbc39b6dde5') +sha256sums=('fc9a6e2947d491b08123ef6b826772c9d6539ce6aaa984e5f737264344edfd42' + '40aaf7aea7939284b07c487929472fa9cc5a842ff5f0c1e474ac93e6de7aa64e' + 'b7e69d2fe2886ed9e66769e759add027a527089cf2770f8b7377a806e9079a03') prepare() { cd "${srcdir}/musicbox-${pkgver}" patch -Np1 -i "${srcdir}/0001-Replace_pyqt4_to_pyqt5_as_depends.patch" } +build() { + cd "${srcdir}/musicbox-${pkgver}" + poetry build -f sdist + tar xvf "./dist/${_pyname}-${pkgver}.tar.gz" +} + package() { install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" - cd "${srcdir}/musicbox-${pkgver}" + + cd "${srcdir}/musicbox-${pkgver}"/${_pyname}-${pkgver} python setup.py install --root="${pkgdir}/" --optimize=1 } # vim:set ts=4 sw=4 et: diff --git a/netease-musicbox.install b/netease-musicbox.install deleted file mode 100644 index 2047feb9ffe9..000000000000 --- a/netease-musicbox.install +++ /dev/null @@ -1,10 +0,0 @@ - -post_install() { - echo "The binary is called: 'musicbox'" -} - -post_upgrade() { - post_install -} - -# vim:set ts=2 sw=2 et: |