Commit 188a3a44 authored by Francesco Colista's avatar Francesco Colista
Browse files

testing/sphinx: new aport. Fixes #1448

parent 942295bd
# 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"
#!/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"
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment