]> git.pld-linux.org Git - packages/apcupsd.git/blob - apcupsd-configure.patch
- updated to 3.14.14, adjusted configure patch for current autotools
[packages/apcupsd.git] / apcupsd-configure.patch
1 --- apcupsd-3.14.13/./autoconf/config.h.in~     2015-01-02 19:12:47.000000000 +0200
2 +++ apcupsd-3.14.13/./autoconf/config.h.in      2015-09-16 16:40:33.785163382 +0300
3 @@ -295,6 +295,9 @@
4  /* Default directory in which log is written */
5  #undef LOGDIR
6  
7 +/* Define the default "status" files directory. */
8 +#undef STATDIR
9 +
10  /* Default port number for NIS server */
11  #undef NISPORT
12  
13 --- apcupsd-3.14.13/autoconf/configure.in~      2015-09-16 16:36:41.000000000 +0300
14 +++ apcupsd-3.14.13/autoconf/configure.in       2015-09-16 16:37:57.190362425 +0300
15 @@ -14,7 +14,7 @@ dnl Config header file.
16  AC_CONFIG_HEADER(include/apcconfig.h:autoconf/config.h.in)
17  
18  topdir=`pwd`
19 -AC_CONFIG_AUX_DIR(${topdir}/autoconf)
20 +AC_CONFIG_AUX_DIR([autoconf])
21  
22  dnl
23  dnl Absolute srcdir
24 @@ -887,9 +887,6 @@ dnl If the AC_CONFIG_AUX_DIR macro for a
25  dnl find the mkinstalldirs script in another subdir than ($topdir).
26  dnl Try to locate it.
27  MKINSTALLDIRS=
28 -if test -n "$ac_aux_dir"; then
29 -   MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
30 -fi
31  if test x$MKINSTALLDIRS = x ; then
32     MKINSTALLDIRS="\$(topdir)/autoconf/mkinstalldirs"
33  fi
34 @@ -1261,16 +1261,25 @@
35  # Find the default directory to put the root-mode PID file in
36  for PIDDIR in "/var/run" "/etc/apcupsd"
37  do
38 -   if test -d $PIDDIR 
39 +   if test -d $PIDDIR
40     then
41        break;
42     fi
43  done
44  
45 -# Find the default directory to put the apcupsd.events and apcupsd.status files
46 +# Find the default directory to put the apcupsd.events file
47  for LOGDIR in "/var/log" "/etc/apcupsd"
48  do
49 -   if test -d $LOGDIR 
50 +   if test -d $LOGDIR
51 +   then
52 +      break;
53 +   fi
54 +done
55 +
56 +# Find the default directory to put the apcupsd.status file
57 +for STATDIR in "/var/log" "/etc/apcupsd" "/var/lib/apcupsd"
58 +do
59 +   if test -d $STATDIR
60     then
61        break;
62     fi
63 @@ -1499,9 +1508,14 @@
64  
65  # now allow user to specify LOGDIR
66  AC_ARG_WITH(log-dir,
67 -    [AC_HELP_STRING([--with-log-dir=DIR], [Specify EVENTS and STATUS directory (default is OS dependent)])],
68 +    [AC_HELP_STRING([--with-log-dir=DIR], [Specify EVENTS directory (default is OS dependent)])],
69      [LOGDIR="$withval";])
70  
71 +# now allow user to specify STATDIR
72 +AC_ARG_WITH(stat-dir,
73 +    [AC_HELP_STRING([--with-stat-dir=DIR], [Specify STATUS directory (default is OS dependent)])],
74 +    [STATDIR="$withval";])
75 +
76  # now allow user to specify LOCKDIR
77  AC_ARG_WITH(lock-dir,
78      [AC_HELP_STRING([--with-lock-dir=DIR], [Specify serial port lock directory (default is OS dependent)])],
79 @@ -1396,6 +1396,8 @@
80  AC_SUBST(LOGDIR)
81  AC_DEFINE_UNQUOTED(NOLOGDIR, "$nologdir", [Default directory in which nologin file is written])
82  AC_SUBST(nologdir)
83 +AC_DEFINE_UNQUOTED(STATDIR, "$STATDIR")
84 +AC_SUBST(STATDIR)
85  AC_DEFINE_UNQUOTED(PWRFAILDIR, "$PWRFAILDIR", [Default directory in which powerfail flag file is written])
86  AC_SUBST(PWRFAILDIR)
87  AC_SUBST(LOCKDIR)
88 @@ -1713,7 +1729,8 @@
89    Install man files:          ${mandir}
90    Nologin file in:            ${nologdir}
91    PID directory:              ${PIDDIR}
92 -  LOG dir (events, status)    ${LOGDIR}
93 +  LOG dir (events)    ${LOGDIR}
94 +  STAT dir (status)    ${STATDIR}
95    LOCK dir (for serial port)  ${LOCKDIR}
96    Power Fail dir              ${PWRFAILDIR}
97    Compiler:                   ${CXX} ${CXXVERSION}
98 --- apcupsd-3.12.1/platforms/etc/apcupsd.conf.in.orig   2005-12-31 00:26:41.000000000 +0100
99 +++ apcupsd-3.12.1/platforms/etc/apcupsd.conf.in        2006-01-24 13:45:20.000000000 +0100
100 @@ -227,7 +227,7 @@
101  STATTIME 0
102  
103  # Location of STATUS file (written to only if STATTIME is non-zero)
104 -STATFILE @LOGDIR@/apcupsd.status
105 +STATFILE @STATDIR@/apcupsd.status
106  
107  # LOGSTATS [ on | off ] on enables, off disables
108  # Note! This generates a lot of output, so if         
This page took 0.06786 seconds and 4 git commands to generate.