aboutsummaryrefslogtreecommitdiffstats
path: root/www/udmsearch/Makefile
blob: f1b57ccd32b3e2cd5e713801e82b6d4dd396e035 (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
# New ports collection makefile for:    udmsearch
# Version required: 2.1.7
# Date created:     11/05/1999
# Whom:         Kelly Yancey <kbyanc@posi.net>
#
# $FreeBSD$
#

DISTNAME=       udmsearch-2.1.7
CATEGORIES=     www databases
MASTER_SITES=       http://mysearch.udm.net/Download/   \
            ftp://ftp.izhcom.ru/pub/unix/UdmSearch/ \
            http://mirror.kuenzler.ch/udmsearch/Download/

MAINTAINER=     kbyanc@posi.net

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

WRKSRC=         ${WRKDIR}/udmsearch-2.1.7a
USE_GMAKE=      yes
GNU_CONFIGURE=      yes
CONFIGURE_ARGS=     --bindir=${PREFIX}/bin/udmsearch \
            --sysconfdir=${PREFIX}/etc/udmsearch

.if defined(USE_POSTGRESQL)
LIB_DEPENDS=        pq.2:${PORTSDIR}/databases/postgresql
CONFIGURE_ARGS+=    --with-pgsql

.elif defined(USE_MSQL)
BUILD_DEPENDS=      ${PREFIX}/lib/libmsql.a:${PORTSDIR}/databases/msql
CONFIGURE_ARGS+=    --with-msql

.else
# default to mysql

LIB_DEPENDS=        mysqlclient.6:${PORTSDIR}/databases/mysql322-client
CONFIGURE_ARGS+=    --with-mysql

.if !defined(USE_MYSQL)
pre-fetch:
    @${ECHO}
    @${ECHO} "Defaulting to udmsearch with mysql support."
    @${ECHO}
    @${ECHO} "You may alternately build udmsearch with either msql or"
    @${ECHO} "postgresql support by invoking make with USE_MSQL=yes or"
    @${ECHO} "USE_POSTGRESQL=yes respectively."
    @${ECHO}
.endif

.endif

pre-install:
    ${MKDIR} ${PREFIX}/bin/udmsearch
    ${MKDIR} ${PREFIX}/etc/udmsearch

post-install:
    @cp -R ${WRKSRC}/create ${PREFIX}/etc/udmsearch
    @strip ${PREFIX}/sbin/indexer
    @strip ${PREFIX}/bin/udmsearch/search.cgi
    @${ECHO}
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>