summaryrefslogtreecommitdiff
path: root/social/seeks
diff options
context:
space:
mode:
authorNicolás Reynolds <apoyosis@correo.inta.gob.ar>2011-12-18 12:10:42 -0300
committerNicolás Reynolds <apoyosis@correo.inta.gob.ar>2011-12-18 12:10:42 -0300
commit2882e85db0e82645f4c7851bf52a06d9e190f4db (patch)
treeebe79bb1333f92946e7474b4d797f31ff6b04a8c /social/seeks
parent452fb86a5d288522a30d2be6b078171e863c34b2 (diff)
social/seeks-0.4.0-1
Plus Tokyo* dependencies
Diffstat (limited to 'social/seeks')
-rw-r--r--social/seeks/PKGBUILD67
-rw-r--r--social/seeks/install18
-rw-r--r--social/seeks/logfile.patch29
-rwxr-xr-xsocial/seeks/seeks68
-rw-r--r--social/seeks/seeks.conf.d6
-rw-r--r--social/seeks/seeks.logrotate6
6 files changed, 194 insertions, 0 deletions
diff --git a/social/seeks/PKGBUILD b/social/seeks/PKGBUILD
new file mode 100644
index 000000000..2997e1be6
--- /dev/null
+++ b/social/seeks/PKGBUILD
@@ -0,0 +1,67 @@
+# Co-maintainer: Gitus < git at shroomrider dot com >
+# Co-maintainer: Enjolras < 0enjolras0 at laposte dot net >
+
+pkgname=seeks
+pkgver=0.4.0
+pkgrel=1
+pkgdesc="An open decentralized platform for collaborative search content"
+arch=('i686' 'x86_64')
+url="http://www.seeks-project.info"
+license=('AGPL3')
+backup=('etc/logrotate.d/seeks'
+ 'etc/conf.d/seeks'
+ 'etc/seeks/config')
+depends=('curl' 'libevent' 'protobuf' 'tokyotyrant' 'opencv' 'icu')
+makedepends=('docbook2x' 'pkg-config' )
+source=("http://downloads.sourceforge.net/project/seeks/hippy/seeks-0.4.0.tar.gz"
+ 'seeks'
+ 'seeks.conf.d'
+ 'seeks.logrotate'
+ 'logfile.patch')
+install='install'
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ autoreconf -ivs
+ sed -i s/docbook2x-man/docbook2man/ ./configure
+ ./configure LDFLAGS="-Wl,--no-as-needed" \
+ --prefix=/usr --sysconfdir=/etc \
+ --enable-opencv --enable-httpserv-plugin --enable-image-websearch-plugin=yes \
+ --enable-xslserializer-plugin --enable-personalization --enable-keepalive --enable-extended-host-patterns
+
+ sed -i s/cxflann.h/cv.h/ src/plugins/img_websearch/ocvsurf.cpp
+ sed -i s/,--as-needed,/,/ config.status
+
+ make
+
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver/src/"
+
+ #Changing logdir and logfile options
+ #disable plugins cf and query-capture in config
+ patch -p0 < "$srcdir/logfile.patch"
+
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make DESTDIR="$pkgdir" install
+
+ install -D -m644 Licenses "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -m644 AGPL-3.txt "${pkgdir}/usr/share/licenses/${pkgname}/"
+ install -m644 BSD-yui.txt "${pkgdir}/usr/share/licenses/${pkgname}/"
+ install -D -m755 ../seeks "${pkgdir}"/etc/rc.d/seeks
+ install -D -m644 ../seeks.conf.d "${pkgdir}"/etc/conf.d/seeks
+ install -D -m600 ../seeks.logrotate "${pkgdir}"/etc/logrotate.d/seeks
+}
+md5sums=('dd80c832f80c34c392be5872239a8d9f'
+ '33e6da05cca492019e6aff39684aed26'
+ '52e7e06a28974547041012a1cf3207f3'
+ 'd1aba6739972239c6cd09178807e196f'
+ 'e352306f5396a1af4dfc81a18bfc5a71')
+md5sums=('a2d0b6e7b91036883c0b327ead5e93c0'
+ '33e6da05cca492019e6aff39684aed26'
+ '52e7e06a28974547041012a1cf3207f3'
+ 'd1aba6739972239c6cd09178807e196f'
+ 'e352306f5396a1af4dfc81a18bfc5a71')
diff --git a/social/seeks/install b/social/seeks/install
new file mode 100644
index 000000000..35f383a3c
--- /dev/null
+++ b/social/seeks/install
@@ -0,0 +1,18 @@
+post_install() {
+ getent group seeks >/dev/null || groupadd -r seeks
+ getent passwd seeks >/dev/null || useradd -r -c "Seeks daemon" -g seeks -M -d /var/run/seeks -s /bin/false seeks
+ passwd -l seeks &>/dev/null
+ touch var/log/seeks.log
+ chown seeks:log var/log/seeks.log
+ mkdir -p var/lib/seeks
+ touch var/lib/seeks/seeks.db
+ chown -R seeks:seeks var/lib/seeks
+}
+
+pre_remove() {
+ getent passwd seeks &>/dev/null && userdel seeks >/dev/null
+ getent group seeks &>/dev/null && groupdel seeks >/dev/null
+ return 0
+}
+
+
diff --git a/social/seeks/logfile.patch b/social/seeks/logfile.patch
new file mode 100644
index 000000000..9f4ab9b02
--- /dev/null
+++ b/social/seeks/logfile.patch
@@ -0,0 +1,29 @@
+--- config 2011-10-21 10:42:20.000000000 +0200
++++ config.patch 2011-11-17 18:48:48.914516206 +0100
+@@ -193,7 +193,7 @@
+ #
+ # No trailing "/", please.
+ #
+-logdir .
++logdir /var/log/
+ #
+ #
+ # 2.4. logfile
+@@ -239,7 +239,7 @@
+ # Any log files must be writable by whatever user Seeks is
+ # being run as.
+ #
+-logfile logfile
++logfile seeks.log
+ #
+ #
+ # 2.5. plugindir
+@@ -377,7 +377,7 @@
+ # Unset. This means the db is located in $HOME/.seeks/seeks_user.db
+ # as default location.
+ #
+-# user-db-file /path/to/file.db
++user-db-file /var/lib/seeks/seeks.db
+ #
+ # 2.10. user-db-address
+ # =====================
diff --git a/social/seeks/seeks b/social/seeks/seeks
new file mode 100755
index 000000000..01f34a432
--- /dev/null
+++ b/social/seeks/seeks
@@ -0,0 +1,68 @@
+#!/bin/bash
+
+daemon_name="seeks"
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/$daemon_name
+
+get_pid() {
+ pidof -o %PPID $daemon_name
+}
+
+case "$1" in
+ start)
+ stat_busy "Starting $daemon_name daemon"
+
+ PID=$(get_pid)
+ if [ -z "$PID" ]; then
+ [ -f /var/run/$daemon_name.pid ] && rm -f /var/run/$daemon_name.pid
+ # RUN
+ $daemon_name $SEEKS_ARGS 2> /dev/null
+ #
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 1
+ else
+ echo $(get_pid) > /var/run/$daemon_name.pid
+ add_daemon $daemon_name
+ stat_done
+ fi
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+
+ stop)
+ stat_busy "Stopping $daemon_name daemon"
+ PID=$(get_pid)
+ # KILL
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ #
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 1
+ else
+ rm -f /var/run/$daemon_name.pid &> /dev/null
+ rm_daemon $daemon_name
+ stat_done
+ fi
+ ;;
+
+ restart)
+ $0 stop
+ sleep 3
+ $0 start
+ ;;
+
+ status)
+ stat_busy "Checking $daemon_name status";
+ ck_status $daemon_name
+ ;;
+
+ *)
+ echo "usage: $0 {start|stop|restart|status}"
+esac
+
+exit 0
diff --git a/social/seeks/seeks.conf.d b/social/seeks/seeks.conf.d
new file mode 100644
index 000000000..21ed0526a
--- /dev/null
+++ b/social/seeks/seeks.conf.d
@@ -0,0 +1,6 @@
+#
+# Array for your vde config files
+SEEKS_CONFIG=""
+
+# Parameters to be passed to seeks
+SEEKS_ARGS="--daemon --user seeks $SEEKS_CONFIG"
diff --git a/social/seeks/seeks.logrotate b/social/seeks/seeks.logrotate
new file mode 100644
index 000000000..24b6f539f
--- /dev/null
+++ b/social/seeks/seeks.logrotate
@@ -0,0 +1,6 @@
+/var/log/seeks.log {
+ missingok
+ notifempty
+ size 30k
+ create
+}