summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorJonathan Yantis2015-06-11 08:31:04 -0700
committerJonathan Yantis2015-06-11 08:31:04 -0700
commitde7fb252dc2885c274554976c3b6b4232f484beb (patch)
treed1022f724fd5122a8b88874242a865e7f5f4310c /PKGBUILD
downloadaur-de7fb252dc2885c274554976c3b6b4232f484beb.tar.gz
Initial import
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD62
1 files changed, 62 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..f12446952e15
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,62 @@
+# Maintainer: jyantis <yantis@yantis.net>
+
+# Note it will crash if you run it without arguments
+# try reloader --help
+
+# If your windows are jumping around on you it is because you have xdotool installed
+# I am not sure if its working as intended but I don't like it so I personally don't have it installed.
+
+pkgname=pythonar-git
+pkgver=r19.9b2a3b4
+pkgrel=2
+pkgdesc='Provides a simple way to restart applications when you change source code or resources thus providing better workflow. Written in Python 2'
+arch=('any')
+url='https://github.com/kivy/pythonar'
+license=('MIT')
+depends=('python2'
+ 'python2-colorama'
+ 'python2-termcolor'
+ 'python2-watchdog')
+optdepends=('xdotool: x11 automation')
+source=('git+https://github.com/kivy/pythonar.git' 'reloader.patch')
+sha256sums=('SKIP' '412cd7de6c52f4d3d6e11ff1af059e1e2e995270dd0e483fa834ddc6b7653f43')
+makedepends=('git')
+provides=('pythonar')
+conflicts=('pythonar')
+pkgver() {
+ cd pythonar
+ set -o pipefail
+ git describe --long | sed -r 's/([^-]*-g)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ # patch to fix error messages if xdotool isn't installed
+ patch pythonar/reloader.py < reloader.patch
+
+ cd pythonar
+
+ # patch any #!/usr/bin/python to #!/usr/bin/python2
+ for file in $(find . -name '*.py' -print); do
+ sed -r -i 's_^#!.*/usr/bin/python(\s|$)_#!/usr/bin/python2_' $file
+ sed -r -i 's_^#!.*/usr/bin/env(\s)*python(\s|$)_#!/usr/bin/env python2_' $file
+ done
+}
+
+package() {
+ cd pythonar
+
+ # We don't need anything related to git in the package
+ rm -rf .git*
+
+ # Install License
+ install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+ # Install Documentation
+ install -D -m644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
+
+ # Install the program
+ install -D -m755 reloader.py "$pkgdir/usr/bin/reloader"
+}
+
+# vim:set ts=2 sw=2 et: