summaryrefslogtreecommitdiff
path: root/www/webalizer/Makefile
blob: 13af4f38b292863fa0fd9d6d837a56698f59c08f (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
53
54
55
56
57
58
59
60
61
62
# $NetBSD: Makefile,v 1.48 2010/01/18 09:59:32 wiz Exp $
#

DISTNAME=	webalizer-2.20-03-src
PKGNAME=	webalizer-2.20.3
PKGREVISION=	2
CATEGORIES=	www
MASTER_SITES=	ftp://ftp.mrunix.net/pub/webalizer/ \
		http://webalizer.linux-mirror.org/pub/webalizer/ \
		http://gd.tuwien.ac.at/infosys/logeval/webalizer/
EXTRACT_SUFX=	.tar.bz2

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	http://www.webalizer.org/
COMMENT=	Web server log file analysis program

PKG_INSTALLATION_TYPES=	overwrite pkgviews
PKG_DESTDIR_SUPPORT=	user-destdir

WRKSRC=			${WRKDIR}/${DISTNAME:S/-src//}
GNU_CONFIGURE=	YES
CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFDIR}
CONFIGURE_ARGS+=	--enable-dns

EGDIR=		${PREFIX}/share/examples
CONF_FILES=	${EGDIR}/webalizer.conf.sample ${PKG_SYSCONFDIR}/webalizer.conf
DOC_SUBDIR=	share/doc/webalizer
DOCDIR=		${PREFIX}/${DOC_SUBDIR}
DOCFILES=	CHANGES Copyright DNS.README README README.FIRST

INSTALLATION_DIRS=	bin ${PKGMANDIR}/man1 share/examples ${DOC_SUBDIR}

SUBST_CLASSES+=		webalizer
SUBST_STAGE.webalizer=	post-build
SUBST_FILES.webalizer=	sample.conf webalizer.1
SUBST_SED.webalizer=	-e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g"

PKG_OPTIONS_VAR=	PKG_OPTIONS.webalizer
PKG_SUPPORTED_OPTIONS=	bzip2 geoip
.include "../../mk/bsd.options.mk"

.if !empty(PKG_OPTIONS:Mbzip2)
.  include "../../archivers/bzip2/buildlink3.mk"
CONFIGURE_ARGS+=	--enable-bz2
.endif # option bzip2

.if !empty(PKG_OPTIONS:Mgeoip)
.  include "../../net/GeoIP/buildlink3.mk"
CONFIGURE_ARGS+=	--enable-geoip
CONFIGURE_ARGS+=	--with-geodb=${BUILDLINK_PREFIX.GeoIP}/share/GeoIP
.endif # option geoip

post-install:
.for f in ${DOCFILES}
	${INSTALL_DATA} ${WRKSRC}/${f} ${DESTDIR}${DOCDIR}/${f}
.endfor

BUILDLINK_TRANSFORM+=	l:db:db4
.include "../../databases/db4/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../graphics/gd/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"