]> git.pld-linux.org Git - packages/nut.git/commitdiff
- merged DEVEL
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 21 Aug 2002 11:36:21 +0000 (11:36 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    nut-DESTDIR.patch -> 1.8
    nut.init -> 1.2
    nut.spec -> 1.38
    nut.sysconfig -> 1.3

nut-DESTDIR.patch
nut.init
nut.spec
nut.sysconfig

index 7fdcc9e6b6fce8f0b52a62d22219d864fd5860aa..e84dd3be1a95cb9cd4389d4fcf79674acd89c3c3 100644 (file)
@@ -1,79 +1,76 @@
-diff -Nru nut-0.45.5/Makefile.in nut-0.45.5.new/Makefile.in
---- nut-0.45.5/Makefile.in     Fri Mar  8 13:21:11 2002
-+++ nut-0.45.5.new/Makefile.in Fri Apr 12 19:48:58 2002
-@@ -2,15 +2,8 @@
+diff -urN nut-0.99.1.org/Makefile.in nut-0.99.1/Makefile.in
+--- nut-0.99.1.org/Makefile.in Tue Aug 13 18:57:38 2002
++++ nut-0.99.1/Makefile.in     Tue Aug 13 19:31:19 2002
+@@ -2,13 +2,12 @@
  
  # directory definitions
  prefix      = @prefix@
+-INSTALLROOT = $(DESTDIR)
 -BASEPATH    = $(INSTALLROOT)@prefix@
 -CONFPATH    = $(INSTALLROOT)@sysconfdir@
 -CGIPATH     = $(INSTALLROOT)@CGIPATH@
--MODELPATH   = $(INSTALLROOT)@MODELPATH@
--INSTALLDIRS = $(CONFPATH) $(MODELPATH) $(BASEPATH)/@bindir@ $(BASEPATH)/@sbindir@
+-DRVPATH     = $(INSTALLROOT)@DRVPATH@
+-INSTALLDIRS = $(CONFPATH) $(DRVPATH) $(BASEPATH)/@bindir@ $(BASEPATH)/@sbindir@
 -STATEPATH   = $(INSTALLROOT)@STATEPATH@
++BASEPATH    = @prefix@
++CONFPATH    = @sysconfdir@
++CGIPATH     = @CGIPATH@
++DRVPATH     = @DRVPATH@
++INSTALLDIRS = $(CONFPATH) $(DRVPATH) @bindir@ @sbindir@
++STATEPATH   = @STATEPATH@
  
--SUBDIRS       = common models server clients
--CFLAGS        = -I../include @CFLAGS@
-+SUBDIRS       = clients common conf man models server
- # these are here so they can be overridden during a make install
- RUNUID=@RUN_AS_USER@
-@@ -41,46 +34,14 @@
-               rm $$i/Makefile; \
+ SUBDIRS       = common drivers server clients
+ CFLAGS        = -I../include @CFLAGS@
+@@ -44,7 +43,7 @@
        done
  
--install: install-dirs install-man
+ install: install-dirs install-man
 -      @echo Installing in $(BASEPATH)...
--
-+install:
++      @echo Installing in $(DESTDIR)$(BASEPATH)...
        @for i in $(SUBDIRS) conf; do \
--              cd $$i; $(MAKE) install; cd ..; \
--      done
--
--install-dirs:
--      @for d in $(INSTALLDIRS); do \
+               cd $$i; $(MAKE) install; cd ..; \
+@@ -52,15 +51,15 @@
+ install-dirs:
+       @for d in $(INSTALLDIRS); do \
 -              if (test ! -d $$d) then \
 -                      ./install-sh -d $$d || exit 1; \
--              fi \
-+              cd $$i; $(MAKE) DESTDIR=$(DESTDIR) install; cd ..; \
++              if (test ! -d $(DESTDIR)$$d) then \
++                      ./install-sh -d $(DESTDIR)$$d || exit 1; \
+               fi \
        done
  
 -      @if (test ! -d $(STATEPATH)) then \
--              ./install-sh -d $(STATEPATH) || exit 1 ; \
+-              ./install-sh -d -m $(STATEPATHMODE) $(STATEPATH) || exit 1 ; \
 -              ./install-sh -d -o $(RUNUID) -g $(RUNGID) $(STATEPATH) \
 -              || echo "Unable to set ownership of $(STATEPATH)"; \
--      fi
--
--install-man:
--      @cd man; $(MAKE) install; cd ..;
--
- cgi:
++      @if (test ! -d $(DESTDIR)$(STATEPATH)) then \
++              ./install-sh -d -m $(STATEPATHMODE) $(DESTDIR)$(STATEPATH) || exit 1 ; \
++              ./install-sh -d -o $(RUNUID) -g $(RUNGID) $(DESTDIR)$(STATEPATH) \
++              || echo "Unable to set ownership of $(DESTDIR)$(STATEPATH)"; \
+       fi
+ install-man:
+@@ -77,8 +76,8 @@
        @cd clients; $(MAKE) cgi; cd ..;
  
--install-cgi: install-dirs 
+ install-cgi: install-dirs install-cgi-man
 -      if (test ! -d $(CGIPATH)) then \
 -              ./install-sh -d $(CGIPATH) || exit 1; \
--      fi \
--
--      @cd conf; $(MAKE) install; cd ..;
--      @cd clients; $(MAKE) install-cgi; cd ..;
--
--install-cgi-man:
--      @cd man; $(MAKE) install-cgi-man; cd ..;
--
--install-misc: install-dirs
--      @cd clients; $(MAKE) install-misc; cd ..;
--
- # This is only used to set the "official" version before it goes out the door.
- #
- rhver = $(shell echo $(SETVER) | sed s/\-//g)
-diff -Nru nut-0.45.5/clients/Makefile.in nut-0.45.5.new/clients/Makefile.in
---- nut-0.45.5/clients/Makefile.in     Fri Mar 15 07:00:32 2002
-+++ nut-0.45.5.new/clients/Makefile.in Fri Apr 12 19:48:22 2002
-@@ -1,11 +1,10 @@
++      if (test ! -d $(DESTDIR)$(CGIPATH)) then \
++              ./install-sh -d $(DESTDIR)$(CGIPATH) || exit 1; \
+       fi \
+       @cd conf; $(MAKE) install; cd ..;
+diff -urN nut-0.99.1.org/clients/Makefile.in nut-0.99.1/clients/Makefile.in
+--- nut-0.99.1.org/clients/Makefile.in Tue Aug 13 18:57:38 2002
++++ nut-0.99.1/clients/Makefile.in     Tue Aug 13 19:29:22 2002
+@@ -1,12 +1,10 @@
  # Network UPS Tools: clients
  
  # directories
+-INSTALLROOT = $(DESTDIR)
 -prefix         = $(INSTALLROOT)@prefix@
 -BASEPATH = $(prefix)
 -CGIPATH        = $(INSTALLROOT)@CGIPATH@
@@ -81,184 +78,213 @@ diff -Nru nut-0.45.5/clients/Makefile.in nut-0.45.5.new/clients/Makefile.in
 -SBINPATH = $(prefix)/@sbindir@
 +prefix         = @prefix@
 +CGIPATH        = @CGIPATH@
-+bindir         = @bindir@
-+sbindir  = @sbindir@
++BINPATH        = @bindir@
++SBINPATH = @sbindir@
  
  # other definitions
  CC     = @CC@
-@@ -67,21 +66,8 @@
- distclean: clean
+@@ -69,20 +67,20 @@
  
  install: all
--      @for f in $(PROGS) ; do \
+       @for f in $(PROGS) ; do \
 -              $(INSTALLCMD) -m $(INSTALLMODE) $$f $(BINPATH); \
--      done
--      @for f in $(SPROGS) ; do \
++              $(INSTALLCMD) -m $(INSTALLMODE) $$f $(DESTDIR)$(BINPATH); \
+       done
+       @for f in $(SPROGS) ; do \
 -              $(INSTALLCMD) -m $(INSTALLMODE) $$f $(SBINPATH); \
--      done
--
--install-cgi: cgi
--      @for f in $(CGIPROGS) ; do \
++              $(INSTALLCMD) -m $(INSTALLMODE) $$f $(DESTDIR)$(SBINPATH); \
+       done
+ install-cgi: cgi
+       @for f in $(CGIPROGS) ; do \
 -              $(INSTALLCMD) -m $(INSTALLMODE) $$f $(CGIPATH); \
--      done
--
--install-misc: upsfetch.o
++              $(INSTALLCMD) -m $(INSTALLMODE) $$f $(DESTDIR)$(CGIPATH); \
+       done
+ install-misc: upsfetch.o
 -      @if (test ! -d $(BASEPATH)/misc) then \
 -              ../install-sh -d $(BASEPATH)/misc || exit 1; \
--      fi
++      @if (test ! -d $(prefix)/misc) then \
++              ../install-sh -d $(prefix)/misc || exit 1; \
+       fi
 -      $(INSTALLCMD) upsfetch.h $(BASEPATH)/misc
 -      $(INSTALLCMD) upsfetch.o $(BASEPATH)/misc
-+      $(INSTALLCMD) -d $(DESTDIR)$(bindir) $(DESTDIR)$(sbindir) \
-+              $(DESTDIR)$(CGIPATH)
-+      $(INSTALLCMD) -m $(INSTALLMODE) $(PROGS) $(DESTDIR)$(bindir)
-+      $(INSTALLCMD) -m $(INSTALLMODE) $(SPROGS) $(DESTDIR)$(sbindir)
-+      $(INSTALLCMD) -m $(INSTALLMODE) $(CGIPROGS) $(DESTDIR)$(CGIPATH)
-diff -Nru nut-0.45.5/conf/Makefile.in nut-0.45.5.new/conf/Makefile.in
---- nut-0.45.5/conf/Makefile.in        Mon Aug 13 19:12:18 2001
-+++ nut-0.45.5.new/conf/Makefile.in    Fri Apr 12 19:32:21 2002
-@@ -1,7 +1,7 @@
- # Network UPS Tools: conf
- prefix     = @prefix@
--CONFPATH   = $(INSTALLROOT)@sysconfdir@
-+sysconfdir = @sysconfdir@
- INSTALLCMD = @INSTALL@
++      $(INSTALLCMD) upsfetch.h $(prefix)/misc
++      $(INSTALLCMD) upsfetch.o $(prefix)/misc
+diff -urN nut-0.99.1.org/conf/Makefile.in nut-0.99.1/conf/Makefile.in
+--- nut-0.99.1.org/conf/Makefile.in    Tue Aug 13 18:57:38 2002
++++ nut-0.99.1/conf/Makefile.in        Tue Aug 13 19:29:22 2002
+@@ -3,8 +3,7 @@
+ # this gets used once configure expands sysconfdir below...
+ prefix      = @prefix@
+-INSTALLROOT = $(DESTDIR)
+-CONFPATH    = $(INSTALLROOT)@sysconfdir@
++CONFPATH    = @sysconfdir@
+ INSTALLCMD  = @INSTALL@
  
  SECFILES = upsmon.conf upsd.conf upsd.users
-@@ -11,10 +11,11 @@
- clean:
+@@ -15,9 +14,9 @@
  
  install:
-+      $(INSTALLCMD) -d $(DESTDIR)$(sysconfdir)
        @for f in $(SECFILES) ; do \
 -              $(INSTALLCMD) -m 0600 $$f $(CONFPATH)/$$f.sample; \
-+              $(INSTALLCMD) -m 0600 $$f $(DESTDIR)$(sysconfdir)/$$f; \
++              $(INSTALLCMD) -m 0600 $$f $(DESTDIR)$(CONFPATH)/$$f.sample; \
        done
  
        @for f in $(PUBFILES) ; do \
 -              $(INSTALLCMD) -m 0644 $$f $(CONFPATH)/$$f.sample; \
-+              $(INSTALLCMD) -m 0644 $$f $(DESTDIR)$(sysconfdir)/$$f; \
++              $(INSTALLCMD) -m 0644 $$f $(DESTDIR)$(CONFPATH)/$$f.sample; \
        done
-diff -Nru nut-0.45.5/man/Makefile.in nut-0.45.5.new/man/Makefile.in
---- nut-0.45.5/man/Makefile.in Sun Mar 17 00:50:40 2002
-+++ nut-0.45.5.new/man/Makefile.in     Fri Apr 12 20:15:32 2002
-@@ -1,7 +1,7 @@
+diff -urN nut-0.99.1.org/drivers/Makefile.in nut-0.99.1/drivers/Makefile.in
+--- nut-0.99.1.org/drivers/Makefile.in Tue Aug 13 18:57:38 2002
++++ nut-0.99.1/drivers/Makefile.in     Tue Aug 13 19:29:22 2002
+@@ -1,8 +1,7 @@
+ # Network UPS Tools: drivers
+ # directories
+-INSTALLROOT = $(DESTDIR)
+-DRVPATH = $(INSTALLROOT)@DRVPATH@
++DRVPATH = @DRVPATH@
+ # other definitions
+ CC    = @CC@
+@@ -106,20 +105,20 @@
+ # Install handlers
+ install: all install-@DRIVER_INSTALL_TARGET@
+-      $(INSTALLCMD) -m $(INSTALLMODE) upsdrvctl $(DRVPATH);
++      $(INSTALLCMD) -m $(INSTALLMODE) upsdrvctl $(DESTDIR)$(DRVPATH);
+ # Install every driver
+ install-all-drivers:
+       @for f in $(PROGS) ; do \
+-              echo $(INSTALLCMD) -m $(INSTALLMODE) $$f $(DRVPATH); \
+-              $(INSTALLCMD) -m $(INSTALLMODE) $$f $(DRVPATH); \
++              echo $(INSTALLCMD) -m $(INSTALLMODE) $$f $(DESTDIR)$(DRVPATH); \
++              $(INSTALLCMD) -m $(INSTALLMODE) $$f $(DESTDIR)$(DRVPATH); \
+       done
+ # Just install the drivers that were selected by the user
+ install-some-drivers:
+       @for f in $(DRIVER_BUILD_LIST) ; do \
+-              echo $(INSTALLCMD) -m $(INSTALLMODE) $$f $(DRVLPATH); \
+-              $(INSTALLCMD) -m $(INSTALLMODE) $$f $(DRVPATH); \
++              echo $(INSTALLCMD) -m $(INSTALLMODE) $$f $(DESTDIR)$(DRVLPATH); \
++              $(INSTALLCMD) -m $(INSTALLMODE) $$f $(DESTDIR)$(DRVPATH); \
+       done
+diff -urN nut-0.99.1.org/man/Makefile.in nut-0.99.1/man/Makefile.in
+--- nut-0.99.1.org/man/Makefile.in     Tue Aug 13 18:57:38 2002
++++ nut-0.99.1/man/Makefile.in Tue Aug 13 19:29:22 2002
+@@ -1,8 +1,7 @@
  # Network UPS Tools: man
  
+-INSTALLROOT = $(DESTDIR)
  prefix      = @prefix@
 -MANDIR      = $(INSTALLROOT)@mandir@
-+mandir      = @mandir@
++MANDIR      = @mandir@
  INSTALLCMD  = @INSTALL@
  INSTALLMODE = 0644
  
-@@ -27,57 +27,9 @@
- # DRIVER_INSTALL_TARGET is usually "all-drivers" but changes into
- # some-drivers when using 'configure --with-drivers=...'
+@@ -34,35 +33,35 @@
  
--install: all install-man-dirs @DRIVER_INSTALL_TARGET@
--      @for f in $(MAN5_PAGES) ; do \
+ install: all install-man-dirs @DRIVER_INSTALL_TARGET@
+       @for f in $(MAN5_PAGES) ; do \
 -              echo $(INSTALLCMD) -m $(INSTALLMODE) $$f $(MANDIR)/man5; \
 -              $(INSTALLCMD) -m $(INSTALLMODE) $$f $(MANDIR)/man5; \
--      done
--      @for f in $(MAN8_PAGES) ; do \
++              echo $(INSTALLCMD) -m $(INSTALLMODE) $$f $(DESTDIR)$(MANDIR)/man5; \
++              $(INSTALLCMD) -m $(INSTALLMODE) $$f $(DESTDIR)$(MANDIR)/man5; \
+       done
+       @for f in $(MAN8_PAGES) ; do \
 -              echo $(INSTALLCMD) -m $(INSTALLMODE) $$f $(MANDIR)/man8; \
 -              $(INSTALLCMD) -m $(INSTALLMODE) $$f $(MANDIR)/man8; \
--      done
--
--# make the directories for these things
--
--install-man-dirs:
--      @if (test ! -d $(MANDIR)) then \
++              echo $(INSTALLCMD) -m $(INSTALLMODE) $$f $(DESTDIR)$(MANDIR)/man8; \
++              $(INSTALLCMD) -m $(INSTALLMODE) $$f $(DESTDIR)$(MANDIR)/man8; \
+       done
+ # make the directories for these things
+ install-man-dirs:
+       @if (test ! -d $(MANDIR)) then \
 -              echo ../install-sh -d $(MANDIR) || exit 1;\
 -              ../install-sh -d $(MANDIR) || exit 1;\
--      fi
++              echo ../install-sh -d $(DESTDIR)$(MANDIR) || exit 1;\
++              ../install-sh -d $(DESTDIR)$(MANDIR) || exit 1;\
+       fi
 -      @if (test ! -d $(MANDIR)/man5) then \
 -              echo ../install-sh -d $(MANDIR)/man5 || exit 1;\
 -              ../install-sh -d $(MANDIR)/man5 || exit 1;\
--      fi
++      @if (test ! -d $(DESTDIR)$(MANDIR)/man5) then \
++              echo ../install-sh -d $(DESTDIR)$(MANDIR)/man5 || exit 1;\
++              ../install-sh -d $(DESTDIR)$(MANDIR)/man5 || exit 1;\
+       fi
 -      @if (test ! -d $(MANDIR)/man8) then \
 -              echo ../install-sh -d $(MANDIR)/man8 || exit 1;\
 -              ../install-sh -d $(MANDIR)/man8 || exit 1;\
--      fi
--
--# install every driver man page
--all-drivers:
--      @for f in $(DRIVERPAGES) ; do \
++      @if (test ! -d $(DESTDIR)$(MANDIR)/man8) then \
++              echo ../install-sh -d $(DESTDIR)$(MANDIR)/man8 || exit 1;\
++              ../install-sh -d $(DESTDIR)$(MANDIR)/man8 || exit 1;\
+       fi
+ # install every driver man page
+ all-drivers:
+       @for f in $(DRIVERPAGES) ; do \
 -              echo $(INSTALLCMD) -m $(INSTALLMODE) $$f $(MANDIR)/man8; \
 -              $(INSTALLCMD) -m $(INSTALLMODE) $$f $(MANDIR)/man8; \
--      done
--
--# install just the pages for the drivers that were built
--some-drivers:
--      @for f in $(DRIVER_BUILD_LIST) ; do \
--              if (test -f $$f.8) \
--              then \
++              echo $(INSTALLCMD) -m $(INSTALLMODE) $$f $(DESTDIR)$(MANDIR)/man8; \
++              $(INSTALLCMD) -m $(INSTALLMODE) $$f $(DESTDIR)$(MANDIR)/man8; \
+       done
+ # install just the pages for the drivers that were built
+@@ -70,19 +69,19 @@
+       @for f in $(DRIVER_BUILD_LIST) ; do \
+               if (test -f $$f.8) \
+               then \
 -                      echo $(INSTALLCMD) -m $(INSTALLMODE) $$f.8 $(MANDIR)/man8; \
 -                      $(INSTALLCMD) -m $(INSTALLMODE) $$f.8 $(MANDIR)/man8; \
--              fi \
--      done
--
--# just the man pages
--install-cgi-man: install-man-dirs
--      @for f in $(CGI_MAN5) ; do \
++                      echo $(INSTALLCMD) -m $(INSTALLMODE) $$f.8 $(DESTDIR)$(MANDIR)/man8; \
++                      $(INSTALLCMD) -m $(INSTALLMODE) $$f.8 $(DESTDIR)$(MANDIR)/man8; \
+               fi \
+       done
+ # just the CGI program man pages
+ install-cgi-man: install-man-dirs
+       @for f in $(CGI_MAN5) ; do \
 -              echo $(INSTALLCMD) -m $(INSTALLMODE) $$f $(MANDIR)/man5; \
 -              $(INSTALLCMD) -m $(INSTALLMODE) $$f $(MANDIR)/man5; \
--      done
--
--      @for f in $(CGI_MAN8) ; do \
++              echo $(INSTALLCMD) -m $(INSTALLMODE) $$f $(DESTDIR)$(MANDIR)/man5; \
++              $(INSTALLCMD) -m $(INSTALLMODE) $$f $(DESTDIR)$(MANDIR)/man5; \
+       done
+       @for f in $(CGI_MAN8) ; do \
 -              echo $(INSTALLCMD) -m $(INSTALLMODE) $$f $(MANDIR)/man8; \
 -              $(INSTALLCMD) -m $(INSTALLMODE) $$f $(MANDIR)/man8; \
--      done
-+install:
-+      $(INSTALLCMD) -d $(DESTDIR)$(mandir)/man5 $(DESTDIR)$(mandir)/man8
-+      $(INSTALLCMD) -m $(INSTALLMODE) $(MAN5_PAGES) $(CGI_MAN5) \
-+              $(DESTDIR)$(mandir)/man5
-+      $(INSTALLCMD) -m $(INSTALLMODE) $(MAN8_PAGES) $(CGI_MAN8) \
-+              $(DRIVERPAGES) $(DESTDIR)$(mandir)/man8
-diff -Nru nut-0.45.5/models/Makefile.in nut-0.45.5.new/models/Makefile.in
---- nut-0.45.5/models/Makefile.in      Tue Mar 26 00:30:31 2002
-+++ nut-0.45.5.new/models/Makefile.in  Fri Apr 12 20:16:38 2002
-@@ -101,16 +101,6 @@
- # Install every driver
--install-all-drivers:
--      @for f in $(PROGS) $(PROGS2) ; do \
--              echo $(INSTALLCMD) -m $(INSTALLMODE) $$f $(MODELPATH); \
--              $(INSTALLCMD) -m $(INSTALLMODE) $$f $(MODELPATH); \
--      done
--
--# Just install the drivers that were selected by the user
--
--install-some-drivers:
--      @for f in $(DRIVER_BUILD_LIST) ; do \
--              echo $(INSTALLCMD) -m $(INSTALLMODE) $$f $(MODELPATH); \
--              $(INSTALLCMD) -m $(INSTALLMODE) $$f $(MODELPATH); \
--      done
-+install-all-drivers: $(PROGS2)
-+      $(INSTALLCMD) -d $(DESTDIR)$(MODELPATH)
-+      $(INSTALLCMD) -m $(INSTALLMODE) $(PROGS2) $(DESTDIR)$(MODELPATH)
-diff -Nru nut-0.45.5/server/Makefile.in nut-0.45.5.new/server/Makefile.in
---- nut-0.45.5/server/Makefile.in      Mon Mar  4 19:41:47 2002
-+++ nut-0.45.5.new/server/Makefile.in  Fri Apr 12 19:42:47 2002
-@@ -1,8 +1,8 @@
++              echo $(INSTALLCMD) -m $(INSTALLMODE) $$f $(DESTDIR)$(MANDIR)/man8; \
++              $(INSTALLCMD) -m $(INSTALLMODE) $$f $(DESTDIR)$(MANDIR)/man8; \
+       done
+diff -urN nut-0.99.1.org/server/Makefile.in nut-0.99.1/server/Makefile.in
+--- nut-0.99.1.org/server/Makefile.in  Tue Aug 13 18:57:38 2002
++++ nut-0.99.1/server/Makefile.in      Tue Aug 13 19:29:22 2002
+@@ -1,9 +1,8 @@
  # Network UPS Tools: server
  
  # directories
+-INSTALLROOT = $(DESTDIR)
 -prefix   = $(INSTALLROOT)@prefix@
 -SBINPATH = $(prefix)@sbindir@
 +prefix   = @prefix@
-+sbindir  = @sbindir@
++SBINPATH = @sbindir@
  
  # other definitions
  CC    = @CC@
-@@ -32,7 +32,5 @@
- distclean: clean
+@@ -31,6 +30,6 @@
  
  install: all
--      @for f in $(PROGS) ; do \
+       @for f in $(PROGS) ; do \
 -              echo $(INSTALLCMD) $$f $(SBINPATH); \
 -              $(INSTALLCMD) $$f $(SBINPATH); \
--      done
-+      $(INSTALLCMD) -d $(DESTDIR)$(sbindir)
-+      $(INSTALLCMD) $(PROGS) $(DESTDIR)$(sbindir)
++              echo $(INSTALLCMD) $$f $(DESTDIR)$(SBINPATH); \
++              $(INSTALLCMD) $$f $(DESTDIR)$(SBINPATH); \
+       done
index cab59580877d6414e9f03c025bfe95909da612d1..c65788da079086fad9e564e8b3982deb5e586c7f 100644 (file)
--- a/nut.init
+++ b/nut.init
@@ -27,34 +27,25 @@ case "$1" in
   start)
        # Check if the service is already running?
        if [ ! -f /var/lock/subsys/ups ]; then
-               show "Starting UPS drivers"
-               busy
-               ups_start >/dev/null 2>&1
+               show "Starting UPS drivers"
+               daemon upsdrvctl start
                if [ $? -eq 0 ]; then
-                       ok
-                       msg_starting "UPS daemon"
-                       daemon "upsd $OPTIONS\""
+                       msg_starting "UPS network daemon"
+                       daemon "upsd $OPTIONS"
+                       RETVAL=$?
                        touch /var/lock/subsys/ups
-               else
-                       fail
                fi
        else
-               msg_Already_Running "UPS daemon"
+               msg_Already_Running "UPS drivers and network daemon"
        fi
        ;;
   stop)
        if [ -f /var/lock/subsys/ups ]; then
                msg_stopping "UPS daemon"
                killproc upsd
