blob: 9b72039736f87915f43bf03a32942890a2bfbcda (
plain)
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
|
# $NetBSD: Makefile,v 1.48 2007/07/04 20:55:01 jlam Exp $
.include "Makefile.common"
PKGNAME= ups-${DISTNAME}
COMMENT= Network UPS Tools
CONFIGURE_ARGS+= --with-user=${NUT_USER:Q}
CONFIGURE_ARGS+= --with-group=${NUT_GROUP:Q}
CONFIGURE_ARGS+= --with-drvpath=${NUT_DRVDIR:Q}
CONFIGURE_ARGS+= --with-altpidpath=${NUT_STATEDIR:Q}
CONFIGURE_ARGS+= --with-pidpath=${NUT_STATEDIR:Q}
NUT_USER?= nut
NUT_GROUP?= nut
PKG_GROUPS_VARS+= NUT_GROUP
PKG_USERS_VARS+= NUT_USER
BUILD_DEFS+= NUT_STATEDIR
FILES_SUBST+= NUT_CONFDIR=${NUT_CONFDIR:Q}
FILES_SUBST+= NUT_STATEDIR=${NUT_STATEDIR:Q}
MESSAGE_SUBST+= NUT_CONFDIR=${NUT_CONFDIR}
MESSAGE_SUBST+= NUT_EGDIR=${NUT_EGDIR}
MESSAGE_SUBST+= NUT_DOCDIR=${NUT_DOCDIR}
PKG_GROUPS= ${NUT_GROUP}
PKG_USERS= ${NUT_USER}:${NUT_GROUP}
PKG_GECOS.${NUT_USER}= Network UPS Tools
PKG_HOME.${NUT_USER}= ${NUT_STATEDIR}
PKG_SHELL.${NUT_USER}= ${SH}
CONF_FILES= ${NUT_EGDIR}/ups.conf.sample ${NUT_CONFDIR}/ups.conf
CONF_FILES+= ${NUT_EGDIR}/upssched.conf.sample \
${NUT_CONFDIR}/upssched.conf
CONF_FILES_PERMS= ${NUT_EGDIR}/upsd.conf.sample \
${NUT_CONFDIR}/upsd.conf \
${ROOT_USER} ${ROOT_GROUP} 0600
CONF_FILES_PERMS+= ${NUT_EGDIR}/upsd.users.sample \
${NUT_CONFDIR}/upsd.users \
${ROOT_USER} ${ROOT_GROUP} 0600
CONF_FILES_PERMS+= ${NUT_EGDIR}/upsmon.conf.sample \
${NUT_CONFDIR}/upsmon.conf \
${ROOT_USER} ${ROOT_GROUP} 0600
RCD_SCRIPTS= ups upsd upsdriver upslog upsmon
OWN_DIRS= ${NUT_CONFDIR}
OWN_DIRS_PERMS= ${NUT_STATEDIR} ${NUT_USER} ${NUT_GROUP} 0770
pre-install:
${MKDIR} ${NUT_STATEDIR}
${MKDIR} ${NUT_DRVDIR}
${CHOWN} ${NUT_USER} ${NUT_STATEDIR}
${INSTALL_DATA_DIR} ${NUT_EGDIR}
post-install:
${INSTALL_DATA_DIR} ${NUT_DOCDIR}
${INSTALL_DATA_DIR} ${NUT_DOCDIR}/cables
${INSTALL_DATA_DIR} ${NUT_DOCDIR}/drivers
for f in CHANGES COPYING CREDITS NEWS README INSTALL UPGRADING; do \
${INSTALL_DATA} ${WRKSRC}/$$f ${NUT_DOCDIR}; \
done
${INSTALL_DATA} ${WRKSRC}/docs/FAQ ${NUT_DOCDIR}
${INSTALL_DATA} ${WRKSRC}/data/driver.list ${NUT_DOCDIR}
${INSTALL_DATA} ${WRKSRC}/docs/*.txt ${NUT_DOCDIR}
${INSTALL_DATA} ${WRKSRC}/docs/cables/*.txt ${NUT_DOCDIR}/cables
.include "../../mk/bsd.pkg.mk"
|