summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorLuis Martinez2022-05-22 17:09:41 -0500
committerLuis Martinez2022-05-22 17:09:41 -0500
commitf7740ae52e4230f34430192a7a3fccd04f8b4d95 (patch)
tree11e18d06a6fa1fa5f1b3df0ab3b269e0c0d477c2 /PKGBUILD
parent59474a9f34bfbedd1269f36916e96ce85e32edba (diff)
downloadaur-spotify-ripper.tar.gz
package cleanup
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD22
1 files changed, 12 insertions, 10 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 0d311d41ddb3..2e2e23de6fb9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=spotify-ripper
pkgver=2.18
-pkgrel=2
+pkgrel=3
pkgdesc='CLI Spotify ripper'
arch=('any')
url="https://github.com/scaronni/spotify-ripper"
@@ -18,17 +18,16 @@ depends=(
'python-schedule'
'lame')
optdepends=(
+ 'ffmpeg'
'flac: Rip songs to lossless FLAC encoding'
'opus-tools: Rip songs to Opus encoding'
'vorbis-tools: Rip songs to Ogg Vorbis encoding'
'faac: Rip songs to AAC format with FreeAAC'
- 'libav-git-no-libs: Rip songs to Apple Lossless format'
'fdkaac: Rip songs to MP4/M4A format with Fraunhofer FDK AAC codec')
-makedepends=('python-setuptools' 'libspotify')
+makedepends=('python-setuptools' 'python-build' 'python-installer' 'python-wheel')
install=spotify-ripper.install
-source=(
- "$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz"
- '001-setup.py.patch')
+source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz"
+ '001-setup.py.patch')
sha256sums=('2536ec8a8b395f594a47e6f9aee1412d03109b6c06d43ee4563e45550138f950'
'527eaeed0947406598f215fae3bb6fe150dbdeb3599e98f15807f519dbdff7b9')
@@ -39,14 +38,17 @@ prepare() {
build() {
cd "$pkgname-$pkgver"
- python setup.py build
+ python -m build --wheel --no-isolation
}
package() {
- export PYTHONHASHSEED=0
cd "$pkgname-$pkgver"
- python setup.py install --root="$pkgdir" --optimize=1 --skip-build
- install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
+ PYTHONHASHSEED=0 python -m installer --destdir="$pkgdir/" dist/*.whl
install -Dm644 README.md -t "$pkgdir/usr/share/doc/$pkgname/"
install -Dm644 default_config.ini -t "$pkgdir/usr/share/$pkgname/"
+ local _site="$(python -c 'import site; print(site.getsitepackages()[0])')"
+ install -d "$pkgdir/usr/share/licenses/$pkgname/"
+ ln -s \
+ "$_site/${pkgname/-/_}-$pkgver.dist-info/LICENSE" \
+ "$pkgdir/usr/share/licenses/$pkgname/"
}