aboutsummaryrefslogtreecommitdiff
path: root/www/mod_auth_pgsql/Makefile
blob: cf41b9e6c33f226880735520ae4aa3fe57cc8ea9 (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
# New ports collection makefile for:    apache mod_auth_pgsql
# Date created:		2000/11/10
# Whom:			Mikhail Teterin <mi@aldan.algebra.com>
#
# $FreeBSD$

PORTNAME=	mod_auth_pgsql
PORTVERSION=	0.9.12
CATEGORIES=	www
MASTER_SITES=	http://www.giuseppetanzilli.it/mod_auth_pgsql/dist/

MAINTAINER=	ports@freebsd.org

PORTCOMMENT=	Allows users to use PostgreSQL databases for user authentication

BUILD_DEPENDS=	${APXS}:${APACHE_PORT}
RUN_DEPENDS=	${LOCALBASE}/sbin/${AP_TARGET}:${APACHE_PORT}
LIB_DEPENDS=	pq.2:${PORTSDIR}/databases/postgresql7

WRKSRC=	${WRKDIR}/${PORTNAME}-${PORTVERSION:S/a//}

.include <bsd.port.pre.mk>

APXS?=		${LOCALBASE}/sbin/apxs
AP_PORT?=	apache13
APACHE_PORT?=	${PORTSDIR}/www/${AP_PORT}

.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
CFLAGS:=	`${APXS} -q CFLAGS` ${CFLAGS}
.else
AP_TARGET?=	httpd
AP_SYSCONF?=	${PREFIX}/etc/apache
AP_INCLUDE?=	${PREFIX}/include/apache
AP_LIBEXEC?=	${PREFIX}/libexec/apache
.endif

AUTH_PGSQL_DOCS=	apache/manual/mod/mod_auth_pgsql

PLIST_SUB+=	AUTH_PGSQL_DOCS="${AUTH_PGSQL_DOCS}"

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

post-install:
.if !defined(NOPORTDOCS)
	@${MKDIR} ${PREFIX}/share/doc/${AUTH_PGSQL_DOCS}
	${INSTALL_DATA} ${WRKSRC}/README \
		${PREFIX}/share/doc/${AUTH_PGSQL_DOCS}/
	${TR} -d \\015 < ${WRKSRC}/mod_auth_pgsql.html \
		> ${PREFIX}/share/doc/${AUTH_PGSQL_DOCS}/index.html
	${CHMOD} ${SHAREMODE} \
		${PREFIX}/share/doc/${AUTH_PGSQL_DOCS}/index.html
	${CHOWN} ${SHAREOWN}:${SHAREGRP} \
		${PREFIX}/share/doc/${AUTH_PGSQL_DOCS}/index.html
	${LN} -sf ${AUTH_PGSQL_DOCS} ${PREFIX}/share/doc/
.endif
	${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>