summaryrefslogtreecommitdiff
path: root/~lukeshu
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2011-12-04 23:14:51 +0000
committerroot <root@rshg054.dnsready.net>2011-12-04 23:14:51 +0000
commit392d2d86b3657d90c3954a44dd6e3e5a4d12d455 (patch)
treea88c28d4a6652dd77a3557f0dab9f6c6bdda037e /~lukeshu
parent851376cd7720e1f9b35e0a7c26bfd66399f0c4d3 (diff)
Sun Dec 4 23:14:51 UTC 2011
Diffstat (limited to '~lukeshu')
-rw-r--r--~lukeshu/parabolaweb-git/PKGBUILD42
-rw-r--r--~lukeshu/parabolaweb-git/parabolaweb.install59
2 files changed, 101 insertions, 0 deletions
diff --git a/~lukeshu/parabolaweb-git/PKGBUILD b/~lukeshu/parabolaweb-git/PKGBUILD
new file mode 100644
index 000000000..9b2614ed8
--- /dev/null
+++ b/~lukeshu/parabolaweb-git/PKGBUILD
@@ -0,0 +1,42 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+
+pkgname=parabolaweb-git
+pkgver=20111204
+pkgrel=1
+pkgdesc="The Parabola website, fork of archweb"
+arch=('any')
+url="https://projects.parabolagnulinux.org/parabolaweb.git/"
+license=('GPL2')
+depends=('python2' 'git'
+ 'django=1.3.1'
+ 'python-markdown=2.0.3'
+ 'python-south=0.7.3'
+ 'python2-pyinotify=0.9.2'
+ 'python-memcached=1.47'
+ 'python2-pytz>=2011n'
+
+ 'python2-psycopg2'
+)
+install=parabolaweb.install
+
+# These will make it install into /http/srv/web
+_install_dir=/srv/http
+_gitname=web
+
+_gitroot=https://projects.parabolagnulinux.org/parabolaweb.git
+_gitbranch="master"
+
+build() {
+ sed -i \
+ -e "s|^_install_dir=.*|_install_dir='$_install_dir'|" \
+ -e "s|^_gitname=.*|_gitname='$_gitname'|" \
+ -e "s|^_gitroot=.*|_gitroot='$_gitroot'|" \
+ -e "s|^_gitbranch=.*|_gitbranch='$_gitbranch'|" \
+ ../parabolaweb.install
+}
+
+package() {
+ install -d "${pkgdir}/${_install_dir}"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/~lukeshu/parabolaweb-git/parabolaweb.install b/~lukeshu/parabolaweb-git/parabolaweb.install
new file mode 100644
index 000000000..0eaaf84c9
--- /dev/null
+++ b/~lukeshu/parabolaweb-git/parabolaweb.install
@@ -0,0 +1,59 @@
+# These will make it install into /http/srv/web
+_install_dir='/srv/http'
+_gitname='web'
+
+_gitroot='https://projects.parabolagnulinux.org/parabolaweb.git'
+_gitbranch='master'
+
+msg() {
+ echo $@
+}
+
+_main() {
+ set -e
+ if [ ! -d "$_install_dir" ]; then
+ mkdir "$_install_dir"
+ fi
+ cd "$_install_dir"
+
+ msg "Connecting to GIT server...."
+
+ if [ -d ${_gitname} ] ; then
+ cd ${_gitname}
+ git pull ${_gitroot}
+ msg "The local files are updated."
+ else
+ git clone ${_gitroot} ${_gitname}
+ cd ${_gitname}
+ fi
+ git checkout ${_gitbranch}
+
+ msg "GIT checkout done or server timeout"
+
+ msg "Checking configuration...."
+
+ if [ ! -f local_settings.py ]; then
+ cp local_settings.py.example local_settings.py.tmp
+ $EDITOR local_settings.py.tmp
+ mv local_settings.py.tmp local_settings.py
+ msg "Creating database...."
+ ./manage.py syncdb
+ fi
+
+ find . -name '*.pyc' -delete
+ ./manage.py migrate
+ ./manage.py loaddata */fixtures/*.json
+}
+
+# arg 1: the new package version
+post_install() {
+ _main
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ _main
+}
+
+# vim:set ts=2 sw=2 et: