summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Weidenbaum2015-06-09 11:41:58 -0700
committerAndy Weidenbaum2015-06-09 11:41:58 -0700
commitbcdeadf1dcd449cc1f0983a7c294204af5b415c7 (patch)
tree353d0152046213c8d8d535de50e8002435ff5e45
downloadaur-bcdeadf1dcd449cc1f0983a7c294204af5b415c7.tar.gz
Initial import
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD48
2 files changed, 67 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..6497fe487e54
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = geturl-git
+ pkgdesc = A CLI tool to get a public link for any file
+ pkgver = 20130826
+ pkgrel = 1
+ url = https://github.com/uams/geturl
+ arch = any
+ license = MIT
+ makedepends = git
+ makedepends = python2-setuptools
+ depends = python2
+ optdepends = xclip: copy to clipboard
+ optdepends = xsel: copy to clipboard
+ provides = geturl
+ conflicts = geturl
+ source = git+https://github.com/uams/geturl
+ sha256sums = SKIP
+
+pkgname = geturl-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..0786ed74a759
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Andy Weidenbaum <archbaum@gmail.com>
+# Contributor: Daniel O'Neel <danieloneel at gmail dot com>
+
+pkgname=geturl-git
+pkgver=20130826
+pkgrel=1
+pkgdesc="A CLI tool to get a public link for any file"
+arch=('any')
+depends=('python2')
+makedepends=('git' 'python2-setuptools')
+optdepends=('xclip: copy to clipboard'
+ 'xsel: copy to clipboard')
+url="https://github.com/uams/geturl"
+license=('MIT')
+source=(git+https://github.com/uams/geturl)
+sha256sums=('SKIP')
+provides=('geturl')
+conflicts=('geturl')
+
+pkgver() {
+ cd ${pkgname%-git}
+ git log -1 --format="%cd" --date=short | sed "s|-||g"
+}
+
+prepare() {
+ cd ${pkgname%-git}
+
+ msg 'Fixing Python version...'
+ find . -type f -print0 | xargs -0 sed -i 's#/usr/bin/python#/usr/bin/python2#g'
+ find . -type f -print0 | xargs -0 sed -i 's#/usr/bin/env python#/usr/bin/env python2#g'
+}
+
+build() {
+ cd ${pkgname%-git}
+
+ msg "Building..."
+ python2 setup.py build
+}
+
+package() {
+ cd ${pkgname%-git}
+
+ msg 'Installing...'
+ python2 setup.py install --root="$pkgdir" --optimize=1
+
+ msg 'Cleaning up pkgdir...'
+ find "$pkgdir" -type d -name .git -exec rm -r '{}' +
+}