aboutsummaryrefslogtreecommitdiffstats
path: root/www/mnogosearch/Makefile
blob: 4a7340139963b26e30e415e6d34af5c95290212d (plain) (blame)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# New ports collection makefile for:    mnogosearch
# Date created:         27.01.2001
# Whom:                 ache
#
# $FreeBSD$
#

PORTNAME=   mnogosearch
PORTVERSION=    3.3.11
CATEGORIES= www databases
MASTER_SITES=   http://www.mnogosearch.org/Download/ \
        http://www.bayofrum.net/dist/${PORTNAME}/

MAINTAINER= utisoft@gmail.com
COMMENT=    Full featured SQL-based hypertext search engine

MAN1=       indexer.1
MAN5=       indexer.conf.5

OPTIONS=    THREADS "Enable pthreads"       on  \
        SSL     "Enable SSL"            on  \
        ASIAN   "Enable asian charsets" off \
        SYSLOG  "Send logs to syslog"   on  \
        PGSQL   "Use PGSQL"             off \
        MSQL    "Use MSQL"              off \
        MYSQL   "Use MySQL"             off \
        SQLITE  "Use SQLite 2.x"        off \
        SQLITE3 "Use SQLite 3.x"        on

USE_LDCONFIG=   yes
USE_GNOME=  lthack
USE_GMAKE=  yes
USE_AUTOTOOLS=  libtool
CONFIGURE_ARGS+=--enable-shared \
        --sysconfdir=${ETCDIR} \
        --localstatedir=/var/mnogosearch \
        --datadir=${DATADIR}
CONFIGURE_ENV+= LOCALBASE="${LOCALBASE}"
MAKE_ENV+=  MKDIRPROG="${MKDIR}"

PLIST_SUB+= SHLIB_VER=${SHLIB_VER}
SHLIB_VER=  1

SUB_FILES+= pkg-message

.include <bsd.port.options.mk>

.if defined(WITH_SSL)
USE_OPENSSL=    yes
.endif

.ifdef WITHOUT_THREADS
CONFIGURE_ARGS+=    --disable-pthreads
CFLAGS+=    -DCONSOLE
.else
CONFIGURE_ARGS+=    --enable-pthreads
CFLAGS+=    ${PTHREAD_CFLAGS}
CONFIGURE_ENV+= LIBS="${PTHREAD_LIBS}"
.endif

.if !defined(WITHOUT_SSL)
CONFIGURE_ARGS+=    --with-openssl=${OPENSSLBASE}
.endif

.ifdef WITH_ASIAN
CONFIGURE_ARGS+=    --with-extra-charsets=all
.endif

.ifdef WITHOUT_SYSLOG
CONFIGURE_ARGS+=    --disable-syslog
.endif

.ifdef WITH_PGSQL
USE_PGSQL=      yes
CONFIGURE_ARGS+=    --with-pgsql=${LOCALBASE}
.endif

.ifdef WITH_MSQL
LIB_DEPENDS+=       msql.1:${PORTSDIR}/databases/msql
CONFIGURE_ARGS+=    --with-msql=${LOCALBASE}
.endif

.ifdef WITH_MYSQL
USE_MYSQL=  yes
CONFIGURE_ARGS+=    --with-mysql=${LOCALBASE}
.endif

.ifdef WITH_SQLITE
USE_SQLITE= 2
CONFIGURE_ARGS+=    --with-sqlite=${LOCALBASE}
.endif

.ifndef WITHOUT_SQLITE3
USE_SQLITE= 3
CONFIGURE_ARGS+=    --with-sqlite3=${LOCALBASE}
.endif

.if defined(WITHOUT_SQLITE) && !defined(WITH_MYSQL) && \
    !defined(WITH_MSQL) && !defined(WITH_PGSQL) && !defined(WITH_SQLITE3)
IGNORE= needs at least one database driver
.endif

DOCS=       ChangeLog INSTALL
PORTDOCS=   *
PORTEXAMPLES=   README *.conf

post-patch:
.if !defined (NOPORTDOCS)
    @${REINPLACE_CMD} -e 's#$$(DESTDIR)$$(prefix)/doc#${DOCSDIR}#' \
        ${WRKSRC}/Makefile.in ${WRKSRC}/doc/Makefile.in
.else
    @${REINPLACE_CMD} -e \
        's#^SUBDIRS = include src doc#SUBDIRS = include src#' \
        ${WRKSRC}/Makefile.in
.endif

pre-install-su:
    @${MKDIR} ${DATADIR}/

post-install:
    ${LN} -sf libmnogosearch.so \
        ${PREFIX}/lib/libmnogosearch-${PORTVERSION:R}.so.${SHLIB_VER}
    ${CHOWN} -R ${WWWOWN}:${WWWGRP} /var/mnogosearch
.if !defined (NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}/
.    for f in ${DOCS}
    ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}/
.    endfor
.endif
.if !defined(NOPORTEXAMPLES)
    ${MKDIR} ${EXAMPLESDIR}/
    ${INSTALL_DATA} ${WRKSRC}/doc/samples/* ${EXAMPLESDIR}/
.endif
    @${ECHO}
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>