summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander F Rødseth2015-06-10 15:24:37 +0200
committerAlexander F Rødseth2015-06-10 15:24:37 +0200
commit5c67c5da3d0e5b2153e4fa261509b60a90d551ac (patch)
treefdb9208f77593fff96a2e6e783dd7670c55abd5c
downloadaur-5c67c5da3d0e5b2153e4fa261509b60a90d551ac.tar.gz
Initial import
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD80
2 files changed, 101 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..3d2ba866d1b3
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = google-appengine-go
+ pkgdesc = Google App Engine SDK for Go
+ pkgver = 1.9.19
+ pkgrel = 1
+ url = http://code.google.com/appengine/downloads.html#Google_App_Engine_SDK_for_Go
+ arch = x86_64
+ arch = i686
+ license = APACHE
+ makedepends = unzip
+ depends = python2
+ optdepends = mysql-python: MySQL support for Python 2
+ optdepends = python2-imaging: Image processing capabilities for Python
+ options = !strip
+ options = staticlibs
+ source_x86_64 = https://commondatastorage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_linux_amd64-1.9.19.zip
+ md5sums_x86_64 = daeed720353ab676f2ecf4ce56ef3d82
+ source_i686 = https://commondatastorage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_linux_386-1.9.19.zip
+ md5sums_i686 = 34baa5b786a577bf4d32b3e3d2ac2eba
+
+pkgname = google-appengine-go
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..88da6abcab2c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,80 @@
+# Maintainer: Alexander Rødseth <rodseth@gmail.com>
+# Contributor: Richard Hoffman <coverslide@gmail.com>
+# Contributor: Max <fuzymonkey@gmail.com>
+
+pkgname=google-appengine-go
+pkgver=1.9.19
+pkgrel=1
+pkgdesc='Google App Engine SDK for Go'
+arch=('x86_64' 'i686')
+depends=('python2')
+url='http://code.google.com/appengine/downloads.html#Google_App_Engine_SDK_for_Go'
+license=('APACHE')
+options=('!strip' 'staticlibs')
+makedepends=('unzip')
+optdepends=('mysql-python: MySQL support for Python 2'
+ 'python2-imaging: Image processing capabilities for Python')
+source_x86_64=("https://commondatastorage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_linux_amd64-$pkgver.zip")
+source_i686=("https://commondatastorage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_linux_386-$pkgver.zip")
+md5sums_x86_64=('daeed720353ab676f2ecf4ce56ef3d82')
+md5sums_i686=('34baa5b786a577bf4d32b3e3d2ac2eba')
+# Get the name of the zip file
+_source=$(echo source_$CARCH)
+noextract=("$(basename ${!_source})")
+
+prepare() {
+ unzip -q "$noextract"
+}
+
+build() {
+ cd 'go_appengine'
+
+ # Only make the .py files executable
+ find . -type f -exec chmod 644 '{}' \;
+ chmod +x *.py goroot/bin/*
+
+ # This is to avoid name conflicts in /usr/bin with other appengine packages
+ for f in *.py
+ do
+ msg2 "Creating a wrapper script for $f named `basename $f .py`-go"
+ echo -e "#!/bin/sh\npython2 /opt/google-appengine-go/$f \$*" \
+ > "$srcdir/`basename $f .py`-go"
+ if [[ $f == dev_appserver.py ]]; then
+ msg2 "Creating a wrapper script for $f named appserver"
+ echo -e "#!/bin/sh\npython2 /opt/google-appengine-go/$f \$*" \
+ > "$srcdir/appserver"
+ fi
+ # Modifying script to use Python 2
+ sed -i '0,/on/s//on2/' $f
+ done
+}
+
+package() {
+ cd 'go_appengine'
+
+ install -d "$pkgdir/opt"
+ cp -R "./" "$pkgdir/opt/$pkgname"
+
+ msg2 'Fixing permissions...'
+ if [[ $CARCH != i686 ]]; then
+ chmod +x "$pkgdir/opt/$pkgname/goroot/pkg/tool/linux_amd64/"*
+ else
+ chmod +x "$pkgdir/opt/$pkgname/goroot/pkg/tool/linux_386/"*
+ fi
+ find "$pkgdir/opt/$pkgname" -type d -exec chmod 755 {} \;
+ chmod +x "$pkgdir/opt/$pkgname/"go*
+
+ install -d "$pkgdir/usr/lib/python2.7/site-packages"
+
+ cp -r "$pkgdir/opt/$pkgname/google" "$pkgdir/usr/lib/python2.7/site-packages/google"
+
+ install -d "$pkgdir/usr/bin"
+ install -Dm755 "$srcdir/appserver" "$pkgdir/usr/bin/appserver"
+ install -Dm755 $srcdir/*-go "$pkgdir/usr/bin/"
+ install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+ msg2 'Cleaning up deprecated files...'
+ rm -r "$pkgdir/opt/$pkgname/tools"
+}
+
+# vim:set ts=2 sw=2 et: