summaryrefslogtreecommitdiffstats
path: root/www/mod_log_sql2/Makefile
blob: cdd83593367a80ccb0993371a8eeabf2432b49ef (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
52
# Created by: Clement Laforet <clement@FreeBSD.org>
# $FreeBSD$

PORTNAME=	mod_log_sql
PORTVERSION=	1.101
PORTREVISION=	6
CATEGORIES=	www databases
MASTER_SITES=	http://www.outoforder.cc/downloads/${PORTNAME}/
PKGNAMEPREFIX=	${APACHE_PKGNAMEPREFIX}

MAINTAINER=	apache@FreeBSD.org
COMMENT=	Allows Apache to log to a MySQL database

USES=		gmake tar:bzip2
USE_APACHE=	22+
USE_MYSQL=	yes
GNU_CONFIGURE=	yes

OPTIONS_SUB=	yes
OPTIONS_DEFINE=	DBI DOCS

DBI_CONFIGURE_WITH=	dbi=${LOCALBASE}
DBI_LIB_DEPENDS=	libdbi.so:${PORTSDIR}/databases/libdbi

DBI_DESC=	depend on databases/libdbi
PORTDOCS=	manual.html manual.xml

.include <bsd.port.options.mk>

APMODCFG=	330_mod_log_sql.conf.sample
SUB_FILES+=	${APMODCFG} pkg-message
SUB_LIST+=	APMODCFG=${APMODCFG:C/.sample//}
PLIST_SUB+=	APMODCFG=${APMODCFG}

CONFIGURE_ARGS+=--with-apxs=${APXS}
LIBS+=		-L${LOCALBASE}/lib -L${LOCALBASE}/lib/mysql

post-patch:
	${REINPLACE_CMD} -e 's|@APXS_STAGE@|-S LIBEXECDIR=${STAGEDIR}${PREFIX}/${APACHEMODDIR}|' \
		${WRKSRC}/Makefile.in

pre-install:
	@${MKDIR} ${STAGEDIR}${PREFIX}/${APACHEMODDIR}

post-install:
	@${MKDIR} ${STAGEDIR}${PREFIX}/${APACHEETCDIR}/modules.d
	${CP} ${WRKDIR}/${APMODCFG} ${STAGEDIR}${PREFIX}/${APACHEETCDIR}/modules.d
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/${APACHEMODDIR}/*.so
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/docs/|} ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>
OpenPOWER on IntegriCloud