Skip to content
Browse files

Reform to new PKGBUILD style, make GUI optional

  • Loading branch information...
1 parent ef20d26 commit 42b6a7fd015ff4a5b4ac982f1e1bcc02998d1774 Tom Vincent committed Feb 29, 2012
Showing with 59 additions and 28 deletions.
  1. +40 −28 groove-dl-git/PKGBUILD
  2. +19 −0 groove-dl-git/cli.patch
View
68 groove-dl-git/PKGBUILD
@@ -1,49 +1,61 @@
# Maintainer: archtux <antonio.arias99999 at gmail.com>
-
+# Contributor: Tom Vincent <http://tlvince.com/contact/>
pkgname=groove-dl-git
-pkgver=20111127
+_pkgname=groove-dl
+pkgver=20120229
pkgrel=1
pkgdesc="A Grooveshark song downloader in Python"
+arch=(any)
url="https://github.com/jacktheripper51/groove-dl"
-arch='any'
-license='GPL3'
-depends=('python2' 'python2-objectlistview' 'wxpython')
+license=('GPL3')
+depends=('python2')
makedepends=('git')
+optdepends=('python2-objectlistview' 'wxpython')
+source=(cli.patch)
+md5sums=('d27fbdb96c8d23e2db26e6f534db07d8')
+options=(!emptydirs)
-_gitroot="https://github.com/jacktheripper51"
+_gitroot="git://github.com/jacktheripper51"
_gitname="groove-dl.git"
+# Install optdepends and change to true
+gui=false
build() {
- cd $srcdir
- msg "Connecting to GIT server...."
+ cd $srcdir
+ msg "Connecting to GIT server...."
- if [ -d $srcdir/$_gitname ] ; then
- cd $_gitname && git pull origin
+ if [ -d $srcdir/$_pkgname ] ; then
+ cd $_pkgname && git pull origin
msg "The local files are updated."
- else
+ else
git clone $_gitroot/$_gitname
- fi
+ fi
- msg "GIT checkout done or server timeout"
- msg "Starting make..."
+ msg "GIT checkout done or server timeout"
+}
- cp -r ${srcdir}/groove-dl ${srcdir}/$_gitname-build
+package() {
+ cd "$srcdir/$_pkgname/python"
- cd groove-dl/python
+ if $gui; then
+ # Fix gui.py
+ sed -i '/MessageBox/d' gui.py
- # Fix gui.py
- sed -i '/MessageBox/d' gui.py
+ install -d $pkgdir/usr/share/groove-dl
+ chmod 755 -R $pkgdir/usr/share/groove-dl
+ cp * $pkgdir/usr/share/groove-dl
- install -d $pkgdir/usr/share/groove-dl
- chmod 755 -R $pkgdir/usr/share/groove-dl
- cp * $pkgdir/usr/share/groove-dl
+ # Desktop icon
+ install -Dm644 ../misc/groove.ico $pkgdir/usr/share/pixmaps/groove.ico
+ cd $startdir
+ install -Dm644 groove-dl.desktop $pkgdir/usr/share/applications/groove-dl.desktop
+ else
+ patch < "$startdir/cli.patch"
+ fi
- # Desktop icon
- install -Dm644 ../misc/groove.ico $pkgdir/usr/share/pixmaps/groove.ico
- cd $startdir
- install -Dm644 groove-dl.desktop $pkgdir/usr/share/applications/groove-dl.desktop
+ # Executable
+ install -Dm755 groove.py $pkgdir/usr/bin/groove-dl
+}
- # Executable
- install -Dm755 groove-dl $pkgdir/usr/bin/groove-dl
-}
+# vim:set ts=2 sw=2 et:
View
19 groove-dl-git/cli.patch
@@ -0,0 +1,19 @@
+--- groove.py 2012-02-29 00:59:57.424975969 +0000
++++ groove.py-new 2012-02-29 01:00:59.834637868 +0000
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ import httplib
+ import StringIO
+ import hashlib
+@@ -120,10 +120,7 @@
+
+ if __name__ == "__main__":
+ if len(sys.argv) < 2:
+- import gui
+- gui.main()
+ exit()
+- print entrystring
+ init()
+ getToken()
+ m = 0

0 comments on commit 42b6a7f

Please sign in to comment.
Something went wrong with that request. Please try again.