From 793b724c23f41355f770505af4fcb5daa0438c9b Mon Sep 17 00:00:00 2001 From: Martin Wilke Date: Sat, 18 Nov 2006 22:54:07 +0000 Subject: Sphinx is a full-text search engine, distributed under GPL version 2. Commercial license is also available for embedded use. Generally, it's a standalone search engine, meant to provide fast, size-efficient and relevant fulltext search functions to other applications. Sphinx was specially designed to integrate well with SQL databases and scripting languages. Currently built-in data sources support fetching data either via direct connection to MySQL, or from an XML pipe. As for the name, Sphinx is an acronym which is officially decoded as SQL Phrase Index. WWW: http://www.sphinxsearch.com/ PR: ports/105649 Submitted by: Matthew Seaman --- textproc/sphinxsearch/Makefile | 100 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 textproc/sphinxsearch/Makefile (limited to 'textproc/sphinxsearch/Makefile') diff --git a/textproc/sphinxsearch/Makefile b/textproc/sphinxsearch/Makefile new file mode 100644 index 000000000000..1bff34e16b10 --- /dev/null +++ b/textproc/sphinxsearch/Makefile @@ -0,0 +1,100 @@ +# New ports collection makefile for: Sphinx full-text search engine +# Date created: 12 November 2006 +# Whom: Matthew Seaman +# +# $FreeBSD$ +# +# Note: the Sphinx Storage Engine MySQL plugin is not supported by +# this port at the moment. Maybe later. + +PORTNAME= sphinxsearch +PORTVERSION= 0.9.7.r1 +CATEGORIES= textproc databases +MASTER_SITES= http://www.sphinxsearch.com/downloads/ +DISTNAME= sphinx-${PORTVERSION:C@\.r([0-9]+)$@-rc\1@} + +MAINTAINER= m.seaman@infracaninophile.co.uk +COMMENT= Sphinx Full-Text Search Engine + +OPTIONS= MYSQL "MySQL support" on \ + PGSQL "PostgreSQL support" off \ + OPTIMIZED_CFLAGS "Use compiler optimization (-O3)" off + +# Yes, the conflation of CPPFLAGS and CXXFLAGS is deliberate. No, +# don't ask. + +GNU_CONFIGURE= yes +CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} +CONFIGURE_ENV+= CC=${CC} CPPFLAGS="${CXXFLAGS}" +CFGFILE= ${PREFIX}/etc/sphinx.conf +USE_RC_SUBR= sphinxsearch.sh +SUB_LIST+= PORTNAME=${PORTNAME} \ + CFGFILE=${CFGFILE} +.if !defined(NOPORTDOCS) +EXAMPLES= example.sql api/sphinxapi.php api/test.php api/test2.php +DOCS= doc/sphinx.css doc/sphinx.html doc/sphinx.txt doc/sphinx.xml +.endif + +.include + +# The port will successfully compile with both PGSQL and MYSQL support +# simultaneously. Not sure how useful that is in practice though. + +.if defined(WITH_MYSQL) && !defined(WITHOUT_MYSQL) +CONFIGURE_ARGS+= --with-mysql +USE_MYSQL= yes +.else +CONFIGURE_ARGS+= --without-mysql +.endif + +.if defined(WITH_PGSQL) && !defined(WITHOUT_PGSQL) +CONFIGURE_ARGS+= --with-pgsql +USE_PGSQL= yes +.else +CONFIGURE_ARGS+= --without-pgsql +.endif + +.if defined(WITH_OPTIMIZED_CFLAGS) +CXXFLAGS+= -O3 -fomit-frame-pointer +.endif + +# Fix up the sample configuration file to correspond to FreeBSD norms + +post-patch: + ${REINPLACE_CMD} \ + -e 's!@CONFDIR@/log/searchd.pid!/var/run/searchd.pid!' \ + -e 's!@CONFDIR@/log/query.log!/var/log/sphinx-query.log!' \ + -e 's!@CONFDIR@/log/searchd.log!/var/log/searchd.log!' \ + -e 's!@CONFDIR@!/var/db/sphinxsearch!' \ + ${WRKSRC}/sphinx.conf.in + +do-install: install-bin install-docs install-examples + +install-bin: + ${INSTALL_PROGRAM} ${WRKSRC}/src/indexer ${PREFIX}/bin/indexer + ${INSTALL_PROGRAM} ${WRKSRC}/src/search ${PREFIX}/bin/search + ${INSTALL_PROGRAM} ${WRKSRC}/src/searchd ${PREFIX}/sbin/searchd + ${INSTALL_DATA} ${WRKSRC}/sphinx.conf.dist ${CFGFILE}.sample + +install-docs: +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} +.for doc in ${DOCS} + ${INSTALL_DATA} ${WRKSRC}/${doc} ${DOCSDIR} +.endfor +.endif + +install-examples: +.if !defined(NOPORTDOCS) + @${MKDIR} ${EXAMPLESDIR} +.for example in ${EXAMPLES} + ${INSTALL_DATA} ${WRKSRC}/${example} ${EXAMPLESDIR} +.endfor +.endif + +post-install: + @if [ ! -f ${CFGFILE} ]; then \ + ${CP} -p ${CFGFILE}.sample ${CFGFILE} ; \ + fi + +.include -- cgit v1.2.3