-               
                show "Stopping UPS drivers"
-               busy
-               ups_stop >/dev/null 2>&1
-               if [ $? -eq 0 ]; then
-                       ok
-               else
-                       fail
-               fi
+               daemon upsdrvctl stop
+               RETVAL=$?
                rm -f /var/lock/subsys/ups
        else
                msg_Not_Running "UPS daemon"
@@ -64,13 +55,19 @@ case "$1" in
        $0 stop
        $0 start
        ;;
+  reload)
+       msg_reloading "UPS drivers"
+       daemon upsdrvctl reload
+       msg_reloading "UPS network daemon"
+       daemon upsd -c reload
+       ;;
   force-reload)
        $0 restart
        exit $?
        ;;
   status)
        status upsd
-       ups_status
+       upsdrvctl status
        ;;
   *)
        msg_Usage "$0 {start|stop|status|restart|reload|force-reload}"
index 4ea846d3b25c7a9c0836d0214a73238af12b43f8..f334ba81a25986beb67a7053ce2dd09162de696b 100644 (file)
--- a/nut.spec
+++ b/nut.spec
@@ -1,8 +1,8 @@
 Summary:       Network UPS Tools
 Summary(pl):   Sieciowe narzêdzie do UPS-ów
 Name:          nut
-Version:       0.45.5
-Release:       3
+Version:       1.0.0
+Release:       1
 License:       GPL
 Group:         Applications/System
 Source0:       http://www.exploits.org/nut/release/%{name}-%{version}.tar.gz
