aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/glpi-plugins-fusioninventory-server/Makefile
blob: 5d6a83d941df2be62137f173b786882fac781c7c (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
# Created by: Gvozdikov Veniamin <g.veniamin@googlemail.com>
# $FreeBSD$

PORTNAME=   server
PORTVERSION=    ${GLPI_VER}.${FUNV_VER}
PORTEPOCH=  1
CATEGORIES= net-mgmt
MASTER_SITES=   http://forge.fusioninventory.org/attachments/download/668/
PKGNAMEPREFIX=  glpi-plugins-fusioninventory-
DISTNAME=   fusioninventory-for-glpi-metapackage_${GLPI_VER}+${FUNV_VER}

MAINTAINER= vg@FreeBSD.org
COMMENT=    Plugin of glpi to get information of networking devices

RUN_DEPENDS=    glpi>=0.80:${PORTSDIR}/www/glpi

USE_PHP=    simplexml wddx

GLPI_VER=   0.80
FUNV_VER=   1.5
WRKSRC=     ${WRKDIR}
NO_BUILD=   yes

GLPIPLUGINDIR?= www/glpi/plugins

OPTIONS_DEFINE= INVENTORY SNMP

INVENTORY_DESC= Additional features
SNMP_DESC=  SNMP support

OPTIONS_DEFAULT=INVENTORY

NO_STAGE=   yes
.include <bsd.port.pre.mk>

.if ${PORT_OPTIONS:MINVENTORY}
PLIST_SUB+= INVENTORY=""
.else
PLIST_SUB+= INVENTORY="@comment "
.endif

.if ${PORT_OPTIONS:MSNMP}
PLIST_SUB+= SNMP=""
.else
PLIST_SUB+= SNMP="@comment "
.endif

do-install:
    @${MKDIR} -m 0755 ${PREFIX}/${GLPIPLUGINDIR}
    @${CP} -R ${WRKSRC}/fusioninventory ${PREFIX}/${GLPIPLUGINDIR}
    @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${GLPIPLUGINDIR}/fusioninventory

.if ${PORT_OPTIONS:MINVENTORY}
    @${CP} -R ${WRKSRC}/fusinvinventory ${PREFIX}/${GLPIPLUGINDIR}
    @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${GLPIPLUGINDIR}/fusinvinventory
.endif

.if ${PORT_OPTIONS:MSNMP}
    @${CP} -R ${WRKSRC}/fusinvsnmp ${PREFIX}/${GLPIPLUGINDIR}
    @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${GLPIPLUGINDIR}/fusinvsnmp
.endif

.include <bsd.port.post.mk>