summaryrefslogtreecommitdiff
path: root/www/mod_auth_mysql/Makefile
blob: 88f54a4e2430bf17af1be11a743d1fe61e12722a (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
# New ports collection makefile for:    apache mod_auth_mysql
# Date created:		2000/05/19
# Whom:			jim@thehouselys.net
#
# $FreeBSD$

PORTNAME=	mod_auth_mysql
PORTVERSION=	2.20
PORTREVISION=	2
CATEGORIES=	www
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=	mod-auth-mysql

MAINTAINER=	jeh@FreeBSD.org
COMMENT=	Allows users to use MySQL databases for user authentication

BUILD_DEPENDS=	${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/${AP_PORT}
RUN_DEPENDS=	${LOCALBASE}/sbin/${AP_TARGET}:${PORTSDIR}/www/${AP_PORT}

USE_MYSQL=	yes

.include <bsd.port.pre.mk>

APXS=		${LOCALBASE}/sbin/apxs

AP_PORT?=	apache13
.if exists(${APXS})
APXS_WORKS!=	${APXS} -q TARGET 2>/dev/null || echo no
.endif
.if exists(${APXS}) && ${APXS_WORKS} != no
AP_TARGET!=	${APXS} -q TARGET
AP_SYSCONF!=	${APXS} -q SYSCONFDIR
AP_INCLUDE!=	${APXS} -q INCLUDEDIR
AP_LIBEXEC!=	${APXS} -q LIBEXECDIR
.else
AP_TARGET?=	httpd
AP_SYSCONF?=	${PREFIX}/etc/apache
AP_INCLUDE?=	${PREFIX}/include/apache
AP_LIBEXEC?=	${PREFIX}/libexec/apache
.endif

AUTH_MYSQL_DOCS=	apache/manual/mod/mod_auth_mysql

PLIST_SUB=	AUTH_MYSQL_DOCS="${AUTH_MYSQL_DOCS}"

PKGMESSAGE=	${WRKSRC}/.install_notes

HAS_CONFIGURE=	yes
CONFIGURE_ARGS=	--with-mysql=${PREFIX} \
		--with-apxs=${APXS}

post-install:
.if !defined(NOPORTDOCS)
	@${MKDIR} ${PREFIX}/share/doc/${AUTH_MYSQL_DOCS}
	@${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/${AUTH_MYSQL_DOCS}
	@${INSTALL_DATA} ${WRKSRC}/USAGE ${PREFIX}/share/doc/${AUTH_MYSQL_DOCS}
	@@(cd ${PREFIX}/share/doc && ${LN} -sf ${AUTH_MYSQL_DOCS} mod_auth_mysql)
.endif

.include <bsd.port.post.mk>