summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO40
-rw-r--r--001-setup.py.patch58
-rw-r--r--PKGBUILD70
-rw-r--r--requirements.txt5
-rw-r--r--setup.py74
-rw-r--r--spotify-ripper.install3
6 files changed, 128 insertions, 122 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d197789834c6..08934488da01 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,31 +1,31 @@
pkgbase = spotify-ripper
- pkgdesc = Command-line ripper for Spotify, with a workaround for playlist emptying
- pkgver = 2.11
- pkgrel = 4
- url = https://github.com/colorizedmind/spotify-ripper
+ pkgdesc = CLI Spotify ripper
+ pkgver = 2.18
+ pkgrel = 3
+ url = https://github.com/scaronni/spotify-ripper
+ install = spotify-ripper.install
arch = any
license = MIT
- makedepends = python2-setuptools
- depends = python2
- depends = python2-spotify
- depends = mutagen
- depends = python2-colorama
- depends = python2-requests
- depends = python2-schedule
- depends = python2-spotipy
+ makedepends = python-setuptools
+ makedepends = python-build
+ makedepends = python-installer
+ makedepends = python-wheel
+ depends = python-pyspotify
+ depends = python-spotipy
+ depends = python-mutagen
+ depends = python-colorama
+ depends = python-requests
+ depends = python-schedule
depends = lame
+ optdepends = ffmpeg
optdepends = flac: Rip songs to lossless FLAC encoding
optdepends = opus-tools: Rip songs to Opus encoding
optdepends = vorbis-tools: Rip songs to Ogg Vorbis encoding
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/colorizedmind/spotify-ripper/archive/a044a2ee8ce9d42f43ec973a2480ec5f62598ae7.zip
- source = setup.py
- source = requirements.txt
- md5sums = 0365af83b46ad43c6331cb7887ed06f8
- md5sums = c80e4dc2d35501cc87ef75deb954a3c0
- 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 cdd70ded7cbf..2e2e23de6fb9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,30 +1,54 @@
-# Maintainer: XavierCLL <xavier.corredor.llano (a) gmail.com>
+# 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.11
-pkgrel=4
-pkgdesc='Command-line ripper for Spotify, with a workaround for playlist emptying'
+pkgver=2.18
+pkgrel=3
+pkgdesc='CLI Spotify ripper'
arch=('any')
-url="https://github.com/colorizedmind/spotify-ripper"
+url="https://github.com/scaronni/spotify-ripper"
license=('MIT')
-depends=('python2' 'python2-spotify' 'mutagen' 'python2-colorama' 'python2-requests'
- 'python2-schedule' 'python2-spotipy' '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=('python2-setuptools')
-source=("https://github.com/colorizedmind/spotify-ripper/archive/a044a2ee8ce9d42f43ec973a2480ec5f62598ae7.zip"
- "setup.py" "requirements.txt")
-md5sums=('0365af83b46ad43c6331cb7887ed06f8'
- 'c80e4dc2d35501cc87ef75deb954a3c0'
- '433ec722cffccd32c7e31807262f1128')
+depends=(
+ 'python-pyspotify'
+ 'python-spotipy'
+ 'python-mutagen'
+ 'python-colorama'
+ 'python-requests'
+ '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'
+ 'fdkaac: Rip songs to MP4/M4A format with Fraunhofer FDK AAC codec')
+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')
+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 -m build --wheel --no-isolation
+}
package() {
- cd $pkgname-*
-
- # fix imports
- cp ../setup.py .
- cp ../requirements.txt .
-
- python2 setup.py install --root="$pkgdir"
+ cd "$pkgname-$pkgver"
+ 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/"
}
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 100644
index 5a174a13c04a..000000000000
--- a/setup.py
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/usr/bin/env python
-# 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.11',
- 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.rst', 'LICENCE']
- },
-
- # Requirements
- install_requires=[
- 'pyspotify',
- 'colorama',
- 'mutagen',
- 'requests',
- 'schedule',
- 'spotipy'
- ],
-
- # Metadata
- author='James Newell, SolidHal',
- author_email='james.newell@gmail.com',
- description='a small ripper for Spotify that rips Spotify URIs '
- 'to audio files',
- license='MIT',
- keywords="spotify ripper mp3 ogg vorbis flac opus acc mp4 m4a",
- url='https://github.com/SolidHal/spotify-ripper',
- download_url='https://github.com/SolidHal/spotify-ripper/archive/2.11.tar.gz',
- classifiers=[
- 'Topic :: Multimedia :: Sound/Audio',
- 'Topic :: Multimedia :: Sound/Audio :: Capture/Recording',
- 'License :: OSI Approved :: MIT License',
- 'Environment :: Console',
- "Intended Audience :: Developers",
- 'Programming Language :: Python :: 2',
- 'Programming Language :: Python :: 2.7',
- 'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.4',
- ],
- #long_description=_read('README.rst'),
-)
-
-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.'
+}