summaryrefslogtreecommitdiff
path: root/security/cyrus-saslauthd/Makefile
blob: 952f922801960aad909570da15a423a1a2bb0db8 (plain)
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
# $NetBSD: Makefile,v 1.45 2013/02/06 23:23:35 jperkin Exp $

PKGNAME=	${DISTNAME:S/sasl/saslauthd/}
PKGREVISION=	1
CONFLICTS+=	cyrus-sasl<2.1.15nb2

PKG_INSTALLATION_TYPES=	overwrite pkgviews

.include "../../security/cyrus-sasl/Makefile.common"

COMMENT=		Cyrus SASL plaintext authentication daemon

CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFDIR:Q}

BUILD_TARGET=		all saslcache

SASLSOCKETDIR?=		${VARBASE}/run/saslauthd
BUILD_DEFS+=		SASLSOCKETDIR
FILES_SUBST+=		SASLSOCKETDIR=${SASLSOCKETDIR:Q}
CONFIGURE_ARGS+=	--with-saslauthd=${SASLSOCKETDIR:Q}
CONFIGURE_ARGS+=	--with-openssl=${SSLBASE:Q}

BUILD_DIRS=		saslauthd

.include "options.mk"

RCD_SCRIPTS=		saslauthd
FILES_SUBST+=		ROOT_USER=${REAL_ROOT_USER:Q}

INSTALLATION_DIRS=	bin

.include "../../security/openssl/buildlink3.mk"

SUBST_CLASSES+=		sysconf
SUBST_MESSAGE.sysconf=	Fixing path to ${PKG_SYSCONFDIR}
SUBST_STAGE.sysconf=	post-build
SUBST_FILES.sysconf=	saslauthd/LDAP_SASLAUTHD saslauthd/saslauthd.mdoc
SUBST_SED.sysconf=	-e "s,/usr/local/etc/,${PKG_SYSCONFDIR}/,g"

post-install:
	for f in saslcache ; do				\
		${INSTALL_PROGRAM} ${WRKSRC}/saslauthd/$$f \
			${DESTDIR}${PREFIX}/bin/$$f;	\
	done
.if !empty(PKG_OPTIONS:Mldap)
	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/doc/cyrus-saslauthd
	${INSTALL_DATA} ${WRKSRC}/saslauthd/LDAP_SASLAUTHD		\
		${DESTDIR}${PREFIX}/share/doc/cyrus-saslauthd
.endif

.include "../../mk/bsd.pkg.mk"