From b0ce132961c0cfe8dd3b7625ad705b35e208b6c3 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Fri, 18 Mar 2011 23:44:22 -0400 Subject: [PATCH] Added core/plugui-git --- core/plugui-git/PKGBUILD | 52 ++++++++++++++++++++++++++++++++++ core/plugui-git/plugui.install | 17 +++++++++++ 2 files changed, 69 insertions(+) create mode 100644 core/plugui-git/PKGBUILD create mode 100644 core/plugui-git/plugui.install diff --git a/core/plugui-git/PKGBUILD b/core/plugui-git/PKGBUILD new file mode 100644 index 000000000..a18ef2841 --- /dev/null +++ b/core/plugui-git/PKGBUILD @@ -0,0 +1,52 @@ +plugrel=1 + +pkgname=plugui-git +pkgver=20110315 +pkgrel=1 +pkgdesc="PlugApps web interface" +arch=('arm') +url="https://github.com/plugapps/PlugUI" +license=('GPL') +depends=('python2' 'cherrypy' 'django') +makedepends=('git') +provides=('plugui') +conflicts=('plugui') +install=plugui.install + +_gitroot="git://github.com/plugapps/PlugUI.git" +_gitname="PlugUI" + +build() { + cd $srcdir + + ## Git checkout + if [ -d $srcdir/${_gitname} ] ; then + msg "Git checkout: Updating existing tree" + cd ${_gitname} && git pull + msg "Git checkout: Tree has been updated" + else + msg "Git checkout: Retrieving sources" + git clone --depth 1 ${_gitroot} + fi + msg "Checkout completed" + +} + +package() { + cd $srcdir/${_gitname} + + # create directory structure + install -d $pkgdir/opt/PlugUI + install -d $pkgdir/var/run/PlugUI + install -d $pkgdir/var/lib/PlugUI + install -d $pkgdir/etc/cron.hourly + install -d $pkgdir/etc/rc.d + + # copy everything + cp -a * $pkgdir/opt/PlugUI + + # install cron and rc.d scripts + chmod +x $pkgdir/opt/PlugUI/plugmaintenance.py $pkgdir/opt/PlugUI/plugui.cherrypy + ln -s $pkgdir/opt/PlugUI/plugmaintenance.py $pkgdir/etc/cron.hourly/plugmaintenance + ln -s $pkgdir/opt/PlugUI/plugui.cherrypy $pkgdir/etc/rc.d/plugui +} diff --git a/core/plugui-git/plugui.install b/core/plugui-git/plugui.install new file mode 100644 index 000000000..c46351ec8 --- /dev/null +++ b/core/plugui-git/plugui.install @@ -0,0 +1,17 @@ +post_install() { + echo "Setting up PlugUI.." + echo "Synchronizing database.." + python2 /opt/PlugUI/manage.py syncdb --noinput + + echo "Running maintenance system.." + /opt/PlugUI/plugmaintenance.py > /dev/null 2>&1 + + echo "" + echo "To start PlugUI type: /etc/rc.d/plugui start" + echo "" + echo "Add 'plugui' to the end of the DAEMONS list in /etc/rc.conf to start on boot." +} + +post_upgrade() { + post_install +}