diff options
author | Luis Martinez | 2021-12-21 11:58:19 -0600 |
---|---|---|
committer | Luis Martinez | 2021-12-21 11:58:19 -0600 |
commit | 59474a9f34bfbedd1269f36916e96ce85e32edba (patch) | |
tree | 246535b0f499e2f2f373cd7225f1208685aff5ba /PKGBUILD | |
parent | 864a828948b2f6036901d2ded51ab0f56f41a7a1 (diff) | |
download | aur-59474a9f34bfbedd1269f36916e96ce85e32edba.tar.gz |
package cleanup
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 60 |
1 files changed, 41 insertions, 19 deletions
@@ -1,30 +1,52 @@ -# Maintainer: iRet <iRet at a22 dot in> +# Maintainer: Luis Martinez <luis dot martinez at disroot dot org> +# Contributor: iRet <iRet at a22 dot in> # Contributor: XavierCLL <xavier.corredor.llano at gmail dot com> pkgname=spotify-ripper pkgver=2.18 -pkgrel=1 -pkgdesc='Command-line ripper for Spotify, with a workaround for playlist emptying' +pkgrel=2 +pkgdesc='CLI Spotify ripper' arch=('any') url="https://github.com/scaronni/spotify-ripper" license=('MIT') -depends=('python' 'python-pyspotify>=2.1.3-4' 'python-spotipy>=2.19.0-2' 'python-mutagen' 'python-colorama' 'python-requests' 'python-schedule' 'lame') -optdepends=('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') +depends=( + 'python-pyspotify' + 'python-spotipy' + 'python-mutagen' + 'python-colorama' + 'python-requests' + 'python-schedule' + 'lame') +optdepends=( + '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') -source=("https://github.com/scaronni/spotify-ripper/archive/${pkgver}.tar.gz" - "setup.py" "requirements.txt") -md5sums=('74f11d4cebc0b3d0a479531eaae40c8a' - '0cf83405e3b811277e3f3a11b01f7426' - '433ec722cffccd32c7e31807262f1128') +install=spotify-ripper.install +source=( + "$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz" + '001-setup.py.patch') +sha256sums=('2536ec8a8b395f594a47e6f9aee1412d03109b6c06d43ee4563e45550138f950' + '527eaeed0947406598f215fae3bb6fe150dbdeb3599e98f15807f519dbdff7b9') + +prepare() { + patch -p1 -d "$pkgname-$pkgver" < 001-setup.py.patch + sed -i 's/>=.*$//' "$pkgname-$pkgver/requirements.txt" +} + +build() { + cd "$pkgname-$pkgver" + python setup.py build +} package() { - cd $pkgname-$pkgver - - # fix imports - cp ../setup.py . - cp ../requirements.txt . - - python setup.py install --root="$pkgdir" + 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/" + install -Dm644 README.md -t "$pkgdir/usr/share/doc/$pkgname/" + install -Dm644 default_config.ini -t "$pkgdir/usr/share/$pkgname/" } |