summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2009-11-05 15:41:57 +0000
committerHans de Graaff <graaff@gentoo.org>2009-11-05 15:41:57 +0000
commit53757e2e6382e3e75ee1609bd6dc2b36510f2014 (patch)
tree8b523d694b550bbf0b74fee6e97d69128114fde1 /app-misc
parentVersion bump. (diff)
downloadhistorical-53757e2e6382e3e75ee1609bd6dc2b36510f2014.tar.gz
historical-53757e2e6382e3e75ee1609bd6dc2b36510f2014.tar.bz2
historical-53757e2e6382e3e75ee1609bd6dc2b36510f2014.zip
Belated commit: add init.d file for managing searchd.
Package-Manager: portage-2.1.6.13/cvs/Linux x86_64
Diffstat (limited to 'app-misc')
-rw-r--r--app-misc/sphinx/ChangeLog8
-rw-r--r--app-misc/sphinx/files/searchd.rc32
-rw-r--r--app-misc/sphinx/sphinx-0.9.9_rc2-r1.ebuild58
3 files changed, 97 insertions, 1 deletions
diff --git a/app-misc/sphinx/ChangeLog b/app-misc/sphinx/ChangeLog
index b02de41af705..1f6beafcaf62 100644
--- a/app-misc/sphinx/ChangeLog
+++ b/app-misc/sphinx/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-misc/sphinx
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-misc/sphinx/ChangeLog,v 1.18 2009/07/23 21:48:24 gengor Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-misc/sphinx/ChangeLog,v 1.19 2009/11/05 15:41:57 graaff Exp $
+
+*sphinx-0.9.9_rc2-r1 (26 Sep 2009)
+
+ 26 Sep 2009; Hans de Graaff <graaff@gentoo.org>
+ +sphinx-0.9.9_rc2-r1.ebuild, +files/searchd.rc:
+ Add init.d script to start and stop sphinx' searchd.
*sphinx-0.9.9_rc2 (23 Jul 2009)
diff --git a/app-misc/sphinx/files/searchd.rc b/app-misc/sphinx/files/searchd.rc
new file mode 100644
index 000000000000..d7fdc473cce6
--- /dev/null
+++ b/app-misc/sphinx/files/searchd.rc
@@ -0,0 +1,32 @@
+#!/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"
+}
diff --git a/app-misc/sphinx/sphinx-0.9.9_rc2-r1.ebuild b/app-misc/sphinx/sphinx-0.9.9_rc2-r1.ebuild
new file mode 100644
index 000000000000..a00b3628df6b
--- /dev/null
+++ b/app-misc/sphinx/sphinx-0.9.9_rc2-r1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/sphinx/sphinx-0.9.9_rc2-r1.ebuild,v 1.1 2009/11/05 15:41:57 graaff Exp $
+
+inherit eutils autotools
+
+MY_P=${P/_/-}
+
+DESCRIPTION="Full-text search engine with support for MySQL and PostgreSQL"
+HOMEPAGE="http://www.sphinxsearch.com/"
+SRC_URI="http://sphinxsearch.com/downloads/${MY_P}.tar.gz
+ stemmer? ( http://snowball.tartarus.org/dist/libstemmer_c.tgz )"
+RESTRICT="mirror"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug id64 mysql postgres stemmer test"
+
+DEPEND="mysql? ( virtual/mysql )
+ postgres? ( virtual/postgresql-base )"
+RDEPEND="${DEPEND}
+ test? ( dev-lang/php )"
+
+S=${WORKDIR}/${MY_P}
+
+src_unpack() {
+ unpack ${MY_P}.tar.gz
+ if use stemmer; then
+ cd "${S}"
+ unpack libstemmer_c.tgz
+ fi
+ cd "${S}"
+ eautoreconf
+}
+
+src_compile() {
+ econf \
+ --sysconfdir="/etc/${PN}" \
+ $(use_enable id64) \
+ $(use_with debug) \
+ $(use_with mysql) \
+ $(use_with postgres pgsql) \
+ $(use_with stemmer libstemmer)
+
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "install failed"
+ dodoc doc/*
+
+ dodir /var/lib/sphinx
+ dodir /var/log/sphinx
+ dodir /var/run/sphinx
+
+ newinitd "${FILESDIR}"/searchd.rc searchd
+}