summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorpyamsoft2016-12-09 00:41:17 -0800
committerpyamsoft2016-12-09 00:41:17 -0800
commit679a1832a9a4e9a102d7e2a1016c7ef1ed2085e0 (patch)
treee558a646f0dde49400d4c4591c5972c5d024cd73
downloadaur-679a1832a9a4e9a102d7e2a1016c7ef1ed2085e0.tar.gz
Initial commit of spotify-dl
-rw-r--r--.SRCINFO19
-rw-r--r--01-change-hashbang.patch10
-rw-r--r--PKGBUILD77
3 files changed, 106 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..7b48eb18644
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = spotify-dl-git
+ pkgdesc = Script that allows you to download Spotify songs or playlists
+ pkgver = r8.0fad56e
+ pkgrel = 1
+ url = https://github.com/invicnaper/spotify-dl
+ arch = any
+ license = LGPL3
+ makedepends = git
+ depends = python2-beautifulsoup4
+ depends = youtube-dl
+ provides = spotify-dl
+ conflicts = spotify-dl
+ source = spotify-dl::git+https://github.com/invicnaper/spotify-dl#branch=master
+ source = 01-change-hashbang.patch
+ sha256sums = SKIP
+ sha256sums = 34b8600fd2c39707ab481373e9feee8a7f0acd3ac06cad64966224fe276f44c4
+
+pkgname = spotify-dl-git
+
diff --git a/01-change-hashbang.patch b/01-change-hashbang.patch
new file mode 100644
index 00000000000..003ace9b93b
--- /dev/null
+++ b/01-change-hashbang.patch
@@ -0,0 +1,10 @@
+diff --git a/spotify-dl.py b/spotify-dl.py
+index cb22e68..7829dca 100755
+--- a/spotify-dl.py
++++ b/spotify-dl.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/env python2
+
+ #from googleapiclient.discovery import build
+ #from apiclient.errors import HttpError
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..58b77c2a1e3
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,77 @@
+##
+# Maintainer: pyamsoft <pyam(dot)soft(at)gmail(dot)com>
+##
+
+_gitname=spotify-dl
+# shellcheck disable=SC2034
+pkgname=spotify-dl-git
+# shellcheck disable=SC2034
+pkgdesc="Script that allows you to download Spotify songs or playlists"
+# shellcheck disable=SC2034
+pkgver=r8.0fad56e
+# shellcheck disable=SC2034
+pkgrel=1
+# shellcheck disable=SC2034
+arch=('any')
+# shellcheck disable=SC2034
+makedepends=('git')
+# shellcheck disable=SC2034
+depends=('python2-beautifulsoup4' 'youtube-dl')
+# shellcheck disable=SC2034
+optdepends=()
+# shellcheck disable=SC2034
+provides=('spotify-dl')
+# shellcheck disable=SC2034
+conflicts=('spotify-dl')
+# shellcheck disable=SC2034
+license=('LGPL3')
+url="https://github.com/invicnaper/spotify-dl"
+
+##
+# The SHA256 is constantly changing since this is
+# pulled from git so skip the verification check
+##
+# shellcheck disable=SC2034
+sha256sums=('SKIP'
+ '34b8600fd2c39707ab481373e9feee8a7f0acd3ac06cad64966224fe276f44c4')
+# shellcheck disable=SC2034
+source=("${_gitname}::git+${url}#branch=master" "01-change-hashbang.patch")
+
+###############################################################################
+
+pkgver() {
+ # shellcheck disable=SC2154
+ cd "$srcdir/$_gitname" || {
+ msg "Could not cd into $srcdir/$_gitname"
+ return 1
+ }
+ # From
+ # https://wiki.archlinux.org/index.php/VCS_package_guidelines#The_pkgver.28.29_function
+ # If there are no tags then use number of revisions since beginning of the history:
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ # shellcheck disable=SC2154
+ cd "$srcdir/$_gitname" || {
+ msg "Could not cd into $srcdir/$_gitname"
+ return 1
+ }
+
+ # Apply patches
+ patch -p 1 -i "${srcdir}/01-change-hashbang.patch"
+}
+
+package() {
+ # shellcheck disable=SC2154
+ cd "$srcdir/$_gitname" || {
+ msg "Could not cd into $srcdir/$_gitname"
+ return 1
+ }
+
+ # shellcheck disable=SC2154
+ install -Dm 755 "spotify-dl.py" "${pkgdir}/usr/bin/${_gitname}"
+ install -Dm 644 "LGPLv3.txt" "${pkgdir}/usr/share/doc/${_gitname}/LICENSE"
+ install -Dm 644 "README.md" "${pkgdir}/usr/share/doc/${_gitname}/README"
+}
+