ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/mports/trunk/textproc/sphinxsearch/Makefile
Revision: 11296
Committed: Sat May 28 21:58:51 2011 UTC (12 years, 11 months ago) by laffer1
File size: 4955 byte(s)
Log Message:
add new port,  sphinxsearch 0.99

File Contents

# Content
1 # $MidnightBSD$
2 # $FreeBSD: ports/textproc/sphinxsearch/Makefile,v 1.15 2011/03/19 13:15:30 ale Exp $
3 #
4 # Note: the Sphinx Storage Engine MySQL plugin is not supported by
5 # this port. You need a patched version of mysql server for that.
6 # See http://www.infracaninophile.co.uk/articles/sphinxse.html
7
8 PORTNAME= sphinxsearch
9 PORTVERSION= 0.9.9
10 CATEGORIES= textproc databases
11 MASTER_SITES= http://sphinxsearch.com/files/
12 DISTNAME= sphinx-${PORTVERSION}
13
14 MAINTAINER= ports@MidnightBSD.org
15 COMMENT= Sphinx Full-Text Search Engine
16 LICENSE= gpl2
17
18 LIB_DEPENDS= expat.6:${PORTSDIR}/textproc/expat2
19
20 OPTIONS= MYSQL "MySQL support" on \
21 PGSQL "PostgreSQL support" off \
22 ICONV "Iconv support" on \
23 OPTIMIZED_CFLAGS "Use compiler optimization (-O3)" off \
24 ID64 "use 64-bit document and word IDs" off \
25 UNIXODBC "unixODBC support" off
26
27 ## FFR
28 ## LIBSTEMMER "compile with libstemmer support" off
29
30 CONFLICTS= sphinxsearch-devel-[0-9]*
31
32 .include <bsd.mport.options.mk>
33
34 # The port will successfully compile with both PGSQL and MYSQL support
35 # simultaneously. Not sure how useful that is in practice though.
36
37 .if defined(WITH_MYSQL) && !defined(WITHOUT_MYSQL)
38 CONFIGURE_ARGS+= --with-mysql
39 USE_MYSQL= yes
40 .else
41 CONFIGURE_ARGS+= --without-mysql
42 .endif
43
44 .if defined(WITH_PGSQL) && !defined(WITHOUT_PGSQL)
45 CONFIGURE_ARGS+= --with-pgsql
46 USE_PGSQL= yes
47 .else
48 CONFIGURE_ARGS+= --without-pgsql
49 .endif
50
51 .if defined(WITH_ICONV) && !defined(WITHOUT_ICONV)
52 CONFIGURE_ARGS+= --with-iconv
53 USE_ICONV= yes
54 .else
55 CONFIGURE_ARGS+= --without-iconv
56 .endif
57
58 .if defined(WITH_OPTIMIZED_CFLAGS)
59 CXXFLAGS+= -O3 -fomit-frame-pointer
60 .endif
61
62 # Changes document and word IDs to a 64bit type, useful if you have
63 # more than about 4.2E9 such items to deal with. Means corresponding
64 # changes in DB schema. Disabled by default.
65 .if defined(WITH_ID64)
66 CONFIGURE_ARGS+= --enable-id64
67 .endif
68
69 .if defined(WITH_UNIXODBC)
70 CONFIGURE_ARGS+= --with-unixodbc
71 LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC
72 .else
73 CONFIGURE_ARGS+= --without-unixodbc
74 .endif
75
76 ## FFR. The snowball project doesn't release numbered versions of it's
77 ## pre-processors. Instead, at arbitrary intervals a snapshot of their
78 ## source repository is turned into a tarball (always the same filename)
79 ## and placed on their web site. It's like they want to make it as hard
80 ## as possible for anyone to package and use their software.
81 ##
82 ## # Adds support for two additional word stemmming pre-processors from
83 ## # the Snowball project (http://snowball.tartarus.org/) -- these
84 ## # essentially do exactly the same thing as the built in English and
85 ## # Russian stemmers but are slightly slower and may produce subtly
86 ## # different output. Disabled by default.
87 ## .if defined(WITH_LIBSTEMMER) && !defined(WITHOUT_LIBSTEMMER)
88 ## CONFIGURE_ARGS+= --with-libstemmer
89 ## .else
90 ## CONFIGURE_ARGS+= --without-libstemmer
91 ## .endif
92
93 USERS?= _sphinx
94 GROUPS?= _sphinx
95
96 SPHINX_DIR?= /var/db/${PORTNAME}
97 SPHINX_RUN?= /var/run/${PORTNAME}
98 SPHINX_LOG?= /var/log/${PORTNAME}
99
100 # Yes, the conflation of CPPFLAGS and CXXFLAGS is deliberate. No,
101 # don't ask.
102
103 GNU_CONFIGURE= yes
104 CONFIGURE_ENV+= CC=${CC} CPPFLAGS="${CXXFLAGS}"
105 CFGFILE= ${PREFIX}/etc/sphinx.conf
106 USE_RC_SUBR= sphinxsearch.sh
107 SUB_LIST+= PORTNAME=${PORTNAME} \
108 CFGFILE=${CFGFILE} \
109 SPHINX_USR=${USERS} \
110 SPHINX_GRP=${GROUPS} \
111 SPHINX_DIR=${SPHINX_DIR} \
112 SPHINX_RUN=${SPHINX_RUN} \
113 SPHINX_LOG=${SPHINX_LOG}
114 SUB_FILES+= pkg-deinstall
115
116 .if !defined(NOPORTEXAMPLES)
117 EXAMPLES= example.sql api
118 PORTEXAMPLES= *
119 .endif
120
121 .if !defined(NOPORTDOCS)
122 DOCS= doc/sphinx.css doc/sphinx.html doc/sphinx.txt doc/sphinx.xml
123 .endif
124
125 # Fix up the sample configuration file to correspond to FreeBSD norms
126
127 post-patch:
128 @${REINPLACE_CMD} \
129 -e "s!@CONFDIR@/log/searchd.pid!${SPHINX_RUN}/searchd.pid!" \
130 -e "s!@CONFDIR@/log/query.log!${SPHINX_LOG}/sphinx-query.log!" \
131 -e "s!@CONFDIR@/log/searchd.log!${SPHINX_LOG}/searchd.log!" \
132 -e "s!@CONFDIR@!${SPHINX_DIR}!" \
133 ${WRKSRC}/sphinx.conf.in
134
135 do-install: install-bin install-docs install-examples
136
137 install-bin:
138 ${INSTALL_PROGRAM} ${WRKSRC}/src/indexer ${PREFIX}/bin/indexer
139 ${INSTALL_PROGRAM} ${WRKSRC}/src/search ${PREFIX}/bin/search
140 ${INSTALL_PROGRAM} ${WRKSRC}/src/spelldump ${PREFIX}/bin/spelldump
141 ${INSTALL_PROGRAM} ${WRKSRC}/src/searchd ${PREFIX}/sbin/searchd
142 ${INSTALL_DATA} ${WRKSRC}/sphinx.conf.dist ${CFGFILE}.sample
143
144 install-docs:
145 .if !defined(NOPORTDOCS)
146 @${MKDIR} ${DOCSDIR}
147 .for doc in ${DOCS}
148 ${INSTALL_DATA} ${WRKSRC}/${doc} ${DOCSDIR}
149 .endfor
150 .endif
151
152 install-examples:
153 .if !defined(NOPORTEXAMPLES)
154 @${MKDIR} ${EXAMPLESDIR}
155 .for example in ${EXAMPLES}
156 @cd ${WRKSRC} && ${COPYTREE_SHARE} ${example} ${EXAMPLESDIR}
157 .endfor
158 .endif
159
160 post-install-cfg:
161 @if [ ! -f ${CFGFILE} ]; then \
162 ${CP} -p ${CFGFILE}.sample ${CFGFILE} ; \
163 fi
164
165 .include <bsd.port.mk>

Properties

Name Value
cvs2svn:cvs-rev 1.1