summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Husmann2015-06-09 00:27:21 +0200
committerStefan Husmann2015-06-09 00:27:21 +0200
commitb81690f69f9fef75bf88ed6b6d83f2c35910fc9c (patch)
treecbc8800d98480827e78318310f58cf8554ab5fbf
downloadaur-b81690f69f9fef75bf88ed6b6d83f2c35910fc9c.tar.gz
initial version
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD31
-rwxr-xr-xhop43
-rw-r--r--hop.install25
4 files changed, 118 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..138934d7423b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = hop
+ pkgdesc = Software Development Kit for the Web
+ pkgver = 2.5.1
+ pkgrel = 1
+ url = http://hop.inria.fr
+ install = hop.install
+ arch = i686
+ arch = x86_64
+ license = GPL
+ license = LGPL
+ depends = bigloo-devel
+ options = !makeflags
+ source = ftp://ftp-sop.inria.fr/indes/fp/Hop/hop-2.5.1.tar.gz
+ source = hop
+ md5sums = ab7abc46bb2bb5a4897ad074f1e40606
+ md5sums = c01ff06ad4faca90e6da4a2ee9b8e533
+
+pkgname = hop
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..e9305e308236
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,31 @@
+# Contributor: Manuel Serrano <Manuel.Serrano@inria.fr>
+# Contributor: MCMic <come.bernigaud@laposte.net>
+# Maintainer: Stefan Husmann <stefan-husmann@t-online.de>
+
+pkgname=hop
+pkgver=2.5.1
+pkgrel=1
+pkgdesc="Software Development Kit for the Web"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL')
+depends=('bigloo-devel')
+install=hop.install
+url='http://hop.inria.fr'
+source=(ftp://ftp-sop.inria.fr/indes/fp/Hop/$pkgname-$pkgver.tar.gz hop)
+md5sums=('ab7abc46bb2bb5a4897ad074f1e40606'
+ 'c01ff06ad4faca90e6da4a2ee9b8e533')
+options=('!makeflags')
+
+build() {
+ cd ${srcdir}/$pkgname-$pkgver
+ ./configure --prefix=/usr --etcdir=/etc/hop --mandir=/usr/share/man
+ make
+}
+
+package() {
+ cd ${srcdir}/$pkgname-$pkgver
+ make DESTDIR=${pkgdir} install
+ cd ${pkgdir}/usr/bin; rm hop; ln -s hop-$pkgver hop
+ install -Dm755 $srcdir/hop ${pkgdir}/etc/rc.d/hop
+ install -d ${pkgdir}/var/lib/hop
+}
diff --git a/hop b/hop
new file mode 100755
index 000000000000..d19023852354
--- /dev/null
+++ b/hop
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+HOP_OPTS=-v2
+HOP=/usr/bin/hop
+HOP_PORT=8080
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+if [ -f /etc/conf.d/hop ]; then
+ . /etc/conf.d/hop
+fi
+
+case "$1" in
+ start)
+ stat_busy "Starting Hop service"
+ $HOP -p $HOP_PORT --accept-kill $HOP_OPTS &> /dev/null 2> /var/log/hop.log &
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon hop
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Hop service"
+ $HOP -p $HOP_PORT --kill &> /dev/null &
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon hop
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+ ;;
+esac
diff --git a/hop.install b/hop.install
new file mode 100644
index 000000000000..d6b64deeae87
--- /dev/null
+++ b/hop.install
@@ -0,0 +1,25 @@
+# arg 1: the new package version
+post_install() {
+ echo "==> hop: Edit the config under /etc/hop/hoprc.hop before using HOP"
+ groupadd -g 8080 hop &>/dev/null
+ mkdir -p /var/lib/hop &>/dev/null
+ useradd -u 8080 -g hop -d /var/lib/hop -s /bin/true hop &>/dev/null
+ gpasswd -a hop audio &>/dev/null
+ chown hop:hop -R /var/lib/hop
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install $1
+}
+
+# arg 1: the old package version
+pre_remove() {
+ userdel hop &>/dev/null
+}
+
+op=$1
+shift
+
+$op $*