summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Schouten2015-11-26 20:44:37 +1100
committerRafael Schouten2015-11-26 20:44:37 +1100
commit5f1438d5eaccec3a1b2bf764dc37b8c0bfb0e196 (patch)
tree2974ecf8e1b40a1167ceb43c40ed1b77a9b619dd
downloadaur-5f1438d5eaccec3a1b2bf764dc37b8c0bfb0e196.tar.gz
add .SCRINFO, PKGBUILD and a patch to use python2 binaries
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD29
-rw-r--r--python2.patch54
3 files changed, 100 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..a409891ef917
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = cropgui-git
+ pkgdesc = A GTK GUI for lossless JPEG cropping (and rotating)
+ pkgver = b3a00e
+ pkgrel = 1
+ url = https://emergent.unpythonic.net/01248401946
+ arch = any
+ license = GPL
+ makedepends = git
+ depends = python
+ depends = python2-pillow
+ provides = cropgui
+ conflicts = cropgui
+ source = cropgui-git::git+https://github.com/jepler/cropgui
+ md5sums = SKIP
+
+pkgname = cropgui-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..d9382b9c1cba
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,29 @@
+# Maintainer: rafaqzsu <rafaqzsu [at] gmail (dot) com>
+pkgname=cropgui-git
+pkgver=b3a00e
+pkgrel=1
+pkgdesc="A GTK GUI for lossless JPEG cropping (and rotating)"
+arch=('any')
+url="https://emergent.unpythonic.net/01248401946"
+license=('GPL')
+depends=('python'
+ 'python2-pillow')
+makedepends=('git')
+provides=('cropgui')
+conflicts=('cropgui')
+source=("$pkgname::git+https://github.com/jepler/cropgui")
+md5sums=('SKIP')
+
+pkgver() {
+ git describe --always | sed -e 's|-|.|g' -e '1s|^.||'
+}
+
+prepare() {
+ cd "${srcdir}"/$pkgname
+ git apply ../../python2.patch
+}
+
+package() {
+ cd "$srcdir/$pkgname"
+ ./install.sh -f gtk -t $pkgdir -p /usr -P python2
+}
diff --git a/python2.patch b/python2.patch
new file mode 100644
index 000000000000..65e9c4f26227
--- /dev/null
+++ b/python2.patch
@@ -0,0 +1,54 @@
+From d6b852cfb792f075831bcdd64aa51583e097a632 Mon Sep 17 00:00:00 2001
+From: rafaqzsu <rafaqzsu@gmail.com>
+Date: Thu, 26 Nov 2015 17:49:47 +1100
+Subject: [PATCH] use python2 binary
+
+---
+ cropgtk.py | 2 +-
+ cropgui.py | 2 +-
+ install.sh | 4 ++--
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/cropgtk.py b/cropgtk.py
+index 135b6a8..b796d1f 100755
+--- a/cropgtk.py
++++ b/cropgtk.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/python2
+ # cropgui, a graphical front-end for lossless jpeg cropping
+ # Copyright (C) 2009 Jeff Epler <jepler@unpythonic.net>
+ # This program is free software; you can redistribute it and/or modify
+diff --git a/cropgui.py b/cropgui.py
+index 121d016..9299fde 100755
+--- a/cropgui.py
++++ b/cropgui.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/python2
+ # cropgui, a graphical front-end for lossless jpeg cropping
+ # Copyright (C) 2009 Jeff Epler <jepler@unpythonic.net>
+ # This program is free software; you can redistribute it and/or modify
+diff --git a/install.sh b/install.sh
+index f2421cf..05a916f 100755
+--- a/install.sh
++++ b/install.sh
+@@ -1,5 +1,5 @@
+ #!/bin/sh
+-PYTHON=python
++PYTHON=python2
+ BINDIR=$HOME/bin; LIBDIR=$HOME/lib/python SHAREDIR=$HOME/share
+
+ default_flavor () {
+@@ -73,7 +73,7 @@ if [ $? -ne 0 ]; then exit $?; fi
+
+ chmod +x $TARGET$BINDIR/cropgui
+
+-if [ -z "$TARGET" ] && ! (cd /tmp; python -c 'import cropgui_common') > /dev/null 2>&1; then
++if [ -z "$TARGET" ] && ! (cd /tmp; $PYTHON -c 'import cropgui_common') > /dev/null 2>&1; then
+ echo "*** Failed to import cropgui_common.py"
+ echo " You must add $LIBDIR to PYTHONPATH"
+ exit 1
+--
+2.6.1
+