summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis Martinez2021-12-21 11:58:19 -0600
committerLuis Martinez2021-12-21 11:58:19 -0600
commit59474a9f34bfbedd1269f36916e96ce85e32edba (patch)
tree246535b0f499e2f2f373cd7225f1208685aff5ba
parent864a828948b2f6036901d2ded51ab0f56f41a7a1 (diff)
downloadaur-59474a9f34bfbedd1269f36916e96ce85e32edba.tar.gz
package cleanup
-rw-r--r--.SRCINFO20
-rw-r--r--001-setup.py.patch58
-rw-r--r--PKGBUILD60
-rw-r--r--requirements.txt5
-rwxr-xr-xsetup.py68
-rw-r--r--spotify-ripper.install3
6 files changed, 111 insertions, 103 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5fd9fb464678..382ab2d5588c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,15 @@
pkgbase = spotify-ripper
- pkgdesc = Command-line ripper for Spotify, with a workaround for playlist emptying
+ pkgdesc = CLI Spotify ripper
pkgver = 2.18
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/scaronni/spotify-ripper
+ install = spotify-ripper.install
arch = any
license = MIT
makedepends = python-setuptools
makedepends = libspotify
- depends = python
- depends = python-pyspotify>=2.1.3-4
- depends = python-spotipy>=2.19.0-2
+ depends = python-pyspotify
+ depends = python-spotipy
depends = python-mutagen
depends = python-colorama
depends = python-requests
@@ -21,11 +21,9 @@ pkgbase = spotify-ripper
optdepends = faac: Rip songs to AAC format with FreeAAC
optdepends = libav-git-no-libs: Rip songs to Apple Lossless format
optdepends = fdkaac: Rip songs to MP4/M4A format with Fraunhofer FDK AAC codec
- source = https://github.com/scaronni/spotify-ripper/archive/2.18.tar.gz
- source = setup.py
- source = requirements.txt
- md5sums = 74f11d4cebc0b3d0a479531eaae40c8a
- md5sums = 0cf83405e3b811277e3f3a11b01f7426
- md5sums = 433ec722cffccd32c7e31807262f1128
+ source = spotify-ripper-2.18.tar.gz::https://github.com/scaronni/spotify-ripper/archive/2.18.tar.gz
+ source = 001-setup.py.patch
+ sha256sums = 2536ec8a8b395f594a47e6f9aee1412d03109b6c06d43ee4563e45550138f950
+ sha256sums = 527eaeed0947406598f215fae3bb6fe150dbdeb3599e98f15807f519dbdff7b9
pkgname = spotify-ripper
diff --git a/001-setup.py.patch b/001-setup.py.patch
new file mode 100644
index 000000000000..60b6df2d2348
--- /dev/null
+++ b/001-setup.py.patch
@@ -0,0 +1,58 @@
+diff --git a/setup.py b/../setup.py
+index f026096..c75e598 100755
+--- a/setup.py
++++ b/../setup.py
+@@ -6,20 +6,23 @@ import os
+
+
+ def create_default_dir():
+- default_dir = os.path.normpath(os.path.realpath((os.path.join(os.path.expanduser("~"), ".spotify-ripper"))))
++ default_dir = os.path.normpath(os.path.realpath(
++ (os.path.join(os.path.expanduser("~"), ".spotify-ripper"))))
+ if not os.path.exists(default_dir):
+ print("Creating default settings directory: " + default_dir)
+ os.makedirs(default_dir.encode("utf-8"))
+
++
+ def _read(fn):
+ path = os.path.join(os.path.dirname(__file__), fn)
+ return open(path).read()
+
++
+ setup(
+ name='spotify-ripper',
+ version='2.18',
+ packages=find_packages(exclude=["tests"]),
+- #scripts=['spotify_ripper/main.py'],
++ # scripts=['spotify_ripper/main.py'],
+ include_package_data=True,
+ zip_safe=False,
+
+@@ -37,12 +40,12 @@ setup(
+
+ # Requirements
+ install_requires=[
+- 'pyspotify>=2.0.5',
+- 'colorama>=0.3.3',
+- 'mutagen>=1.30',
+- 'requests>=2.13.0',
+- 'schedule>=0.3.1',
+- 'spotipy>=2.4.4'
++ 'pyspotify',
++ 'colorama',
++ 'mutagen',
++ 'requests',
++ 'schedule',
++ 'spotipy'
+ ],
+
+ # Metadata
+@@ -52,7 +55,7 @@ setup(
+ license='MIT',
+ keywords="spotify ripper mp3 ogg vorbis flac opus acc mp4 m4a",
+ url='https://github.com/scaronni/spotify-ripper',
+- download_url='https://github.com/scaronni/spotify-ripper/tarball/2.15',
++ download_url='https://github.com/scaronni/spotify-ripper/tarball/2.18',
+ classifiers=[
+ 'Topic :: Multimedia :: Sound/Audio',
+ 'Topic :: Multimedia :: Sound/Audio :: Capture/Recording',
diff --git a/PKGBUILD b/PKGBUILD
index 91c23cbecb6c..0d311d41ddb3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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/"
}
diff --git a/requirements.txt b/requirements.txt
deleted file mode 100644
index 6204e4dc47cf..000000000000
--- a/requirements.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-pyspotify
-colorama
-mutagen
-requests
-schedule
diff --git a/setup.py b/setup.py
deleted file mode 100755
index c75e598001e2..000000000000
--- a/setup.py
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/python3
-# coding=utf-8
-
-from setuptools import setup, find_packages
-import os
-
-
-def create_default_dir():
- default_dir = os.path.normpath(os.path.realpath(
- (os.path.join(os.path.expanduser("~"), ".spotify-ripper"))))
- if not os.path.exists(default_dir):
- print("Creating default settings directory: " + default_dir)
- os.makedirs(default_dir.encode("utf-8"))
-
-
-def _read(fn):
- path = os.path.join(os.path.dirname(__file__), fn)
- return open(path).read()
-
-
-setup(
- name='spotify-ripper',
- version='2.18',
- packages=find_packages(exclude=["tests"]),
- # scripts=['spotify_ripper/main.py'],
- include_package_data=True,
- zip_safe=False,
-
- # Executable
- entry_points={
- 'console_scripts': [
- 'spotify-ripper = spotify_ripper.main:main',
- ],
- },
-
- # Additional data
- package_data={
- '': ['README.md', 'LICENSE']
- },
-
- # Requirements
- install_requires=[
- 'pyspotify',
- 'colorama',
- 'mutagen',
- 'requests',
- 'schedule',
- 'spotipy'
- ],
-
- # Metadata
- author='Simone Caronni',
- author_email='negativo17@gmail.com',
- description='A small ripper for Spotify that rips Spotify URIs to media files',
- license='MIT',
- keywords="spotify ripper mp3 ogg vorbis flac opus acc mp4 m4a",
- url='https://github.com/scaronni/spotify-ripper',
- download_url='https://github.com/scaronni/spotify-ripper/tarball/2.18',
- classifiers=[
- 'Topic :: Multimedia :: Sound/Audio',
- 'Topic :: Multimedia :: Sound/Audio :: Capture/Recording',
- 'License :: OSI Approved :: MIT License',
- 'Environment :: Console',
- 'Programming Language :: Python :: 3',
- ],
-)
-
-create_default_dir()
diff --git a/spotify-ripper.install b/spotify-ripper.install
new file mode 100644
index 000000000000..fe2ea1479633
--- /dev/null
+++ b/spotify-ripper.install
@@ -0,0 +1,3 @@
+post_install() {
+ echo ':: This package requires manual setup. Check documentation for more information.'
+}