summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO5
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD37
-rw-r--r--fix-setup-py.patch15
4 files changed, 42 insertions, 19 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e08c1442900e..deaee053c276 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = beets-bandcamp
pkgdesc = Plugin for beets to use bandcamp as an autotagger source.
pkgver = 0.1.4
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/unrblt/beets-bandcamp
arch = any
license = GPL
@@ -13,7 +13,8 @@ pkgbase = beets-bandcamp
depends = python-beautifulsoup4
depends = python-isodate
source = https://github.com/unrblt/beets-bandcamp/archive/v0.1.4.tar.gz
+ source = fix-setup-py.patch
sha256sums = abe4a018f055e250f28a66cca16edbdb2f65bed771df370b25de5cac7c45f2b8
+ sha256sums = 583fafad33d978be57fcf2ab5db0d135f9b0e4b9fb948fe2cc2c71f7667ccc33
pkgname = beets-bandcamp
-
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..28bdefeafad6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/src
+/pkg
+*.tar.gz
+*.pkg.tar.*
diff --git a/PKGBUILD b/PKGBUILD
index afc48ffdea41..ce617f76a477 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,30 +1,33 @@
-#maintainer BrainDamage
+# Maintainer: Thomas Jost <schnouki@schnouki.net>
+# Contributor: BrainDamage
pkgname=beets-bandcamp
pkgver=0.1.4
-pkgrel=2
+pkgrel=3
pkgdesc='Plugin for beets to use bandcamp as an autotagger source.'
arch=('any')
url='https://github.com/unrblt/beets-bandcamp'
license=('GPL')
depends=('python' 'python-six' 'beets' 'python-requests' 'python-beautifulsoup4' 'python-isodate')
-source=("https://github.com/unrblt/${pkgname}/archive/v${pkgver}.tar.gz")
-sha256sums=('abe4a018f055e250f28a66cca16edbdb2f65bed771df370b25de5cac7c45f2b8')
+makedepends=('python-setuptools')
+source=("https://github.com/unrblt/${pkgname}/archive/v${pkgver}.tar.gz"
+ "fix-setup-py.patch")
+sha256sums=('abe4a018f055e250f28a66cca16edbdb2f65bed771df370b25de5cac7c45f2b8'
+ '583fafad33d978be57fcf2ab5db0d135f9b0e4b9fb948fe2cc2c71f7667ccc33')
-makedepends+=('python-setuptools')
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -p0 < "${srcdir}/fix-setup-py.patch"
+
+ # remove __init__.py, which is just a copy of beets own plugin init system and would conflict
+ rm beetsplug/__init__.py
+}
build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- python setup.py build
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ python setup.py build
}
package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- python setup.py install --skip-build --root="${pkgdir}/" --prefix="/usr"
- #remove __init__.py which is just a copy of beets own plugin init system and would conflict
- packagesDir="$(python -c 'import site; print(site.getsitepackages()[0])')"
- pyShortVer="$(python --version | sed s/'Python '/py/ | sed s/'\.[[:digit:]]*$'//)"
- pyShortestVer="$(python --version | sed s/'Python '// | sed s/'\.[[:digit:]]*$'// | sed s/'\.'// )"
- sed --in-place /__init__.py/d "${pkgdir}${packagesDir}/beets_bandcamp-${pkgver}-${pyShortVer}.egg-info/SOURCES.txt"
- rm "${pkgdir}${packagesDir}/beetsplug/__init__.py"
- rm "${pkgdir}${packagesDir}/beetsplug/__pycache__/__init__.cpython-${pyShortestVer}.pyc"
-} \ No newline at end of file
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ python setup.py install --root="${pkgdir}/" --prefix="/usr"
+}
diff --git a/fix-setup-py.patch b/fix-setup-py.patch
new file mode 100644
index 000000000000..584afb2a69f1
--- /dev/null
+++ b/fix-setup-py.patch
@@ -0,0 +1,15 @@
+--- setup.py.orig 2023-05-04 22:59:43.061254240 +0200
++++ setup.py 2023-05-04 23:01:35.503508530 +0200
+@@ -16,10 +16,10 @@
+
+ install_requires=[
+ 'beets>=1.4.6',
+- 'six>=1.9'
++ 'six>=1.9',
+ 'requests',
+ 'beautifulsoup4',
+- 'isodate'
++ 'isodate',
+ ],
+
+ classifiers=[