2004-10-14 10:56:13 +02:00
|
|
|
# New ports collection makefile for: dpsearch
|
|
|
|
# Date created: 14.06.2004
|
|
|
|
# Whom: Maxim Zakharov <maxime@sochi.net.ru>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= dpsearch
|
2004-11-05 14:02:21 +01:00
|
|
|
PORTVERSION= 4.26
|
2004-10-14 10:56:13 +02:00
|
|
|
CATEGORIES= www
|
2004-11-05 14:02:21 +01:00
|
|
|
MASTER_SITES= http://www.dataparksearch.org/ \
|
|
|
|
http://dataparksearch.h0t.de/
|
2004-10-14 10:56:13 +02:00
|
|
|
|
|
|
|
MAINTAINER= ports@FreeBSD.org
|
|
|
|
COMMENT= Open source search engine for Internet and Intranet sites
|
|
|
|
|
|
|
|
#RUN_DEPENDS+= ${APXS}:${PORTSDIR}/${APACHE_PORT}
|
|
|
|
|
2004-11-04 18:21:35 +01:00
|
|
|
INSTALLS_SHLIB= yes
|
2004-10-14 10:56:13 +02:00
|
|
|
USE_GMAKE= yes
|
|
|
|
GNU_CONFIGURE= yes
|
2004-11-04 18:21:35 +01:00
|
|
|
USE_LIBTOOL_VER=13
|
|
|
|
DOCSDIR= ${PREFIX}/share/doc/dataparksearch
|
2004-10-14 10:56:13 +02:00
|
|
|
CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
|
|
|
|
CONFIGURE_ARGS+=--sysconfdir=${PREFIX}/etc/dpsearch \
|
|
|
|
--localstatedir=/var/dpsearch \
|
|
|
|
--enable-mp3 \
|
|
|
|
--with-zlib
|
|
|
|
|
2004-11-04 18:21:35 +01:00
|
|
|
OPTIONS= DPSEARCH_THREADS "Enable pthreads" on \
|
2004-10-14 10:56:13 +02:00
|
|
|
DPSEARCH_SSL "Enable SSL" on \
|
|
|
|
DPSEARCH_GUESSER "Enable charset and language guesser" on \
|
|
|
|
DPSEARCH_CHARSETS "Enable all charsets" off \
|
|
|
|
DPSEATCH_CHINESE "Enable chinese charsets" off \
|
|
|
|
DPSEARCH_JAPANESE "Enable japanese charsets" off \
|
|
|
|
DPSEARCH_MECAB "Enable MeCab japanese analyzer" off \
|
|
|
|
DPSEARCH_CHASEN "Enable ChaSen japanese analyzer" off \
|
|
|
|
DPSEARCH_APACHE "Enable mod_dpsearch for Apache" off \
|
|
|
|
DPSEARCH_IDN "Enable Internationalized Domain Names" off \
|
2004-11-04 18:21:35 +01:00
|
|
|
DPSEARCH_PGSQL "Use PGSQL (mutually exclusive)" off \
|
|
|
|
DPSEARCH_MYSQL "Use MySQL (mutually exclusive)" on \
|
2004-10-14 10:56:13 +02:00
|
|
|
DPSEARCH_SQLITE "Use SQLite (mutually exclusive)" off \
|
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2004-11-04 18:21:35 +01:00
|
|
|
CONFIGURE_ENV+= PORTNAME="${PORTNAME}"
|
2004-10-14 10:56:13 +02:00
|
|
|
|
|
|
|
.if !defined(WITHOUT_DPSEARCH_THREADS)
|
2004-11-04 18:21:35 +01:00
|
|
|
CONFIGURE_ARGS+=--enable-pthreads
|
|
|
|
CFLAGS+= ${PTHREAD_CFLAGS}
|
2004-10-14 10:56:13 +02:00
|
|
|
CONFIGURE_ENV+= LIBS="${PTHREAD_LIBS}"
|
|
|
|
.else
|
2004-11-04 18:21:35 +01:00
|
|
|
CONFIGURE_ARGS+=--disable-pthreads
|
2004-10-14 10:56:13 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !defined(NO_OPENSSL) && !defined(WITHOUT_DPSEARCH_SSL)
|
2004-11-04 18:21:35 +01:00
|
|
|
WITH_OPENSSL= yes
|
2004-10-14 10:56:13 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.ifdef WITH_OPENSSL
|
2004-11-04 18:21:35 +01:00
|
|
|
CONFIGURE_ARGS+=--with-openssl=${OPENSSLBASE}
|
2004-10-14 10:56:13 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_DPSEARCH_GUESSER)
|
2004-11-04 18:21:35 +01:00
|
|
|
CONFIGURE_ARGS+=--enable-charset-guesser
|
2004-10-14 10:56:13 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_DPSEARCH_CHASRETS)
|
2004-11-04 18:21:35 +01:00
|
|
|
CONFIGURE_ARGS+=--with-extra-charsets=all
|
2004-10-14 10:56:13 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_DPSEARCH_CHINESE)
|
2004-11-04 18:21:35 +01:00
|
|
|
CONFIGURE_ARGS+=--with-extra-charsets=chinese
|
2004-10-14 10:56:13 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_DPSEARCH_JAPANESE)
|
2004-11-04 18:21:35 +01:00
|
|
|
CONFIGURE_ARGS+=--with-extra-charsets=japanese
|
2004-10-14 10:56:13 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_DPSEARCH_MECAB)
|
2004-11-04 18:21:35 +01:00
|
|
|
LIB_DEPEND+= mecab.0:${PORTSDIR}/japanese/mecab
|
|
|
|
CONFIGURE_ARGS+=--enable-mecab
|
2004-10-14 10:56:13 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_DPSEARCH_CHASEN)
|
2004-11-04 18:21:35 +01:00
|
|
|
LIB_DEPEND+= chasen.0:${PORTSDIR}/japanese/chasen
|
|
|
|
CONFIGURE_ARGS+=--enable-chasen
|
2004-10-14 10:56:13 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_DPSEARCH_IDN)
|
2004-11-04 18:21:35 +01:00
|
|
|
LIB_DEPEND+= idn.16:${PORTSDIR}/devel/libidn
|
|
|
|
CONFIGURE_ARGS+=--enable-idn
|
2004-10-14 10:56:13 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_DPSEARCH_APACHE)
|
|
|
|
.if defined (WITH_APACHE2)
|
2004-11-04 18:21:35 +01:00
|
|
|
BUILD_DEPEND+= ${LOCALBASE}/sbin/httpd:${PORTSDIR}/www/apache2
|
2004-10-14 10:56:13 +02:00
|
|
|
.else
|
2004-11-04 18:21:35 +01:00
|
|
|
BUILD_DEPEND+= ${LOCALBASE}/sbin/httpd:${PORTSDIR}/www/apache13
|
|
|
|
.endif
|
|
|
|
CONFIGURE_ARGS+=--enable-apache-module
|
2004-10-14 10:56:13 +02:00
|
|
|
.endif
|
2004-11-04 18:21:35 +01:00
|
|
|
|
|
|
|
.if !defined(WITH_DPSEARCH_PGSQL) && !defined(WITH_DPSEARCH_MYSQL) && !defined(WITH_DPSEARCH_SQLITE)
|
|
|
|
WITH_DPSEARCH_MYSQL=yes
|
|
|
|
pre-fetch:
|
|
|
|
@${ECHO}
|
|
|
|
@${ECHO} "Choose MySQL by default."
|
|
|
|
@${ECHO}
|
2004-10-14 10:56:13 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_DPSEARCH_PGSQL)
|
|
|
|
POSTGRESQL_PORT?= databases/postgresql7
|
|
|
|
LIB_DEPENDS+= pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
|
|
|
|
CONFIGURE_ARGS+= --with-pgsql=${LOCALBASE}
|
|
|
|
|
|
|
|
.elif defined(WITH_DPSEARCH_MYSQL)
|
2004-11-04 18:21:35 +01:00
|
|
|
USE_MYSQL= yes
|
2004-10-14 10:56:13 +02:00
|
|
|
CONFIGURE_ARGS+= --with-mysql=${LOCALBASE}
|
|
|
|
|
|
|
|
.elif defined(WITH_DPSEARCH_SQLITE)
|
2004-11-04 18:21:35 +01:00
|
|
|
LIB_DEPEND+= sqlite.2:${PORTSDIR}/databases/sqlite
|
|
|
|
CONFIGURE_ARGS+= --with-sqlite=${LOCALBASE}
|
2004-10-14 10:56:13 +02:00
|
|
|
|
|
|
|
.endif
|
|
|
|
|
|
|
|
pre-install:
|
2004-11-04 18:21:35 +01:00
|
|
|
@${MKDIR} ${DATADIR}
|
2004-10-14 10:56:13 +02:00
|
|
|
|
|
|
|
post-install:
|
|
|
|
${CHMOD} 700 /var/dpsearch/cache
|
|
|
|
${CHOWN} -R www:www /var/dpsearch/
|
|
|
|
@${ECHO}
|
|
|
|
@${CAT} ${PKGMESSAGE}
|
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|