aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/ipplan/Makefile
blob: 3dff2ed207cd2c0d00a94bbcf6b307ac6b6765b0 (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
# Created by: Maxim Tuliuk <mt@primats.org.ua>
# $FreeBSD$

PORTNAME=   ipplan
PORTVERSION=    4.92b
PORTREVISION=   2
CATEGORIES= net-mgmt
MASTER_SITES=   SF/iptrack/${PORTNAME}/Release%204.92

MAINTAINER= ports@FreeBSD.org
COMMENT=    IP address management and tracking

DEPRECATED= Works only with EOL php 5.6
EXPIRATION_DATE=    2018-12-30

IGNORE_WITH_PHP=    71 72 73

RUN_DEPENDS=    nmap:security/nmap

USES=       perl5 shebangfix
USE_PERL5=  run
USE_PHP=    gettext pcre xml zlib
SHEBANG_FILES=  ${WRKSRC}/contrib/process-exports.pl ${WRKSRC}/contrib/ipplan-poller.php

NO_BUILD=   yes
NO_ARCH=    yes
WRKSRC=     ${WRKDIR}/${PORTNAME}
CONFIG=     config.php
SUB_FILES=  pkg-message
REINPLACE_ARGS= -i ''

OPTIONS_DEFINE= MYSQL PGSQL SNMP
OPTIONS_DEFAULT=    MYSQL

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MMYSQL}
USE_PHP+=   mysql
.endif

.if ${PORT_OPTIONS:MPGSQL}
USE_PHP+=   pgsql
.endif

.if ${PORT_OPTIONS:MSNMP}
USE_PHP+=   snmp
.endif

.include <bsd.port.pre.mk>

post-patch:
    @${REINPLACE_CMD} -e "s|/usr/bin/xsltproc|${LOCALBASE}/bin/xsltproc|" \
        ${WRKSRC}/contrib/process-exports.pl
    @${REINPLACE_CMD} -e "s|%%LOCALBASE%%|${LOCALBASE}|" \
        ${WRKSRC}/${CONFIG}
    @${MV} ${WRKSRC}/${CONFIG} ${WRKSRC}/${CONFIG}.sample
    @${RM} ${WRKSRC}/${CONFIG}.orig

do-install:
    ${MKDIR} ${STAGEDIR}${WWWDIR}
    @cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR}

    # make /var dirs
    ${MKDIR} ${STAGEDIR}/var/spool/ipplan/dhcpexport
    ${MKDIR} ${STAGEDIR}/var/spool/ipplan/exportdns
    ${MKDIR} ${STAGEDIR}/var/spool/ipplan/uploads
.if ${PORT_OPTIONS:MPGSQL}
    @${REINPLACE_CMD} -e 's|INSTALL|INSTALL-POSTGRESQL|g' ${PKGMESSAGE}
.endif

.include <bsd.port.post.mk>