Sphinx Storage Engine in MySQL via FreeBSD Ports

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
系統:FreeBSD 7.1-RELEASE
MySQL:5.1.30
Sphinx:0.9.8.1
 
mysql51-server.diff
diff -Nur /usr/ports/databases/mysql51-server/Makefile mysql51-server/Makefile
— /usr/ports/databases/mysql51-server/Makefile    2008-07-27 09:56:19.000000000 +0100
+++ mysql51-server/Makefile    2008-08-06 16:20:51.000000000 +0100
@@ -60,6 +60,16 @@
CONFIGURE_ARGS+=–with-collation=${WITH_COLLATION}
.endif
 
+# Sphinx Engine
+.if defined(WITH_SPHINXSE)
+SPHINX_PORT?=  textproc/sphinxsearch
+SPHINX_WRKSRC= cd ${PORTSDIR}/${SPHINX_PORT} && ${MAKE} -V WRKSRC
+
+EXTRACT_DEPENDS+=    ${NONEXISTENT}:${PORTSDIR}/${SPHINX_PORT}:extract
+RUN_DEPENDS+=        searchd:${PORTSDIR}/${SPHINX_PORT}
+USE_AUTOTOOLS+=        autoconf:262 automake:110
+.endif
+
.include
 
.if ${ARCH} == “i386″
@@ -124,8 +134,14 @@
@${ECHO} “    BUILD_STATIC=yes    Build a static version of mysqld.@${ECHO}(use it if you need even more speed).@${ECHO} “    WITH_NDB=yes        Enable support for NDB Cluster.+    @${ECHO} “    WITH_SPHINXSE=yes    Enable support for Sphinx Storage Engine.@${ECHO} “”
 
+.if defined(WITH_SPHINXSE)
+pre-patch:
+    ${CP} -pr $$( ${SPHINX_WRKSRC} )/mysqlse/ ${WRKSRC}/storage/sphinx
+.endif
+
post-patch:
@${REINPLACE_CMD} -e “s|SUBDIRS =|SUBDIRS = include @docs_dirs@ sql-common @sql_server_dirs@ storage scripts @sql_server@ @man_dirs@ support-files|g”
 
${WRKSRC}/Makefile.in
@${REINPLACE_CMD} -e “s|bin_SCRIPTS =|bin_SCRIPTS = @server_scripts@|g” ${WRKSRC}/scripts/Makefile.in
 
# cd /usr/ports/databases/mysql51-server
# patch -p0 < mysql51-server.diff
# echo WITH_SPHINXSE=yes >> /etc/make.conf
# make install clean

參考資料:http://www.infracaninophile.co.uk/articles/sphinxse.html

原文 http://gis.iwant-in.net/blog/?p=103

发表评论

电子邮件地址不会被公开。 必填项已用*标注