~cypheon/pkgsrc-wip

pkgsrc-wip/dhcpd-snmp/Makefile -rw-r--r-- 1.5 KiB
5f1bf4f5 — Johann Rudloff Subst PLIST paths for platform specific files for other architectures 6 months ago
                                                                                
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
# $NetBSD: Makefile,v 1.2 2015/06/10 13:43:17 ahp-nils Exp $
#

DISTNAME=		dhcpd-snmp-20160601
CATEGORIES=		net
MASTER_SITES=		-https://github.com/ohitz/dhcpd-snmp/archive/master.zip
EXTRACT_SUFX=		.zip

MAINTAINER=		nils@NetBSD.org
HOMEPAGE=		https://github.com/ohitz/dhcpd-snmp
COMMENT=		Extension for the Net-SNMP agent and the ISC DHCP server
LICENSE=		gnu-gpl-v2

WRKSRC=			${WRKDIR}/dhcpd-snmp-master
USE_LANGUAGES=		# none
NO_BUILD=		yes

USE_TOOLS+=		find pax perl pod2man
REPLACE_PERL+=		dhcpd-snmp

DEPENDS+=		net-snmp-[0-9]*:../../net/net-snmp

.include "../../mk/bsd.prefs.mk"

NET_SNMP_MIBDIR=	share/snmp/mibs
EGDIR=			share/examples/dhcpd-snmp

BUILD_DEFS+=		VARBASE NET_SNMP_MIBDIR

SUBST_CLASSES+=		paths
SUBST_FILES.paths+=	dhcpd-snmp.conf.dist
SUBST_VARS.paths=	VARBASE
SUBST_STAGE.paths=	post-configure

CONF_FILES=		${PREFIX}/${EGDIR}/dhcpd-snmp.conf \
			${PKG_SYSCONFDIR}/dhcpd-snmp.conf

INSTALLATION_DIRS+=	sbin ${PKGMANDIR}/man8 ${NET_SNMP_MIBDIR} ${EGDIR}

post-configure:
	cd ${WRKSRC} ; pod2man README.pod dhcpd-snmp.8

do-install:
	${INSTALL_SCRIPT} ${WRKSRC}/dhcpd-snmp ${DESTDIR}${PREFIX}/sbin
	${INSTALL_MAN} ${WRKSRC}/dhcpd-snmp.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8
	${INSTALL_DATA} ${WRKSRC}/mibs/nettrack-dhcpd-snmp.mib \
		${DESTDIR}${PREFIX}/${NET_SNMP_MIBDIR}/nettrack-dhcpd-mib.txt
	${INSTALL_DATA} ${WRKSRC}/dhcpd-snmp.conf.dist \
		${DESTDIR}${PREFIX}/${EGDIR}/dhcpd-snmp.conf
	find ${WRKSRC}/cacti -type f -exec chmod ugo-x \{\} \;
	cd ${WRKSRC} ; ${PAX} -rw cacti ${DESTDIR}${PREFIX}/${EGDIR}

.include "../../mk/bsd.pkg.mk"