pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/apcupsd Properly handle config files in $PREF...
details: https://anonhg.NetBSD.org/pkgsrc/rev/18d4a9b072e8
branches: trunk
changeset: 530248:18d4a9b072e8
user: bouyer <bouyer%pkgsrc.org@localhost>
date: Tue Jun 19 22:22:55 2007 +0000
description:
Properly handle config files in $PREFIX/etc. Not sure how this worked with
the previous version of the package ...
Pointed out by Bernd Ernesti.
diffstat:
sysutils/apcupsd/Makefile | 7 ++++-
sysutils/apcupsd/PLIST | 3 +-
sysutils/apcupsd/distinfo | 4 ++-
sysutils/apcupsd/patches/patch-an | 46 +++++++++++++++++++++++++++++++++++++++
sysutils/apcupsd/patches/patch-ao | 24 ++++++++++++++++++++
5 files changed, 80 insertions(+), 4 deletions(-)
diffs (140 lines):
diff -r 298c513fa244 -r 18d4a9b072e8 sysutils/apcupsd/Makefile
--- a/sysutils/apcupsd/Makefile Tue Jun 19 21:59:32 2007 +0000
+++ b/sysutils/apcupsd/Makefile Tue Jun 19 22:22:55 2007 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.51 2007/06/15 21:15:38 bouyer Exp $
+# $NetBSD: Makefile,v 1.52 2007/06/19 22:22:55 bouyer Exp $
DISTNAME= apcupsd-3.14.1
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=apcupsd/}
@@ -57,6 +57,7 @@
EGDIR= ${PREFIX}/share/examples/apcupsd
CONF_FILES_PERMS+= ${EGDIR}/apcupsd.conf ${PKG_SYSCONFDIR}/apcupsd.conf ${ROOT_USER} ${ROOT_GROUP} 644
+CONF_FILES_PERMS+= ${EGDIR}/apcupsd.css ${PKG_SYSCONFDIR}/apcupsd.css ${ROOT_USER} ${ROOT_GROUP} 644
CONF_FILES_PERMS+= ${EGDIR}/changeme ${PKG_SYSCONFDIR}/changeme ${ROOT_USER} ${ROOT_GROUP} 755
CONF_FILES_PERMS+= ${EGDIR}/commfailure ${PKG_SYSCONFDIR}/commfailure ${ROOT_USER} ${ROOT_GROUP} 755
CONF_FILES_PERMS+= ${EGDIR}/commok ${PKG_SYSCONFDIR}/commok ${ROOT_USER} ${ROOT_GROUP} 755
@@ -98,6 +99,8 @@
post-install:
${INSTALL_DATA} ${WRKSRC}/platforms/etc/apcupsd.conf \
${PREFIX}/share/examples/apcupsd
+ ${INSTALL_DATA} ${WRKSRC}/src/cgi/apcupsd.css \
+ ${PREFIX}/share/examples/apcupsd
.for file in ${EGFILES}
${INSTALL_SCRIPT} ${WRKSRC}/platforms/${file} \
${PREFIX}/share/examples/apcupsd
diff -r 298c513fa244 -r 18d4a9b072e8 sysutils/apcupsd/PLIST
--- a/sysutils/apcupsd/PLIST Tue Jun 19 21:59:32 2007 +0000
+++ b/sysutils/apcupsd/PLIST Tue Jun 19 22:22:55 2007 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.8 2007/06/15 21:15:39 bouyer Exp $
+@comment $NetBSD: PLIST,v 1.9 2007/06/19 22:22:55 bouyer Exp $
libexec/cgi-bin/upsstats.cgi
libexec/cgi-bin/upsfstats.cgi
libexec/cgi-bin/upsimage.cgi
@@ -28,6 +28,7 @@
share/doc/html/apcupsd/template.inc
share/examples/apcupsd/apccontrol
share/examples/apcupsd/apcupsd.conf
+share/examples/apcupsd/apcupsd.css
share/examples/apcupsd/changeme
share/examples/apcupsd/commfailure
share/examples/apcupsd/commok
diff -r 298c513fa244 -r 18d4a9b072e8 sysutils/apcupsd/distinfo
--- a/sysutils/apcupsd/distinfo Tue Jun 19 21:59:32 2007 +0000
+++ b/sysutils/apcupsd/distinfo Tue Jun 19 22:22:55 2007 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.11 2007/06/15 21:15:39 bouyer Exp $
+$NetBSD: distinfo,v 1.12 2007/06/19 22:22:55 bouyer Exp $
SHA1 (apcupsd-3.14.1.tar.gz) = ee2a9ba074b688aba047d571098f44dc591e985c
RMD160 (apcupsd-3.14.1.tar.gz) = f6655123f7daa91966e9a2a4877e90b70babc670
@@ -15,3 +15,5 @@
SHA1 (patch-aj) = cce8e25f52cc4eaa38eb31baffceb33fe4a43cee
SHA1 (patch-al) = a41cb4ee8d896fc633d8869f24e548fda0761340
SHA1 (patch-am) = a2c060519748cf95f0f9aaa284f783f086c1d7d4
+SHA1 (patch-an) = 56afb8709129ec3bb42d4c29fa5a24c9032aa8a3
+SHA1 (patch-ao) = 4bae4f04a5766b49f1a3cf13cf63c70bd3807937
diff -r 298c513fa244 -r 18d4a9b072e8 sysutils/apcupsd/patches/patch-an
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/apcupsd/patches/patch-an Tue Jun 19 22:22:55 2007 +0000
@@ -0,0 +1,46 @@
+$NetBSD: patch-an,v 1.5 2007/06/19 22:22:55 bouyer Exp $
+
+--- src/cgi/Makefile.in.orig 2006-09-21 02:07:36.000000000 +0200
++++ src/cgi/Makefile.in 2007-06-19 23:59:26.000000000 +0200
+@@ -57,41 +57,6 @@
+ echo $(INSTALL_PROGRAM) $(STRIP) $$p $(DESTDIR)$(cgibin); \
+ $(INSTALL_PROGRAM) $(STRIP) $$p $(DESTDIR)$(cgibin); \
+ done
+- # don't overwrite any existing config file
+- @if test ! -f $(DESTDIR)$(sysconfdir)/apcupsd.css; then \
+- (echo "Installing apcupsd.css..." && \
+- $(INSTALL_DATA) apcupsd.css \
+- $(DESTDIR)$(sysconfdir)/apcupsd.css); \
+- else \
+- (echo "Installing apcupsd.css as $(DESTDIR)$(sysconfdir)/apcupsd.css.new" && \
+- $(INSTALL_DATA) apcupsd.css \
+- $(DESTDIR)$(sysconfdir)/apcupsd.css.new); \
+- fi
+-
+- # don't overwrite any existing config file
+- @if test ! -f $(DESTDIR)$(sysconfdir)/hosts.conf; then \
+- (echo "Installing hosts.conf..." && \
+- $(INSTALL_DATA) \
+- $(topdir)/platforms/etc/hosts.conf \
+- $(DESTDIR)$(sysconfdir)/hosts.conf); \
+- else \
+- (echo "Installing hosts.conf as $(DESTDIR)$(sysconfdir)/hosts.conf.new" && \
+- $(INSTALL_DATA) \
+- $(topdir)/platforms/etc/hosts.conf \
+- $(DESTDIR)$(sysconfdir)/hosts.conf.new); \
+- fi
+- # don't overwrite any existing config file
+- @if test ! -f $(DESTDIR)$(sysconfdir)/multimon.conf; then \
+- (echo "Installing multimon.conf..." && \
+- $(INSTALL_DATA) \
+- $(topdir)/platforms/etc/multimon.conf \
+- $(DESTDIR)$(sysconfdir)/multimon.conf ); \
+- else \
+- (echo "Installing multimon.conf as $(DESTDIR)$(sysconfdir)/multimon.conf.new" && \
+- $(INSTALL_DATA) \
+- $(topdir)/platforms/etc/multimon.conf \
+- $(DESTDIR)$(sysconfdir)/multimon.conf.new); \
+- fi
+
+ uninstall:
+ @echo "Uninstalling cgi program support..."
diff -r 298c513fa244 -r 18d4a9b072e8 sysutils/apcupsd/patches/patch-ao
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/apcupsd/patches/patch-ao Tue Jun 19 22:22:55 2007 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-ao,v 1.5 2007/06/19 22:22:55 bouyer Exp $
+
+--- platforms/Makefile.in.orig 2007-06-19 23:54:40.000000000 +0200
++++ platforms/Makefile.in 2007-06-19 23:56:17.000000000 +0200
+@@ -26,19 +26,6 @@
+ DESTDIR=$(DESTDIR) install);
+
+ install: @INSTALL_DISTDIR@
+- @echo "Installing apccontrol script..."
+- @if test -f $(DESTDIR)$(sysconfdir)/apccontrol; then \
+- mv -f $(DESTDIR)$(sysconfdir)/apccontrol $(DESTDIR)$(sysconfdir)/apccontrol.orig; \
+- echo " Found old apccontrol moving it to $(DESTDIR)$(sysconfdir)/apccontrol.orig"; \
+- fi
+- @if test -f ./$(DISTNAME)/apccontrol; then \
+- $(INSTALL_SCRIPT) -m 744 ./$(DISTNAME)/apccontrol \
+- $(DESTDIR)$(sysconfdir)/apccontrol; \
+- else \
+- $(INSTALL_SCRIPT) -m 744 ./apccontrol \
+- $(DESTDIR)$(sysconfdir)/apccontrol; \
+- fi
+- (cd etc/; $(MAKE) DESTDIR=$(DESTDIR) install)
+
+ #
+ # uninstall symlinks before removing the boot script etc etc
Home |
Main Index |
Thread Index |
Old Index