@@ -11,9 +11,9 @@ Source2:      %{name}.sysconfig
 Source3:       %{name}-upsmon.init
 Patch0:                %{name}-DESTDIR.patch
 Patch1:                %{name}-client.patch
-Patch2:                %{name}-lookup_for_libgd_ac_fix.patch
 URL:           http://www.exploits.org/nut/
 BuildRequires: autoconf
+BuildRequires: automake
 BuildRequires: gd-devel >= 2.0.1
 BuildRequires: libpng-devel
 Prereq:                rc-scripts
@@ -89,15 +89,19 @@ Plik wynikowy oraz nag
 %setup -q
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
 
 %build
+install /usr/share/automake/config.* .
+%{__aclocal}
 %{__autoconf}
 %configure \
-       --with-statepath=/var/lib/ups \
-       --with-uid=nobody \
-       --with-group=ttyS \
-       --with-modelpath=%{_libdir}/nut
+       --with-cgi \
+       --with-linux-hiddev=%{_includedir}/linux/hiddev.h \
+       --with-statepath=%{_var}/lib/ups \
+       --with-drvpath=%{_libdir}/nut \
+       --with-cgipath=/home/services/httpd/cgi-bin \
+       --with-user=nobody \
+       --with-group=ttyS
 %{__make} all cgi
 
 %install
