summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD41
2 files changed, 55 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..d4199b175154
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = python-pymysql-git
+ pkgdesc = Pure Python MySQL Client
+ pkgver = 20130105
+ pkgrel = 1
+ url = https://github.com/petehunt/PyMySQL
+ arch = any
+ license = BSD
+ makedepends = git
+ makedepends = python-distribute
+ depends = python
+ conflicts = pymysql
+
+pkgname = python-pymysql-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..a7506d5b6a98
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer: Allen Li <darkfeline@abagofapples.com>
+pkgname=python-pymysql-git
+pkgver=20130105
+pkgrel=1
+pkgdesc="Pure Python MySQL Client"
+arch=(any)
+url="https://github.com/petehunt/PyMySQL"
+license=('GPL')
+license=('BSD')
+depends=('python')
+makedepends=('git' 'python-distribute')
+conflicts=('pymysql')
+
+_gitroot="https://github.com/petehunt/PyMySQL"
+_gitname=pymysql
+
+build() {
+ cd "$srcdir"
+ msg "Connecting to GIT server...."
+
+ if [[ -d "$_gitname" ]]; then
+ cd "$_gitname" && git pull origin
+ msg "The local files are updated."
+ else
+ git clone "$_gitroot" "$_gitname"
+ fi
+
+ msg "GIT checkout done or server timeout"
+ msg "Starting build..."
+
+ rm -rf "$srcdir/$_gitname-build"
+ git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
+ cd "$srcdir/$_gitname-build"
+
+ ./build-py3k.sh
+ cd py3k
+ python setup.py install --root="$pkgdir" --prefix=/usr
+ install -Dm0644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et: