aboutsummaryrefslogtreecommitdiffstats
path: root/www/awstats-devel/Makefile
blob: ba828181b4281baaffde1e4a74a34ba3db376168 (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
68
69
70
71
72
73
74
75
# New ports collection makefile for:    awstats
# Date created:         May 13, 2002
# Whom:             Munish Chopra <mchopra@engmail.uwaterloo.ca>
#
# $FreeBSD$
#

PORTNAME=   awstats-devel
PORTVERSION=    6.6
PORTREVISION=   1
CATEGORIES= www
MASTER_SITES=   http://awstats.sourceforge.net/files/
DISTNAME=   awstats-${PORTVERSION}

MAINTAINER= farrokhi@FreeBSD.org
COMMENT=    Free real-time logfile analyzer to get advanced web statistics

RUN_DEPENDS=    ${SITE_PERL}/Net/XWhois.pm:${PORTSDIR}/net/p5-Net-XWhois

NO_BUILD=   yes
USE_PERL5_RUN=  yes
USE_DOS2UNIX=   tools/logresolvemerge.pl

SUB_FILES=  pkg-message
AWSTATS?=   www/awstats
PLIST_SUB=  AWSTATS=${AWSTATS}

CONFLICTS=  awstats-6.*
LATEST_LINK=    awstats-devel

OPTIONS=    IPV6 "Enable IPV6 for use with IPv6 Plugin" Off

.include <bsd.port.pre.mk>

.if defined(WITH_IPV6)
RUN_DEPENDS+=   ${SITE_PERL}/Net/IP.pm:${PORTSDIR}/net-mgmt/p5-Net-IP
RUN_DEPENDS+=   ${SITE_PERL}/mach/Net/DNS.pm:${PORTSDIR}/dns/p5-Net-DNS
.endif

.if ${PERL_LEVEL} < 500800
RUN_DEPENDS+=   ${SITE_PERL}/${PERL_ARCH}/Storable.pm:${PORTSDIR}/devel/p5-Storable
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/tools/awstats_buildstaticpages.pl
    @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/tools/awstats_configure.pl
    @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/tools/awstats_updateall.pl
    @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/wwwroot/cgi-bin/awstats.pl
    @${FIND} ${WRKSRC} -name '*.orig' -delete
    @${FIND} ${WRKSRC} -name '*.bak' -delete

do-install:
    @${MKDIR} ${PREFIX}/${AWSTATS}
    @${MKDIR} ${PREFIX}/${AWSTATS}/tools
    @${MV} ${WRKSRC}/wwwroot/icon ${WRKSRC}/wwwroot/icons
    @${CP} -R ${WRKSRC}/wwwroot/* ${PREFIX}/${AWSTATS}
    @${CP} -R ${WRKSRC}/tools/* ${PREFIX}/${AWSTATS}/tools
    @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${AWSTATS}
    @${ECHO_CMD} ""
    @${ECHO_CMD} "* Rename ${PREFIX}/www/awstats/cgi-bin/awstats.model.conf to awstats.site.conf to setup awstats"
    @${ECHO_CMD} "* Documentation has been installed in ${PREFIX}/share/doc/awstats"
    @${ECHO_CMD} ""

.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}/images
    ${INSTALL_DATA} ${WRKSRC}/docs/images/* ${DOCSDIR}/images
    ${INSTALL_DATA} ${WRKSRC}/docs/*.* ${DOCSDIR}
.endif

post-install:
.if !defined(BATCH)
    @${CAT} ${PKGMESSAGE}
.endif

.include <bsd.port.post.mk>