aboutsummaryrefslogtreecommitdiffstats
path: root/textproc
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2009-12-03 17:07:28 +0800
committerpav <pav@FreeBSD.org>2009-12-03 17:07:28 +0800
commiteb024e41927649a88c023e01e9ba777a60851d25 (patch)
tree079e710a0cf41f45035001d235c7fc642b43b4fd /textproc
parent072a36e52abe0d5200870f4ed495ca1c1777a591 (diff)
downloadfreebsd-ports-gnome-eb024e41927649a88c023e01e9ba777a60851d25.tar.gz
freebsd-ports-gnome-eb024e41927649a88c023e01e9ba777a60851d25.tar.zst
freebsd-ports-gnome-eb024e41927649a88c023e01e9ba777a60851d25.zip
- Update to 0.9.9
PR: ports/141117 Submitted by: Matthew Seaman <m.seaman@infracaninophile.co.uk> (maintainer)
Diffstat (limited to 'textproc')
-rw-r--r--textproc/sphinxsearch/Makefile81
-rw-r--r--textproc/sphinxsearch/distinfo6
-rw-r--r--textproc/sphinxsearch/files/pkg-deinstall.in6
-rw-r--r--textproc/sphinxsearch/files/pkg-install.in123
-rw-r--r--textproc/sphinxsearch/files/sphinxsearch.sh.in9
-rw-r--r--textproc/sphinxsearch/pkg-message17
6 files changed, 68 insertions, 174 deletions
diff --git a/textproc/sphinxsearch/Makefile b/textproc/sphinxsearch/Makefile
index 044eec516bb4..70efc9932a19 100644
--- a/textproc/sphinxsearch/Makefile
+++ b/textproc/sphinxsearch/Makefile
@@ -9,7 +9,7 @@
# See http://www.infracaninophile.co.uk/articles/sphinxse.html
PORTNAME= sphinxsearch
-PORTVERSION= 0.9.8.1
+PORTVERSION= 0.9.9
CATEGORIES= textproc databases
MASTER_SITES= http://www.sphinxsearch.com/downloads/
DISTNAME= sphinx-${PORTVERSION}
@@ -17,8 +17,6 @@ DISTNAME= sphinx-${PORTVERSION}
MAINTAINER= m.seaman@infracaninophile.co.uk
COMMENT= Sphinx Full-Text Search Engine
-CONFLICTS= sphinxsearch-devel-[0-9]*
-
# If expat is present on the system and configure finds it, it will
# unconditionally link the output binary against it. There's no way
# of turning this off. So for consistency, make sure it's always on.
@@ -33,42 +31,9 @@ OPTIONS= MYSQL "MySQL support" on \
## FFR
## LIBSTEMMER "compile with libstemmer support" off
-SPHINX_USR?= _sphinx
-SPHINX_UID?= 312
-SPHINX_GRP?= _sphinx
-SPHINX_GID?= 312
-SPHINX_DIR?= /var/db/${PORTNAME}
-SPHINX_RUN?= /var/run/${PORTNAME}
-SPHINX_LOG?= /var/log/${PORTNAME}
-
-# Yes, the conflation of CPPFLAGS and CXXFLAGS is deliberate. No,
-# don't ask.
-
-GNU_CONFIGURE= yes
-CONFIGURE_ENV+= CC=${CC} CPPFLAGS="${CXXFLAGS}"
-CFGFILE= ${PREFIX}/etc/sphinx.conf
-USE_RC_SUBR= sphinxsearch.sh
-SUB_LIST+= PORTNAME=${PORTNAME} \
- CFGFILE=${CFGFILE} \
- SPHINX_USR=${SPHINX_USR} \
- SPHINX_UID=${SPHINX_UID} \
- SPHINX_GRP=${SPHINX_GRP} \
- SPHINX_GID=${SPHINX_GID} \
- SPHINX_DIR=${SPHINX_DIR} \
- SPHINX_RUN=${SPHINX_RUN} \
- SPHINX_LOG=${SPHINX_LOG}
-SUB_FILES+= pkg-install pkg-deinstall
-
-.if !defined(NOPORTEXAMPLES)
-EXAMPLES= example.sql api
-PORTEXAMPLES= *
-.endif
-
-.if !defined(NOPORTDOCS)
-DOCS= doc/sphinx.css doc/sphinx.html doc/sphinx.txt doc/sphinx.xml
-.endif
+CONFLICTS= sphinxsearch-devel-[0-9]*
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
# The port will successfully compile with both PGSQL and MYSQL support
# simultaneously. Not sure how useful that is in practice though.
@@ -122,6 +87,38 @@ CONFIGURE_ARGS+= --enable-id64
## CONFIGURE_ARGS+= --without-libstemmer
## .endif
+USERS?= _sphinx
+GROUPS?= _sphinx
+
+SPHINX_DIR?= /var/db/${PORTNAME}
+SPHINX_RUN?= /var/run/${PORTNAME}
+SPHINX_LOG?= /var/log/${PORTNAME}
+
+# Yes, the conflation of CPPFLAGS and CXXFLAGS is deliberate. No,
+# don't ask.
+
+GNU_CONFIGURE= yes
+CONFIGURE_ENV+= CC=${CC} CPPFLAGS="${CXXFLAGS}"
+CFGFILE= ${PREFIX}/etc/sphinx.conf
+USE_RC_SUBR= sphinxsearch.sh
+SUB_LIST+= PORTNAME=${PORTNAME} \
+ CFGFILE=${CFGFILE} \
+ SPHINX_USR=${USERS} \
+ SPHINX_GRP=${GROUPS} \
+ SPHINX_DIR=${SPHINX_DIR} \
+ SPHINX_RUN=${SPHINX_RUN} \
+ SPHINX_LOG=${SPHINX_LOG}
+SUB_FILES+= pkg-deinstall
+
+.if !defined(NOPORTEXAMPLES)
+EXAMPLES= example.sql api
+PORTEXAMPLES= *
+.endif
+
+.if !defined(NOPORTDOCS)
+DOCS= doc/sphinx.css doc/sphinx.html doc/sphinx.txt doc/sphinx.xml
+.endif
+
# Fix up the sample configuration file to correspond to FreeBSD norms
post-patch:
@@ -132,9 +129,6 @@ post-patch:
-e "s!@CONFDIR@!${SPHINX_DIR}!" \
${WRKSRC}/sphinx.conf.in
-pre-install:
- @${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
-
do-install: install-bin install-docs install-examples
install-bin:
@@ -159,12 +153,9 @@ install-examples:
.endfor
.endif
-post-install: post-install-cfg
- @${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
-
post-install-cfg:
@if [ ! -f ${CFGFILE} ]; then \
${CP} -p ${CFGFILE}.sample ${CFGFILE} ; \
fi
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/textproc/sphinxsearch/distinfo b/textproc/sphinxsearch/distinfo
index 45e475247853..11ff6302e7a5 100644
--- a/textproc/sphinxsearch/distinfo
+++ b/textproc/sphinxsearch/distinfo
@@ -1,3 +1,3 @@
-MD5 (sphinx-0.9.8.1.tar.gz) = 428a14df41fb425e664d9e2d6178c037
-SHA256 (sphinx-0.9.8.1.tar.gz) = ef69b2b52381173da92bf2df79dfc8c5271c4b3f156c356bb4ef82ca035dc013
-SIZE (sphinx-0.9.8.1.tar.gz) = 949660
+MD5 (sphinx-0.9.9.tar.gz) = 7b9b618cb9b378f949bb1b91ddcc4f54
+SHA256 (sphinx-0.9.9.tar.gz) = bf8f55ffc095ff6b628f0cbc7eb54761811140140679a1c869cc1b17c42803e4
+SIZE (sphinx-0.9.9.tar.gz) = 1218359
diff --git a/textproc/sphinxsearch/files/pkg-deinstall.in b/textproc/sphinxsearch/files/pkg-deinstall.in
index 85b63ccf82cf..6fe5ffd4cdb4 100644
--- a/textproc/sphinxsearch/files/pkg-deinstall.in
+++ b/textproc/sphinxsearch/files/pkg-deinstall.in
@@ -6,15 +6,15 @@
sphinx_usr=%%SPHINX_USR%%
sphinx_grp=%%SPHINX_GRP%%
sphinx_dir=%%SPHINX_DIR%%
-sphinx_name=%%PORTNAME%%
+portname=%%PORTNAME%%
case $2 in
POST-DEINSTALL)
cat <<EOMSG
-The $sphinx_name port has been deleted. If you are not
-upgrading and don't intend to use $sphinx_name any more
+The $portname port has been deleted. If you are not
+upgrading and don't intend to use $portname any more
then you may wish to delete the $sphinx_usr account,
and the $sphinx_grp group together with the working
directory $sphinx_dir; which can be done with the
diff --git a/textproc/sphinxsearch/files/pkg-install.in b/textproc/sphinxsearch/files/pkg-install.in
deleted file mode 100644
index 37e03b835600..000000000000
--- a/textproc/sphinxsearch/files/pkg-install.in
+++ /dev/null
@@ -1,123 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-#
-
-PATH=/usr/sbin:/usr/bin:/bin ; export PATH
-
-sphinx_dir=%%SPHINX_DIR%%
-sphinx_usr=%%SPHINX_USR%%
-sphinx_uid=%%SPHINX_UID%%
-sphinx_grp=%%SPHINX_GRP%%
-sphinx_gid=%%SPHINX_GID%%
-sphinx_run=%%SPHINX_RUN%%
-sphinx_log=%%SPHINX_LOG%%
-sphinx_name=%%PORTNAME%%
-
-sphinx_gcos="Sphinxsearch Owner"
-sphinx_home=/nonexistent
-sphinx_shell=/sbin/nologin
-
-create_group() {
- local user uid group gid gcos home shell
-
- user=$1
- uid=$2
- group=$3
- gid=$4
- gcos=$5
- home=$6
- shell=$7
-
- if pw groupadd -n $group -g $gid ; then
- echo "===> Group $group created"
- else
- cat <<-EOERRORMSG
- *** Failed to create the $group group.
-
- Please add the $user user and $group group
- manually with the commands:
-
- pw groupadd -n $group -g $gid
- pw useradd -n $user -u $uid -g $group -c "$gcos" \\
- -d $home -s $shell -h -
-
- and retry installing this package.
- EOERRORMSG
- exit 1
- fi
-}
-
-
-create_user() {
- local user uid group gid gcos home shell
-
- user=$1
- uid=$2
- group=$3
- gid=$4
- gcos=$5
- home=$6
- shell=$7
-
- if pw useradd -n $user -u $uid -g $group -c "$gcos" -d $home \
- -s $shell -h - ; then
- echo "===> Created $user user"
- else
- cat <<-EOERRORMSG
- *** Failed to create the $user user.
-
- Please add the $user user manually with the command:
-
- pw useradd -n $user -u $uid -g $group -c "$gcos" \\
- -d $home -s $shell -h -
-
- and retry installing this package.
- EOERRORMSG
- exit 1
- fi
-}
-
-
-case $2 in
- PRE-INSTALL)
-
- # Create the sphinx user and group if they do not already exist
-
- if pw user show -n $sphinx_usr >/dev/null 2>&1 ; then
- echo "===> Using pre-existing user $sphinx_usr"
- else
- if ! pw group show -n $sphinx_grp >/dev/null 2>&1 ; then
- create_group $sphinx_usr $sphinx_uid $sphinx_grp $sphinx_gid \
- "$sphinx_gcos" $sphinx_home $sphinx_shell
- fi
- create_user $sphinx_usr $sphinx_uid $sphinx_grp $sphinx_gid \
- "$sphinx_gcos" $sphinx_home $sphinx_shell
- fi
- ;;
- POST-INSTALL)
-
- # Create and set ownership of the Sphinx working directory
- if [ -d $sphinx_dir ]; then
- echo "==> Using pre-existing directory $sphinx_dir"
- else
- echo "==> Creating the Sphinx working directory: $sphinx_dir"
- mkdir -m 755 $sphinx_dir || exit 1
- fi
-
- # Create and set ownership of the Sphinx data directory
- if [ -d $sphinx_dir/data ]; then
- echo "==> Using pre-existing directory $sphinx_dir/data"
- else
- echo "==> Creating the Sphinx data directory: $sphinx_dir/data"
- mkdir -m 755 $sphinx_dir/data || exit 1
- fi
-
- echo "===> Adjusting file ownership in $sphinx_dir"
- chown -R $sphinx_usr:$sphinx_grp $sphinx_dir || exit 1
- ;;
-esac
-
-#
-# That's All Folks!
-#
diff --git a/textproc/sphinxsearch/files/sphinxsearch.sh.in b/textproc/sphinxsearch/files/sphinxsearch.sh.in
index db956fd480b0..838692f33033 100644
--- a/textproc/sphinxsearch/files/sphinxsearch.sh.in
+++ b/textproc/sphinxsearch/files/sphinxsearch.sh.in
@@ -24,6 +24,9 @@
# -- group to run searchd as
# %%PORTNAME%%_logdir="%%SPHINX_LOG%%"
# -- directory searchd writes logs to
+# %%PORTNAME%%_dir="%%SPHINX_DIR%%"
+# -- working directory used by searchd et al:
+# must match setting in ${%%PORTNAME%%_conffile}
#
. /etc/rc.subr
@@ -38,6 +41,7 @@ load_rc_config ${name}
: ${%%PORTNAME%%_user="%%SPHINX_USR%%"}
: ${%%PORTNAME%%_group="%%SPHINX_GRP%%"}
: ${%%PORTNAME%%_logdir="%%SPHINX_LOG%%"}
+: ${%%PORTNAME%%_dir="%%SPHINX_DIR%%"}
command=%%PREFIX%%/sbin/searchd
pidfile=${%%PORTNAME%%_pidfile}
@@ -56,6 +60,11 @@ start_precmd=%%PORTNAME%%_prestart
chown -R ${%%PORTNAME%%_user}:${%%PORTNAME%%_group} \
${%%PORTNAME%%_logdir}
fi
+ if [ ! -d ${%%PORTNAME%%_dir} ]; then
+ mkdir -m 755 -p ${%%PORTNAME%%_dir} ${%%PORTNAME%%_dir}/data
+ chown -R ${%%PORTNAME%%_user}:${%%PORTNAME%%_group} \
+ ${%%PORTNAME%%_dir}
+ fi
}
case "${%%PORTNAME%%_flags}" in
diff --git a/textproc/sphinxsearch/pkg-message b/textproc/sphinxsearch/pkg-message
new file mode 100644
index 000000000000..23caf7201a5d
--- /dev/null
+++ b/textproc/sphinxsearch/pkg-message
@@ -0,0 +1,17 @@
+
+ Note: for people upgrading from earlier versions to sphinx-0.9.9
+ ================================================================
+
+ Please be aware that sphinx now uses these IANA[1] sanctioned port
+ numbers by default:
+
+ sphinxql 9306/tcp Sphinx search server (MySQL listener)
+ # Andrew Aksyonoff <shodan&sphinxsearch.com> 20 October 2009
+
+ sphinxapi 9312/tcp Sphinx search server
+ # Andrew Aksyonoff <shodan&sphinxsearch.com> 20 October 2009
+
+ This is a change from the port numbers used by default in earlier
+ versions.
+
+ [1] http://www.iana.org/assignments/port-numbers