aboutsummaryrefslogtreecommitdiffstats
path: root/testing/sphinx
diff options
context:
space:
mode:
authorFrancesco Colista <francesco.colista@gmail.com>2012-10-24 07:34:28 +0000
committerFrancesco Colista <francesco.colista@gmail.com>2012-10-24 07:34:28 +0000
commit188a3a44b3edaf42f912f5a59a1294c223f08abb (patch)
treec27cb2f7616cfa5ff5e261a46f77665d782373b8 /testing/sphinx
parent942295bda2f76216ab3d479a29b1b8996293b649 (diff)
downloadaports-188a3a44b3edaf42f912f5a59a1294c223f08abb.tar.bz2
aports-188a3a44b3edaf42f912f5a59a1294c223f08abb.tar.xz
testing/sphinx: new aport. Fixes #1448
Diffstat (limited to 'testing/sphinx')
-rw-r--r--testing/sphinx/APKBUILD54
-rw-r--r--testing/sphinx/sphinx.initd33
2 files changed, 87 insertions, 0 deletions
diff --git a/testing/sphinx/APKBUILD b/testing/sphinx/APKBUILD
new file mode 100644
index 0000000000..032d67b16a
--- /dev/null
+++ b/testing/sphinx/APKBUILD
@@ -0,0 +1,54 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=sphinx
+pkgver=2.0.6
+pkgrel=0
+pkgdesc="Free open-source SQL full-text search engine"
+url="http://www.sphinxsearch.com"
+arch="all"
+license="GPL2"
+depends=""
+depends_dev="postgresql-dev mysql-dev unixodbc-dev expat-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://sphinxsearch.com/files/$pkgname-$pkgver-release.tar.gz
+ sphinx.initd"
+
+_builddir="$srcdir"/$pkgname-$pkgver-release
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --exec-prefix=/usr \
+ --localstatedir=/var/lib/sphinx \
+ --sysconfdir=/etc/sphinx \
+ --with-pgsql \
+ --with-mysql \
+ --with-unixodbc \
+ --with-syslog \
+ --enable-id64
+ make || return 1
+
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+ install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname \
+ || return 1
+
+
+}
+
+md5sums="de6be5ee20b1bfafa2a0cea7155a8331 sphinx-2.0.6-release.tar.gz
+38a9a10e6b927c597005d571be737f70 sphinx.initd"
diff --git a/testing/sphinx/sphinx.initd b/testing/sphinx/sphinx.initd
new file mode 100644
index 0000000000..c6799653fd
--- /dev/null
+++ b/testing/sphinx/sphinx.initd
@@ -0,0 +1,33 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/sphinx/files/searchd.rc,v 1.1 2009/11/05 15:41:56 graaff Exp $
+
+depend() {
+ need net
+ use logger
+}
+
+checkconfig() {
+ if [ ! -f /etc/sphinx/sphinx.conf ] ; then
+ eerror "Please create /etc/sphinx/sphinx.conf"
+ eerror "Sample conf: /etc/sphinx/sphinx.conf.dist"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+
+ ebegin "Starting sphinx searchd"
+ start-stop-daemon --start --exec /usr/bin/searchd
+ eend $? "Failed to start sphinx searchd"
+}
+
+stop() {
+ ebegin "Stopping sphinx searchd"
+ start-stop-daemon --stop --exec /usr/bin/searchd
+ eend $? "Failed to stop sphinx searchd"
+}
+