1998-06-28 14:42:09 +02:00
|
|
|
# New ports collection makefile for: webalizer
|
|
|
|
# Date created: 02.Jun 1998
|
|
|
|
# Whom: dirk.meyer@dinoex.sub.org
|
|
|
|
#
|
1999-08-31 04:43:35 +02:00
|
|
|
# $FreeBSD$
|
2000-04-10 02:07:29 +02:00
|
|
|
#
|
1998-06-28 14:42:09 +02:00
|
|
|
|
2000-04-10 02:07:29 +02:00
|
|
|
PORTNAME= webalizer
|
2009-01-25 10:45:24 +01:00
|
|
|
PORTVERSION= 2.21.2
|
2010-03-28 08:47:48 +02:00
|
|
|
PORTREVISION= 3
|
2001-05-28 21:57:20 +02:00
|
|
|
CATEGORIES+= www
|
2005-09-04 17:46:50 +02:00
|
|
|
MASTER_SITES= ftp://ftp.mrunix.net/pub/webalizer/:main \
|
2008-07-18 20:17:12 +02:00
|
|
|
MASTER_SITES= ftp://ftp.mrunix.net/pub/webalizer/geodb/:geodb \
|
2005-09-04 17:46:50 +02:00
|
|
|
ftp://ftp.dinoex.de/pub/FreeBSD/distfiles/:main \
|
2007-02-10 07:27:53 +01:00
|
|
|
http://flags.blogpotato.de/zip/:flags
|
2005-09-04 17:46:50 +02:00
|
|
|
PKGNAMESUFFIX?= ${WEBALIZER_SUFFIX}${PKGNAMESUFFIX2}
|
2009-01-25 10:45:24 +01:00
|
|
|
DISTNAME= ${PORTNAME}-2.21-02-src
|
2008-07-18 20:17:12 +02:00
|
|
|
DISTFILES= ${DISTNAME}.tgz:main
|
1998-06-28 14:42:09 +02:00
|
|
|
|
2002-05-02 08:05:45 +02:00
|
|
|
MAINTAINER?= dinoex@FreeBSD.org
|
2003-02-21 05:07:03 +01:00
|
|
|
COMMENT= A web server log file analysis program
|
1998-06-28 14:42:09 +02:00
|
|
|
|
2010-06-04 15:49:15 +02:00
|
|
|
LICENSE= GPLv2
|
|
|
|
|
1999-06-10 10:15:24 +02:00
|
|
|
GNU_CONFIGURE= yes
|
2002-01-06 00:43:13 +01:00
|
|
|
DOCSDIR?= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME}
|
|
|
|
EXAMPLESDIR?= ${PREFIX}/share/examples/${PKGNAMEPREFIX}${PORTNAME}
|
2003-09-04 08:46:16 +02:00
|
|
|
GD_PORT?= graphics/gd
|
2001-05-28 21:57:20 +02:00
|
|
|
|
2004-10-15 23:03:05 +02:00
|
|
|
CONFLICTS= geolizer-2*
|
|
|
|
|
2008-07-17 16:08:56 +02:00
|
|
|
.if defined(BATCH)
|
|
|
|
# no cosmetique spaces allowed
|
|
|
|
WEBALIZER_LANG?=english
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
2005-09-04 17:46:50 +02:00
|
|
|
|
2009-01-25 11:13:56 +01:00
|
|
|
.if defined(WITH_GEODB) || defined(WITH_GEOIP)|| make(makesum) || defined(FETCH_ALL)
|
|
|
|
DISTFILES+= webalizer-flags.tgz:main
|
|
|
|
.endif
|
|
|
|
.if defined(WITH_GEODB) || make(makesum) || defined(FETCH_ALL)
|
2010-06-04 09:25:36 +02:00
|
|
|
DISTFILES+= webalizer-geodb-20100601.tgz:geodb
|
2009-01-25 11:13:56 +01:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !defined(LIB_DEPENDS)
|
|
|
|
LIB_DEPENDS= gd.4:${PORTSDIR}/${GD_PORT}
|
|
|
|
.endif
|
|
|
|
.if defined(WITH_GEOIP)
|
|
|
|
LIB_DEPENDS+= GeoIP.5:${PORTSDIR}/net/GeoIP
|
|
|
|
.endif
|
|
|
|
|
2008-07-18 06:16:48 +02:00
|
|
|
.if defined(WITH_GEODB)
|
|
|
|
PLIST_SUB+= WITH_GEODB=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= WITH_GEODB="@comment "
|
|
|
|
.endif
|
|
|
|
|
2005-09-04 17:46:50 +02:00
|
|
|
.if defined(WITH_GEOIP)
|
|
|
|
WEBALIZER_SUFFIX= -geoip
|
|
|
|
CONFLICTS+= ${PKGNAMEPREFIX}webalizer-2*
|
2005-09-05 13:58:31 +02:00
|
|
|
CONFIGURE_ARGS+= --enable-geoip \
|
|
|
|
--with-geoip-lib=${LOCALBASE}/lib \
|
|
|
|
--with-geoip-inc=${LOCALBASE}/include
|
2005-09-04 17:46:50 +02:00
|
|
|
.else
|
|
|
|
CONFLICTS+= ${PKGNAMEPREFIX}webalizer-geoip-2*
|
2008-07-18 20:17:12 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_GEODB) || defined(WITH_GEOIP)
|
|
|
|
PLIST_SUB+= WITH_GEOIP=""
|
|
|
|
.else
|
2005-09-04 17:46:50 +02:00
|
|
|
PLIST_SUB+= WITH_GEOIP="@comment "
|
|
|
|
.endif
|
|
|
|
|
2009-01-25 10:45:24 +01:00
|
|
|
.if defined(WITH_BDB_VER) || defined(WITH_BDB)
|
2008-07-18 20:17:12 +02:00
|
|
|
USE_BDB= yes
|
|
|
|
INVALID_BDB_VER= 2 3 40
|
|
|
|
LDFLAGS+= -L${BDB_LIB_DIR}
|
|
|
|
CFLAGS+= -I${BDB_INCLUDE_DIR}
|
|
|
|
.else
|
|
|
|
CFLAGS+= -DUSE_DB185
|
|
|
|
.endif
|
|
|
|
|
2000-10-10 06:31:37 +02:00
|
|
|
CONFIGURE_ARGS+= --enable-dns \
|
2008-07-22 09:15:01 +02:00
|
|
|
--enable-bz2 \
|
2008-07-17 16:08:56 +02:00
|
|
|
--with-geodb=${PREFIX}/share/webalizer \
|
|
|
|
--sysconfdir=${PREFIX}/etc \
|
2005-09-05 13:58:31 +02:00
|
|
|
--with-gdlib=${LOCALBASE}/lib \
|
|
|
|
--with-gd=${LOCALBASE}/include
|
|
|
|
|
1999-11-01 01:58:47 +01:00
|
|
|
CONFIGURE_ENV+= LDFLAGS="-L${PREFIX}/lib"
|
2008-07-18 20:17:12 +02:00
|
|
|
CFLAGS+= -Wall
|
2008-07-17 16:08:56 +02:00
|
|
|
MAN1= ${PKGNAMEPREFIX}webalizer.1 ${PKGNAMEPREFIX}wcmgr.1
|
2003-10-19 21:21:10 +02:00
|
|
|
DOC1= CHANGES Copyright INSTALL \
|
2000-10-10 06:31:37 +02:00
|
|
|
README README.FIRST DNS.README country-codes.txt
|
2005-09-04 17:46:50 +02:00
|
|
|
DOC2= INSTALL GeoIP.README
|
2001-05-28 21:57:20 +02:00
|
|
|
WRKSRC= ${WRKDIR}/${DISTNAME:S/-src$//}
|
|
|
|
PLIST_SUB+= PKGNAMEPREFIX=${PKGNAMEPREFIX}
|
2008-07-18 20:17:12 +02:00
|
|
|
SUPP_LANG= albanian arabic catalan chinese croatian czech danish dutch \
|
|
|
|
english estonian finnish french galician german greek \
|
|
|
|
hungarian icelandic indonesian italian japanese korean \
|
|
|
|
latvian lithuanian malay norwegian polish portuguese \
|
|
|
|
portuguese_brazil romanian romanian-iso-8859-2 russian \
|
|
|
|
serbian simplified_chinese slovak slovene spanish swedish \
|
|
|
|
thai turkish ukrainian
|
1999-06-10 10:15:24 +02:00
|
|
|
|
|
|
|
.if defined(WEBALIZER_LANG)
|
|
|
|
CONFIGURE_ARGS+= --with-language=${WEBALIZER_LANG}
|
2004-10-17 08:11:36 +02:00
|
|
|
# The patch file is written by URASHIMA Akira
|
|
|
|
# see http://tyche.pu-toyama.ac.jp/~a-urasim/webalizer/
|
|
|
|
.if ${WEBALIZER_LANG} == japanese
|
|
|
|
EXTRA_PATCHES+= ${FILESDIR}/ja-webalizer.conf-dist.patch
|
|
|
|
.endif
|
2008-08-05 21:33:16 +02:00
|
|
|
.if ${WEBALIZER_LANG} == ukrainian
|
|
|
|
EXTRA_PATCHES+= ${FILESDIR}/uk-lang.h
|
|
|
|
EXTRA_PATCHES+= ${FILESDIR}/uk-output.c
|
2004-10-17 08:11:36 +02:00
|
|
|
.endif
|
2008-08-05 21:33:16 +02:00
|
|
|
.endif
|
|
|
|
|
2004-10-17 08:11:36 +02:00
|
|
|
.if defined(WITH_WEBALIZER_CONV)
|
|
|
|
USE_ICONV=yes
|
|
|
|
# The patch file is written by URASHIMA Akira
|
|
|
|
# see http://tyche.pu-toyama.ac.jp/~a-urasim/webalizer/
|
|
|
|
EXTRA_PATCHES+= ${FILESDIR}/webalizer-a-urasim_2.patch
|
|
|
|
CONFIGURE_ARGS+= --enable-mininls
|
|
|
|
CONFIGURE_ENV+= LIBS="-L${LOCALBASE}/lib -liconv"
|
2005-09-05 13:58:31 +02:00
|
|
|
CFLAGS+= -I${LOCALBASE}/include
|
1999-06-10 10:15:24 +02:00
|
|
|
.endif
|
1998-07-31 10:48:02 +02:00
|
|
|
|
2008-07-17 16:08:56 +02:00
|
|
|
.if !defined(WITHOUT_WEBALIZER_FULL_CGI_REFS)
|
|
|
|
CFLAGS+= -DUSE_FULL_CGI_REFS
|
2007-05-25 06:07:45 +02:00
|
|
|
.endif
|
|
|
|
|
2008-07-17 16:08:56 +02:00
|
|
|
.if defined(WITH_WEBALIZER_CLICKABLE_REFERER)
|
|
|
|
CFLAGS+= -DUSE_CLICKABLE_REFERER
|
2008-01-14 10:24:06 +01:00
|
|
|
.endif
|
|
|
|
|
1999-07-04 20:54:16 +02:00
|
|
|
pre-configure:
|
2007-03-25 13:44:24 +02:00
|
|
|
${REINPLACE_CMD} -e "s|/etc|${PREFIX}/etc|" \
|
|
|
|
${WRKSRC}/webalizer.1
|
|
|
|
${REINPLACE_CMD} \
|
|
|
|
-e "s|webalizer.conf|${PKGNAMEPREFIX}webalizer.conf|" \
|
|
|
|
${WRKSRC}/webalizer.c
|
2009-01-17 12:32:38 +01:00
|
|
|
.if defined(WITH_MAXURLH)
|
|
|
|
${REINPLACE_CMD} \
|
|
|
|
-e "s|MAXURLH 512 |MAXURLH 2048|" \
|
|
|
|
${WRKSRC}/webalizer.h
|
|
|
|
.endif
|
2009-01-25 10:45:24 +01:00
|
|
|
.if defined(WITH_BDB_VER) || defined(WITH_BDB)
|
2008-07-18 20:17:12 +02:00
|
|
|
${REINPLACE_CMD} -e "s|-ldb|-l${BDB_LIB_NAME}|" \
|
|
|
|
${WRKSRC}/configure
|
|
|
|
.else
|
2008-07-17 16:08:56 +02:00
|
|
|
${REINPLACE_CMD} -e "s|-ldb||" \
|
2007-03-25 13:44:24 +02:00
|
|
|
${WRKSRC}/configure
|
2008-07-18 20:17:12 +02:00
|
|
|
.endif
|
|
|
|
|
1998-07-31 10:48:02 +02:00
|
|
|
.if !defined(WEBALIZER_LANG)
|
|
|
|
@${ECHO_MSG} "You can customize the language by typing"
|
2000-10-10 06:31:37 +02:00
|
|
|
@${ECHO_MSG} " make WEBALIZER_LANG=<lang>"
|
|
|
|
@${ECHO_MSG} "where <lang> is one of:"
|
|
|
|
@${ECHO_MSG} ${SUPP_LANG}
|
1998-07-31 10:48:02 +02:00
|
|
|
.endif
|
|
|
|
|
1998-06-28 14:42:09 +02:00
|
|
|
do-install:
|
2001-05-28 21:57:20 +02:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/webalizer \
|
|
|
|
${PREFIX}/bin/${PKGNAMEPREFIX}webalizer
|
2008-07-17 16:08:56 +02:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/wcmgr \
|
|
|
|
${PREFIX}/bin/${PKGNAMEPREFIX}wcmgr
|
2001-05-28 21:57:20 +02:00
|
|
|
${LN} -sf ${PKGNAMEPREFIX}webalizer \
|
|
|
|
${PREFIX}/bin/${PKGNAMEPREFIX}webazolver
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/sample.conf \
|
|
|
|
${PREFIX}/etc/${PKGNAMEPREFIX}webalizer.conf-dist ;
|
1998-06-28 14:42:09 +02:00
|
|
|
|
|
|
|
post-install:
|
1999-01-26 03:18:17 +01:00
|
|
|
.for i in ${MAN1}
|
2008-07-17 16:08:56 +02:00
|
|
|
${INSTALL_MAN} ${WRKSRC}/${i:S/^${PKGNAMEPREFIX}//} ${PREFIX}/man/man1/${i}
|
1999-01-26 03:18:17 +01:00
|
|
|
.endfor
|
2008-07-18 06:16:48 +02:00
|
|
|
.if defined(WITH_GEODB) || defined(WITH_GEOIP)
|
2007-02-10 23:38:06 +01:00
|
|
|
${MKDIR} ${PREFIX}/share/geolizer
|
2008-07-18 20:17:12 +02:00
|
|
|
@${INSTALL_DATA} ${WRKDIR}/flags/* ${PREFIX}/share/geolizer/
|
2008-07-18 06:16:48 +02:00
|
|
|
.endif
|
|
|
|
.if defined(WITH_GEODB)
|
2008-07-17 16:08:56 +02:00
|
|
|
@${INSTALL_DATA} ${WRKDIR}/GeoDB.dat ${PREFIX}/share/geolizer/
|
2007-02-10 23:38:06 +01:00
|
|
|
.endif
|
1998-06-28 14:42:09 +02:00
|
|
|
.if !defined(NOPORTDOCS)
|
2002-01-06 00:43:13 +01:00
|
|
|
${MKDIR} ${DOCSDIR}
|
1999-01-26 03:18:17 +01:00
|
|
|
.for i in ${DOC1}
|
2002-01-06 00:43:13 +01:00
|
|
|
@${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}/${i}
|
1998-06-28 14:42:09 +02:00
|
|
|
.endfor
|
2001-05-28 21:57:20 +02:00
|
|
|
.endif
|
2008-05-30 19:09:01 +02:00
|
|
|
.if !defined(NOPORTEXAMPLES)
|
|
|
|
${MKDIR} ${EXAMPLESDIR}
|
|
|
|
.for i in msfree.png sample.conf webalizer.png
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/${i} ${EXAMPLESDIR}/${i}
|
|
|
|
.endfor
|
|
|
|
.endif
|
1998-06-28 14:42:09 +02:00
|
|
|
|
2001-05-28 21:57:20 +02:00
|
|
|
.include <bsd.port.post.mk>
|