summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorAndy Weidenbaum2015-06-09 11:41:58 -0700
committerAndy Weidenbaum2015-06-09 11:41:58 -0700
commitbcdeadf1dcd449cc1f0983a7c294204af5b415c7 (patch)
tree353d0152046213c8d8d535de50e8002435ff5e45 /PKGBUILD
downloadaur-bcdeadf1dcd449cc1f0983a7c294204af5b415c7.tar.gz
Initial import
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD48
1 files changed, 48 insertions, 0 deletions
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 '{}' +
+}