summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorThomas Jost2023-05-04 23:09:59 +0200
committerThomas Jost2023-05-04 23:09:59 +0200
commit5ec81c59d817a971e986ab92b24376ee5e53e16e (patch)
tree825743a1f28d984195269e5fba51f1c3e2a42a88 /PKGBUILD
parent9c6b86d1cf044c423ce6e7f791231dcffe8cac60 (diff)
downloadaur-beets-bandcamp.tar.gz
Bump pkgrel for the Python 3.11 update
This also fixes build by patching setup.py, and simplifies the PKGBUILD.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD37
1 files changed, 20 insertions, 17 deletions
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"
+}