summaryrefslogtreecommitdiff
path: root/sysutils/bkpupsd
diff options
context:
space:
mode:
authorjmmv <jmmv>2003-07-31 11:07:30 +0000
committerjmmv <jmmv>2003-07-31 11:07:30 +0000
commit945a476cb0f4748fc3854ccf2fd6063e9d109d0d (patch)
treef39ed33a84c55e24ce66922b106317ebf12903d8 /sysutils/bkpupsd
parent180b827fd96729f0db6156c28c474456e054c52c (diff)
downloadpkgsrc-945a476cb0f4748fc3854ccf2fd6063e9d109d0d.tar.gz
Convert to the bsd.pkg.install.mk framework:
- Honour PKG_SYSCONFDIR. - Install configuration files in sample directory and copy them to PKG_SYSCONFDIR when appropiate. - Use RCD_SCRIPTS to handle installed rc.d script. Use buildlink2 too. Bump PKGREVISION to 1.
Diffstat (limited to 'sysutils/bkpupsd')
-rw-r--r--sysutils/bkpupsd/MESSAGE12
-rw-r--r--sysutils/bkpupsd/Makefile18
-rw-r--r--sysutils/bkpupsd/PLIST5
-rw-r--r--sysutils/bkpupsd/distinfo4
-rw-r--r--sysutils/bkpupsd/patches/patch-aa29
-rw-r--r--sysutils/bkpupsd/patches/patch-ab15
6 files changed, 70 insertions, 13 deletions
diff --git a/sysutils/bkpupsd/MESSAGE b/sysutils/bkpupsd/MESSAGE
index 6cb94390a4d..682ed8e6655 100644
--- a/sysutils/bkpupsd/MESSAGE
+++ b/sysutils/bkpupsd/MESSAGE
@@ -1,14 +1,14 @@
===========================================================================
-$NetBSD: MESSAGE,v 1.2 2003/03/12 16:43:45 taca Exp $
+$NetBSD: MESSAGE,v 1.3 2003/07/31 11:07:30 jmmv Exp $
${DOCDIR}/rc.conf.d.sample contains some shell variables
for helping bkpupsd start up.
-Simple way to install NetBSD 1.5 or later is bellow.
+Simple way to install NetBSD 1.5 or later is below.
-(1) Copy ${PKGRCDIR}/bkpupsd to ${ETCDIR}/rc.d/bkpupsd.
-(2) Append ${DOCDIR}/rc.conf.d.sample to ${ETCDIR}/rc.conf.
-(3) Edit ${ETCDIR}/rc.conf for your needs, serial device and
- UPS type for example.
+(1) Copy ${PREFIX}/etc/rc.d/bkpupsd to ${RCD_SCRIPTS_DIR}/rc.d/bkpupsd.
+(2) Append ${DOCDIR}/rc.conf.d.sample to /etc/rc.conf.
+(3) Edit /etc/rc.conf for your needs, serial device and UPS type for
+ example.
===========================================================================
diff --git a/sysutils/bkpupsd/Makefile b/sysutils/bkpupsd/Makefile
index 669f8914f00..8e76fb3ea49 100644
--- a/sysutils/bkpupsd/Makefile
+++ b/sysutils/bkpupsd/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.8 2003/07/21 17:24:10 martti Exp $
+# $NetBSD: Makefile,v 1.9 2003/07/31 11:07:30 jmmv Exp $
#
DISTNAME= bkpupsd-2.1.2
+PKGREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= ftp://ftp.jone-system.com/pub/misc/ \
ftp://ftp.back-street.net/pub/misc/
@@ -11,16 +12,25 @@ MAINTAINER= taca@NetBSD.org
HOMEPAGE= # not exist
COMMENT= Simple UPS daemon for BK-Pro, BK series and FREQUPS F series
+USE_BUILDLINK2= YES
+USE_PKGINSTALL= YES
+
.include "../../mk/bsd.prefs.mk"
DOCDIR= ${PREFIX}/share/doc/bkpupsd
PKGRCDIR= ${PREFIX}/etc/rc.d
-ETCDIR= ${DESTDIR}/etc
MAKE_ENV+= DEFAULT_DEVICE=${DEFAULT_SERIAL_DEVICE} DOCDIR=${DOCDIR}
-MESSAGE_SUBST+= DOCDIR=${DOCDIR} ETCDIR=${ETCDIR} PKGRCDIR=${PKGRCDIR}
+MESSAGE_SUBST+= DOCDIR=${DOCDIR}
+
+EGDIR= ${PREFIX}/share/examples/bkpupsd
+CONF_FILES= ${EGDIR}/upstab ${PKG_SYSCONFDIR}/upstab
+
+RCD_SCRIPTS= bkpupsd
-post-install:
+pre-install:
+ ${INSTALL_DATA_DIR} ${DOCDIR}
+ ${INSTALL_DATA_DIR} ${EGDIR}
${INSTALL_DATA} ${WRKSRC}/README ${DOCDIR}
${INSTALL_DATA} ${WRKSRC}/README.ja ${DOCDIR}
diff --git a/sysutils/bkpupsd/PLIST b/sysutils/bkpupsd/PLIST
index a9fa28bc935..7bdaa4b6a80 100644
--- a/sysutils/bkpupsd/PLIST
+++ b/sysutils/bkpupsd/PLIST
@@ -1,6 +1,5 @@
-@comment $NetBSD: PLIST,v 1.2 2001/12/19 15:38:00 taca Exp $
+@comment $NetBSD: PLIST,v 1.3 2003/07/31 11:07:30 jmmv Exp $
etc/rc.d/bkpupsd
-etc/upstab
libexec/bkpupsd/battery.shutdown
libexec/bkpupsd/line.lost
libexec/bkpupsd/line.recover
@@ -14,4 +13,6 @@ sbin/bkpupsd
share/doc/bkpupsd/README
share/doc/bkpupsd/README.ja
share/doc/bkpupsd/rc.conf.d.sample
+share/examples/bkpupsd/upstab
+@dirrm share/examples/bkpupsd
@dirrm share/doc/bkpupsd
diff --git a/sysutils/bkpupsd/distinfo b/sysutils/bkpupsd/distinfo
index 4cff7100d50..268c25f51e8 100644
--- a/sysutils/bkpupsd/distinfo
+++ b/sysutils/bkpupsd/distinfo
@@ -1,4 +1,6 @@
-$NetBSD: distinfo,v 1.7 2003/03/12 16:43:45 taca Exp $
+$NetBSD: distinfo,v 1.8 2003/07/31 11:07:30 jmmv Exp $
SHA1 (bkpupsd-2.1.2.tar.bz2) = 742e6d7bc99c777077b9e0cc8cf6016fc63d18a6
Size (bkpupsd-2.1.2.tar.bz2) = 35054 bytes
+SHA1 (patch-aa) = 887254791ec11c45c9acca5d3250ca43dd47c4ee
+SHA1 (patch-ab) = 60d5d9e1e26df8cb12c6ab26709e488c113e741f
diff --git a/sysutils/bkpupsd/patches/patch-aa b/sysutils/bkpupsd/patches/patch-aa
new file mode 100644
index 00000000000..b827722aa91
--- /dev/null
+++ b/sysutils/bkpupsd/patches/patch-aa
@@ -0,0 +1,29 @@
+$NetBSD: patch-aa,v 1.5 2003/07/31 11:07:31 jmmv Exp $
+
+--- src/Makefile.orig 2002-12-21 18:34:12.000000000 +0100
++++ src/Makefile
+@@ -32,7 +32,7 @@
+ OPSYS!=uname -s
+ PROG= bkpupsd
+ SRCS= bits.c main.c ups.c str2arg.c
+-UPSTAB= ${PREFIX}/etc/upstab
++UPSTAB= ${PKG_SYSCONFDIR}/upstab
+
+ .if exists(/usr/include/sys/com_ups.h)
+ CFLAGS+= -DHAVE_UPS_CONTROL -DDEBUG
+@@ -62,6 +62,7 @@ all: ${PROG} ${MAN8}
+
+ upstab.5: upstab.5.in
+ @${SED} -e 's#%%prefix%%#${PREFIX}#g' \
++ -e 's#%%pkg_sysconfdir%%#${PKG_SYSCONFDIR}#g' \
+ ${.CURDIR}/${.ALLSRC} > ${.TARGET}
+
+ bkpupsd.8: bkpupsd.8.in
+@@ -70,6 +71,6 @@ bkpupsd.8: bkpupsd.8.in
+
+ afterinstall:
+ ${INSTALL} -c -m 0644 -o ${BINOWN} -g ${BINGRP} ${.CURDIR}/upstab \
+- ${UPSTAB}
++ ${PREFIX}/share/examples/bkpupsd
+
+ .include <bsd.prog.mk>
diff --git a/sysutils/bkpupsd/patches/patch-ab b/sysutils/bkpupsd/patches/patch-ab
new file mode 100644
index 00000000000..6cca62f7f34
--- /dev/null
+++ b/sysutils/bkpupsd/patches/patch-ab
@@ -0,0 +1,15 @@
+$NetBSD: patch-ab,v 1.5 2003/07/31 11:07:31 jmmv Exp $
+
+--- src/upstab.5.in.orig 2002-12-21 18:42:01.000000000 +0100
++++ src/upstab.5.in
+@@ -122,8 +122,8 @@ In this case, after setting serial port
+ CTS and CAR are set.
+ .Pp
+ .Sh FILES
+-.Bl -tag -width %%prefix%%/etc/upstab
+-.It Pa %%prefix%%/etc/upstab
++.Bl -tag -width %%pkg_sysconfdir%%/upstab
++.It Pa %%pkg_sysconfdir%%/upstab
+ .El
+ .Sh SEE ALSO
+ .Xr getcap 3 ,