Date: Sat, 18 Nov 2006 18:56:11 GMT From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/105649: [new port] textproc/sphinxsearch -- fast fulltext search engine Message-ID: <200611181856.kAIIuB0O097085@happy-idiot-talk.infracaninophile.co.uk> Resent-Message-ID: <200611181950.kAIJoIuM096033@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 105649 >Category: ports >Synopsis: [new port] textproc/sphinxsearch -- fast fulltext search engine >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Nov 18 19:50:14 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Matthew Seaman >Release: FreeBSD 6.2-PRERELEASE i386 >Organization: Infracaninophile >Environment: System: FreeBSD happy-idiot-talk.infracaninophile.co.uk 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #1: Sun Nov 12 23:07:33 GMT 2006 root@happy-idiot-talk.infracaninophile.co.uk:/usr/obj/usr/src/sys/HAPPY-IDIOT-TALK i386 >Description: sphinx is a full text search engine, which runs stand-alone but integrates well with SQL databases and scripting languages. Sphinx is an acronym standing for 'Sql PHrase IndeX' However, there is already a completely unrelated audio/sphinx port, so this port has been named 'sphinxsearch' based on the developer's web site. >How-To-Repeat: >Fix: --- sphinxsearch.shar begins here --- # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # sphinxsearch # sphinxsearch/Makefile # sphinxsearch/files # sphinxsearch/files/sphinxsearch.sh.in # sphinxsearch/pkg-descr # sphinxsearch/distinfo # sphinxsearch/pkg-plist # echo c - sphinxsearch mkdir -p sphinxsearch > /dev/null 2>&1 echo x - sphinxsearch/Makefile sed 's/^X//' >sphinxsearch/Makefile << 'END-of-sphinxsearch/Makefile' X# New ports collection makefile for: Sphinx full-text search engine X# Date created: 12 November 2006 X# Whom: Matthew Seaman <m.seaman@infracaninophile.co.uk> X# X# $FreeBSD$ X# X# Note: the Sphinx Storage Engine MySQL plugin is not supported by X# this port at the moment. Maybe later. X XPORTNAME= sphinxsearch XPORTVERSION= 0.9.7.r1 XCATEGORIES= textproc databases XMASTER_SITES= http://www.sphinxsearch.com/downloads/ XDISTNAME= sphinx-${PORTVERSION:C@\.r([0-9]+)$@-rc\1@} X XMAINTAINER= m.seaman@infracaninophile.co.uk XCOMMENT= Sphinx Full-Text Search Engine X XOPTIONS= MYSQL "MySQL support" on \ X PGSQL "PostgreSQL support" off \ X OPTIMIZED_CFLAGS "Use compiler optimization (-O3)" off X X# Yes, the conflation of CPPFLAGS and CXXFLAGS is deliberate. No, X# don't ask. X XGNU_CONFIGURE= yes XCONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} XCONFIGURE_ENV+= CC=${CC} CPPFLAGS="${CXXFLAGS}" XCFGFILE= ${PREFIX}/etc/sphinx.conf XUSE_RC_SUBR= sphinxsearch.sh XSUB_LIST+= PORTNAME=${PORTNAME} \ X CFGFILE=${CFGFILE} X.if !defined(NOPORTDOCS) XEXAMPLES= example.sql api/sphinxapi.php api/test.php api/test2.php XDOCS= doc/sphinx.css doc/sphinx.html doc/sphinx.txt doc/sphinx.xml X.endif X X.include <bsd.port.pre.mk> X X# The port will successfully compile with both PGSQL and MYSQL support X# simultaneously. Not sure how useful that is in practice though. X X.if defined(WITH_MYSQL) && !defined(WITHOUT_MYSQL) XCONFIGURE_ARGS+= --with-mysql XUSE_MYSQL= yes X.else XCONFIGURE_ARGS+= --without-mysql X.endif X X.if defined(WITH_PGSQL) && !defined(WITHOUT_PGSQL) XCONFIGURE_ARGS+= --with-pgsql XUSE_PGSQL= yes X.else XCONFIGURE_ARGS+= --without-pgsql X.endif X X.if defined(WITH_OPTIMIZED_CFLAGS) XCXXFLAGS+= -O3 -fomit-frame-pointer X.endif X X# Fix up the sample configuration file to correspond to FreeBSD norms X Xpost-patch: X ${REINPLACE_CMD} \ X -e 's!@CONFDIR@/log/searchd.pid!/var/run/searchd.pid!' \ X -e 's!@CONFDIR@/log/query.log!/var/log/sphinx-query.log!' \ X -e 's!@CONFDIR@/log/searchd.log!/var/log/searchd.log!' \ X -e 's!@CONFDIR@!/var/db/sphinxsearch!' \ X ${WRKSRC}/sphinx.conf.in X Xdo-install: install-bin install-docs install-examples X Xinstall-bin: X ${INSTALL_PROGRAM} ${WRKSRC}/src/indexer ${PREFIX}/bin/indexer X ${INSTALL_PROGRAM} ${WRKSRC}/src/search ${PREFIX}/bin/search X ${INSTALL_PROGRAM} ${WRKSRC}/src/searchd ${PREFIX}/sbin/searchd X ${INSTALL_DATA} ${WRKSRC}/sphinx.conf.dist ${CFGFILE}.sample X Xinstall-docs: X.if !defined(NOPORTDOCS) X @${MKDIR} ${DOCSDIR} X.for doc in ${DOCS} X ${INSTALL_DATA} ${WRKSRC}/${doc} ${DOCSDIR} X.endfor X.endif X Xinstall-examples: X.if !defined(NOPORTDOCS) X @${MKDIR} ${EXAMPLESDIR} X.for example in ${EXAMPLES} X ${INSTALL_DATA} ${WRKSRC}/${example} ${EXAMPLESDIR} X.endfor X.endif X Xpost-install: X @if [ ! -f ${CFGFILE} ]; then \ X ${CP} -p ${CFGFILE}.sample ${CFGFILE} ; \ X fi X X.include <bsd.port.post.mk> END-of-sphinxsearch/Makefile echo c - sphinxsearch/files mkdir -p sphinxsearch/files > /dev/null 2>&1 echo x - sphinxsearch/files/sphinxsearch.sh.in sed 's/^X//' >sphinxsearch/files/sphinxsearch.sh.in << 'END-of-sphinxsearch/files/sphinxsearch.sh.in' X#!/bin/sh X# X# $FreeBSD$ X# X# PROVIDE: %%PORTNAME%% X# REQUIRE: LOGIN X# KEYWORD: shutdown X X# X# Add the following lines to /etc/rc.conf to enable %%PORTNAME%%: X# X# %%PORTNAME%%_enable="YES" X# X# Other rc.conf variables: X# X# %%PORTNAME%%_conffile="%%CFGFILE%%" X# -- path to config file X# %%PORTNAME%%_pidfile="/var/run/searchd.pid" X# -- location of pidfile: must match setting X# in ${%%PORTNAME%%_conffile} X# X X. /etc/rc.subr X Xname=%%PORTNAME%% Xrcvar=`set_rcvar` X X%%PORTNAME%%_enable=${%%PORTNAME%%_enable-"NO"} X%%PORTNAME%%_conffile=${%%PORTNAME%%_conffile-"%%CFGFILE%%"} X%%PORTNAME%%_pidfile=${%%PORTNAME%%_pidfile-"/var/run/searchd.pid"} X Xcommand=%%PREFIX%%/sbin/searchd Xpidfile=${%%PORTNAME%%_pidfile} Xrequired_files=${%%PORTNAME%%_conffile} X%%PORTNAME%%_flags="--config ${%%PORTNAME%%_conffile}" X Xload_rc_config ${name} Xrun_rc_command "$1" END-of-sphinxsearch/files/sphinxsearch.sh.in echo x - sphinxsearch/pkg-descr sed 's/^X//' >sphinxsearch/pkg-descr << 'END-of-sphinxsearch/pkg-descr' XSphinx is a full-text search engine, distributed under GPL version X2. Commercial license is also available for embedded use. X XGenerally, it's a standalone search engine, meant to provide fast, Xsize-efficient and relevant fulltext search functions to other Xapplications. Sphinx was specially designed to integrate well with SQL Xdatabases and scripting languages. Currently built-in data sources Xsupport fetching data either via direct connection to MySQL, or from Xan XML pipe. X XAs for the name, Sphinx is an acronym which is officially decoded as XSQL Phrase Index. X XWWW: http://www.sphinxsearch.com/ END-of-sphinxsearch/pkg-descr echo x - sphinxsearch/distinfo sed 's/^X//' >sphinxsearch/distinfo << 'END-of-sphinxsearch/distinfo' XMD5 (sphinx-0.9.7-rc1.tar.gz) = 50d6a09cd0e89e2f3e4264825329ccfc XSHA256 (sphinx-0.9.7-rc1.tar.gz) = d0569afad64d03ae290857b5f724c79e70d2cb7490bd3ba21afb4130756a9e00 XSIZE (sphinx-0.9.7-rc1.tar.gz) = 239486 END-of-sphinxsearch/distinfo echo x - sphinxsearch/pkg-plist sed 's/^X//' >sphinxsearch/pkg-plist << 'END-of-sphinxsearch/pkg-plist' Xbin/indexer Xbin/search Xsbin/searchd X@unexec if cmp -s %D/etc/sphinx.conf.sample %D/etc/sphinx.conf; then rm -f %D/etc/sphinx.conf; fi Xetc/sphinx.conf.sample X@exec if [ ! -f %D/etc/sphinx.conf ] ; then cp -p %D/%F %B/sphinx.conf; fi X%%PORTDOCS%%%%DOCSDIR%%/sphinx.css X%%PORTDOCS%%%%DOCSDIR%%/sphinx.html X%%PORTDOCS%%%%DOCSDIR%%/sphinx.txt X%%PORTDOCS%%%%DOCSDIR%%/sphinx.xml X%%PORTDOCS%%%%EXAMPLESDIR%%/example.sql X%%PORTDOCS%%%%EXAMPLESDIR%%/sphinxapi.php X%%PORTDOCS%%%%EXAMPLESDIR%%/test.php X%%PORTDOCS%%%%EXAMPLESDIR%%/test2.php X%%PORTDOCS%%@dirrm %%DOCSDIR%% X%%PORTDOCS%%@dirrm %%EXAMPLESDIR%% END-of-sphinxsearch/pkg-plist exit --- sphinxsearch.shar ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611181856.kAIIuB0O097085>