]> git.pld-linux.org Git - packages/apcupsd.git/blob - apcupsd-configure.patch
- new, to build usb driver with llh > 2.6.5.0-1
[packages/apcupsd.git] / apcupsd-configure.patch
1 diff -urN apcupsd-3.10.13.orig/autoconf/acconfig.h apcupsd-3.10.13.new/autoconf/acconfig.h
2 --- apcupsd-3.10.13.orig/autoconf/acconfig.h    2004-04-16 15:18:42.000000000 +0200
3 +++ apcupsd-3.10.13.new/autoconf/acconfig.h     2004-05-22 15:54:12.854409808 +0200
4 @@ -97,6 +97,10 @@
5  /* Define the default "log" files directory. */
6  #undef LOGDIR
7  
8 +/* Define the default "status" files directory. */
9 +#undef STATDIR
10 +
11 +
12  /* Define the default serial port lock directory */
13  #undef LOCKDIR
14  
15 diff -urN apcupsd-3.10.13.orig/autoconf/configure.in apcupsd-3.10.13.new/autoconf/configure.in
16 --- apcupsd-3.10.13.orig/autoconf/configure.in  2004-04-16 20:14:57.000000000 +0200
17 +++ apcupsd-3.10.13.new/autoconf/configure.in   2004-05-22 19:09:30.116115272 +0200
18 @@ -1196,16 +1196,25 @@
19  # Find the default directory to put the root-mode PID file in
20  for PIDDIR in "/var/run" "/etc/apcupsd"
21  do
22 -       if test -d $PIDDIR 
23 +       if test -d $PIDDIR
24         then
25                 break;
26         fi
27  done
28  
29 -# Find the default directory to put the apcupsd.events and apcupsd.status files
30 +# Find the default directory to put the apcupsd.events file
31  for LOGDIR in "/var/log" "/etc/apcupsd"
32  do
33 -       if test -d $LOGDIR 
34 +       if test -d $LOGDIR
35 +       then
36 +               break;
37 +       fi
38 +done
39 +
40 +# Find the default directory to put the apcupsd.status file
41 +for STATDIR in "/var/log" "/etc/apcupsd" "/var/lib/apcupsd"
42 +do
43 +       if test -d $STATDIR
44         then
45                 break;
46         fi
47 @@ -1504,11 +1513,18 @@
48  )
49  # now allow user to specify LOGDIR
50  AC_ARG_WITH(log-dir,
51 -    [  --with-log-dir=DIR      Specify EVENTS and STATUS directory (default is OS dependent)],
52 +    [  --with-log-dir=DIR      Specify EVENTS directory (default is OS dependent)],
53      [
54         LOGDIR="$withval";
55      ]
56  )
57 +# now allow user to specify STATDIR
58 +AC_ARG_WITH(stat-dir,
59 +    [  --with-stat-dir=DIR     Specify STATUS directory (default is OS dependent)],
60 +    [
61 +       STATDIR="$withval";
62 +    ]
63 +)
64  # now allow user to specify LOCKDIR
65  AC_ARG_WITH(lock-dir,
66      [  --with-lock-dir=DIR     Specify serial port lock directory (default is OS dependent)],
67 @@ -1582,6 +1598,8 @@
68  AC_SUBST(PIDDIR)
69  AC_DEFINE_UNQUOTED(LOGDIR, "$LOGDIR")
70  AC_SUBST(LOGDIR)
71 +AC_DEFINE_UNQUOTED(STATDIR, "$STATDIR")
72 +AC_SUBST(STATDIR)
73  AC_DEFINE_UNQUOTED(NOLOGDIR, "$nologdir")
74  AC_SUBST(nologdir)
75  AC_DEFINE_UNQUOTED(PWRFAILDIR, "$PWRFAILDIR")
76 @@ -1742,7 +1760,8 @@
77    Install man files:         ${mandir}
78    Nologin file in:           ${nologdir}
79    PID directory:             ${PIDDIR}
80 -  LOG dir (events, status)    ${LOGDIR}
81 +  LOG dir (events)            ${LOGDIR}
82 +  STATUS dir (status)         ${STATDIR}
83    LOCK dir (for serial port)  ${LOCKDIR}
84    Power Fail dir             ${PWRFAILDIR}
85    Compiler:                  ${CC} ${CCVERSION}
86 diff -urN apcupsd-3.10.13.orig/platforms/etc/apcupsd.conf.in apcupsd-3.10.13.new/platforms/etc/apcupsd.conf.in
87 --- apcupsd-3.10.13.orig/platforms/etc/apcupsd.conf.in  2003-11-26 16:54:47.000000000 +0100
88 +++ apcupsd-3.10.13.new/platforms/etc/apcupsd.conf.in   2004-05-22 19:11:36.654878456 +0200
89 @@ -217,7 +217,7 @@
90  STATTIME 0
91  #
92  # Location of STATUS file (written to only if STATTIME is non-zero)
93 -STATFILE @LOGDIR@/apcupsd.status
94 +STATFILE @STATDIR@/apcupsd.status
95  #
96  #
97  # LOGSTATS [ on | off ] on enables, off disables
This page took 0.061245 seconds and 3 git commands to generate.