diff options
author | bouyer <bouyer> | 2007-06-19 22:22:55 +0000 |
---|---|---|
committer | bouyer <bouyer> | 2007-06-19 22:22:55 +0000 |
commit | d69e3ebd058a63b75b09d3328b35754d9d0833c0 (patch) | |
tree | bc3c5f2e65cb5649b74f0740be032455ebf07b34 | |
parent | 393800c670b8ffac1a17fbb463fe06cb02624570 (diff) | |
download | pkgsrc-d69e3ebd058a63b75b09d3328b35754d9d0833c0.tar.gz |
Properly handle config files in $PREFIX/etc. Not sure how this worked with
the previous version of the package ...
Pointed out by Bernd Ernesti.
-rw-r--r-- | sysutils/apcupsd/Makefile | 7 | ||||
-rw-r--r-- | sysutils/apcupsd/PLIST | 3 | ||||
-rw-r--r-- | sysutils/apcupsd/distinfo | 4 | ||||
-rw-r--r-- | sysutils/apcupsd/patches/patch-an | 46 | ||||
-rw-r--r-- | sysutils/apcupsd/patches/patch-ao | 24 |
5 files changed, 80 insertions, 4 deletions
diff --git a/sysutils/apcupsd/Makefile b/sysutils/apcupsd/Makefile index d685d8d3f36..7d35f5283e7 100644 --- a/sysutils/apcupsd/Makefile +++ b/sysutils/apcupsd/Makefile @@ -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 @@ CONFIGURE_ENV+= ac_cv_path_MAKE=${MAKE:Q} 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 @@ HTMLDOCS= apcupsd.gif bclogo.gif bugs.html bugs.wml index.html index.wml \ 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 --git a/sysutils/apcupsd/PLIST b/sysutils/apcupsd/PLIST index 39e724ba1e5..d54a02232be 100644 --- a/sysutils/apcupsd/PLIST +++ b/sysutils/apcupsd/PLIST @@ -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/systems.wml 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 --git a/sysutils/apcupsd/distinfo b/sysutils/apcupsd/distinfo index da1fce52b9c..999eb99fbda 100644 --- a/sysutils/apcupsd/distinfo +++ b/sysutils/apcupsd/distinfo @@ -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-ai) = be802d4ea438ac991f7e0ebd1c086699aade0b2b SHA1 (patch-aj) = cce8e25f52cc4eaa38eb31baffceb33fe4a43cee SHA1 (patch-al) = a41cb4ee8d896fc633d8869f24e548fda0761340 SHA1 (patch-am) = a2c060519748cf95f0f9aaa284f783f086c1d7d4 +SHA1 (patch-an) = 56afb8709129ec3bb42d4c29fa5a24c9032aa8a3 +SHA1 (patch-ao) = 4bae4f04a5766b49f1a3cf13cf63c70bd3807937 diff --git a/sysutils/apcupsd/patches/patch-an b/sysutils/apcupsd/patches/patch-an new file mode 100644 index 00000000000..b0fac537c39 --- /dev/null +++ b/sysutils/apcupsd/patches/patch-an @@ -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 --git a/sysutils/apcupsd/patches/patch-ao b/sysutils/apcupsd/patches/patch-ao new file mode 100644 index 00000000000..e8a91256323 --- /dev/null +++ b/sysutils/apcupsd/patches/patch-ao @@ -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 |