@@ -105,33 +109,24 @@ rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT/{etc/{sysconfig,rc.d/init.d},/var/lib/ups} \
        $RPM_BUILD_ROOT{%{_libdir}/nut,%{_includedir}}
 
-%{__make} install \
-       DESTDIR=$RPM_BUILD_ROOT \
-       CGIPATH=/home/httpd/cgi-bin
+%{__make} install install-cgi \
+       DESTDIR=$RPM_BUILD_ROOT
 
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ups
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ups
 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/upsmon
-install conf/ups.conf $RPM_BUILD_ROOT%{_sysconfdir}/ups.conf
 
-install clients/upsfetch.o $RPM_BUILD_ROOT%{_libdir}
-install clients/upsfetch.h $RPM_BUILD_ROOT%{_includedir}
+rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/*
+install -m644 conf/*.users conf/*.conf $RPM_BUILD_ROOT%{_sysconfdir}
 
-gzip -9nf CREDITS README docs/{FAQ,Changes*,*.txt,cables/*}
+install -m644 clients/upsfetch.o $RPM_BUILD_ROOT%{_libdir}
+install -m644 clients/upsfetch.h $RPM_BUILD_ROOT%{_includedir}
+
+ln -s %{_libdir}/nut/upsdrvctl $RPM_BUILD_ROOT%{_sbindir}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-#%pre
-#if [ -n "`id -u ups 2>/dev/null`" ]; then
-#      if [ "`id -u ups`" != "68" ]; then
-#              echo "Warning: user ups does not have uid=68. Correct this before installing NUT" 1>&2
-#              exit 1
-#      fi
-#else
-#       /usr/sbin/useradd -u 68 -r -d /var/lib/ups -s /bin/sh -c "Network UPS Tools User" -g ttyS ups 1>&2
-#fi
-
 %post
 /sbin/chkconfig --add ups
 if [ -f /var/lock/subsys/ups ]; then
@@ -156,11 +151,6 @@ if [ "$1" = "0" ]; then
        /sbin/chkconfig --del ups
 fi
 
-#%postun
-#if [ "$1" = "0" ]; then
-#      userdel ups 2>&1
-#fi
-
 %preun client
 if [ "$1" = "0" ]; then
        if [ -f /var/lock/subsys/upsmon ]; then
@@ -171,14 +161,15 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%doc *.gz docs/{,cables}/*.gz
+%doc NEWS README CHANGES CREDITS docs/*
 %attr(755,root,root) %{_bindir}/upscmd
-%attr(755,root,root) %{_sbindir}/upsd
 %attr(755,root,root) %{_bindir}/upslog
+%attr(755,root,root) %{_sbindir}/upsdrvctl
+%attr(755,root,root) %{_sbindir}/upsd
 %config(noreplace) /etc/sysconfig/ups
 %attr(754,root,root) /etc/rc.d/init.d/ups
 %attr(640,root,root) %config(noreplace) %{_sysconfdir}/upsd.conf
-%attr(640,root,root) %config(noreplace) %{_sysconfdir}/ups.conf
+%attr(640,root,nobody) %config(noreplace) %{_sysconfdir}/ups.conf
 %attr(640,root,root) %config(noreplace) %{_sysconfdir}/upsd.users
 %{_mandir}/man5/*
 %{_mandir}/man8/*
@@ -200,7 +191,7 @@ fi
 
 %files cgi
 %defattr(644,root,root,755)
-%attr(755,root,root) /home/httpd/cgi-bin/*.cgi
+%attr(755,root,root) /home/services/httpd/cgi-bin/*.cgi
 %config(noreplace) %{_sysconfdir}/hosts.conf
 %config(noreplace) %{_sysconfdir}/multimon.conf
 %config(noreplace) %{_sysconfdir}/upsset.conf
index d8b265e55adb85f99a7089078e37b1c6ed47cb4b..ba3f4daac8a9715adec563cd3ea1b142ce16f4ae 100644 (file)
@@ -7,18 +7,3 @@ TCP_PORT=""
 # bind to this address only
 BIND_ADDRESS=""
 
-# start UPS drivers
-ups_start() {
-       # /usr/lib/nut/apcsmart /dev/ttyS1
-}
-
-# stop ups drivers
-ups_stop() {
-       # killproc apcsmart
-}
-
-# display some status info
-ups_status() {
-       # status apcsmart
-       # upsc localhost
-}
This page took 0.756093 seconds and 4 git commands to generate.