aboutsummaryrefslogtreecommitdiffstats
path: root/misc/libhome/Makefile
blob: 9b9b963bc7222ce1a5ded0c83ad0b9a7b3ba50e6 (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
# New ports collection makefile for:    libhome
# Date created:             Fri Aug 14 2003
# Whom:                 Xavier Beaudouin <kiwi@oav.net>
#
# $FreeBSD$
#

PORTNAME=   libhome
PORTVERSION=    0.10.2
PORTREVISION=   2
CATEGORIES= misc
MASTER_SITES=   ftp://ftp.oav.net/pll/ SF/pll/${PORTNAME}/${PORTVERSION}

MAINTAINER= kiwi@oav.net
COMMENT=    Library providing a getpwname() emulation

OPTIONS+=   LDAP "Support for LDAP queries" on
OPTIONS+=   MYSQL "Support for MySQL queries" on
OPTIONS+=   BDB "Support for Berkeley DB" on
OPTIONS+=   PAM "Support for PAM (Experimental)" off
OPTIONS+=   PGSQL "Support for PostgreSQL (Experimental)" off

GNU_CONFIGURE=  yes
USE_GNOME=  gnometarget
USE_LDCONFIG=   yes

.include <bsd.port.pre.mk>

.if defined(LIBHOME_WITH_BDB_VER)
WITH_BDB_VER=   ${LIBHOME_WITH_BDB_VER}
.endif

CONFIGURE_ARGS+=    --with-proxy --with-nss

.if !defined(WITHOUT_LDAP)
USE_OPENLDAP=   yes
CONFIGURE_ARGS+=    --with-ldap=${LOCALBASE}/include
.else
CONFIGURE_ARGS+=    --without-ldap
.endif

.if !defined(WITHOUT_MYSQL)
USE_MYSQL=  yes
CONFIGURE_ARGS+=    --with-mysql=${LOCALBASE}/include/mysql
.else
CONFIGURE_ARGS+=    --without-mysql
.endif

.if defined(WITH_DB3) || defined(WITH_DB4)
WITH_BDB=       yes
OBSOLETE_BDB_VAR=   WITH_DB3 WITH_DB4
IGNORE= Use 'make config' to select Berkeley DB.
.endif

.if defined(WITH_BDB)
USE_BDB=        yes
INVALID_BDB_VER=    2
. if defined(WITH_BDB_VER) && ${WITH_BDB_VER} == 3
CONFIGURE_ARGS+=    --with-db3=${BDB_INCLUDE_DIR} --without-db4
. else
CONFIGURE_ARGS+=    --without-db3 --with-db4=${BDB_INCLUDE_DIR}
. endif
CONFIGURE_ARGS+=    --with-db-libdir=${BDB_LIB_DIR}
.else
CONFIGURE_ARGS+=    --without-db3 --without-db4
.endif

.if defined(WITH_PAM)
CONFIGURE_ARGS+=    --with-pam
.else
CONFIGURE_ARGS+=    --without-pam
.endif

.if defined(WITH_PGSQL)
CONFIGURE_ARGS+=    --with-pgsql
USE_PGSQL=  YES
.else
CONFIGURE_ARGS+=    --without-pgsql
.endif

MAN5=       home.conf.5
MAN8=       home_proxy.8

post-patch:
    @${REINPLACE_CMD} -e 's|echo aout|echo elf|' ${WRKSRC}/ltconfig ${WRKSRC}/configure
.if defined(WITH_BDB)
    @${REINPLACE_CMD} -e 's;db-4.3 db-4.2;${BDB_LIB_NAME};g' \
        ${WRKSRC}/configure
.endif

post-install:
    ${INSTALL_DATA} ${WRKSRC}/home.conf ${PREFIX}/etc/home.conf.dist
    ${INSTALL_SCRIPT} ${WRKSRC}/rc/freebsd/home_proxy.sh ${PREFIX}/etc/rc.d/home_proxy.sh

.include <bsd.port.post.mk>