]>
Commit | Line | Data |
---|---|---|
f9d737f9 | 1 | diff -Nru nut-0.44.2/Makefile.in nut-0.44.2.new/Makefile.in |
2 | --- nut-0.44.2/Makefile.in Wed Jan 17 12:06:19 2001 | |
3 | +++ nut-0.44.2.new/Makefile.in Wed Jan 17 12:06:07 2001 | |
4 | @@ -2,11 +2,10 @@ | |
bca7d0b3 | 5 | |
6 | # directory definitions | |
f9d737f9 | 7 | prefix = @prefix@ |
8 | -BASEPATH = $(INSTALLROOT)@prefix@ | |
9 | -CONFPATH = $(INSTALLROOT)@sysconfdir@ | |
10 | -CGIPATH = $(INSTALLROOT)@CGIPATH@ | |
11 | -INSTALLDIRS = $(CONFPATH) $(CGIPATH) $(MODELPATH) $(BASEPATH)/@bindir@ $(BASEPATH)/@sbindir@ $(BASEPATH)/misc | |
12 | -STATEPATH = $(INSTALLROOT)@STATEPATH@ | |
13 | +prefix = @prefix@ | |
14 | +sysconfdir = @sysconfdir@ | |
15 | +CGIPATH = @CGIPATH@ | |
16 | +STATEPATH = @STATEPATH@ | |
17 | ||
18 | SUBDIRS = common models server clients man | |
19 | CFLAGS = -I../include @CFLAGS@ | |
bca7d0b3 | 20 | @@ -40,33 +39,22 @@ |
21 | rm $$i/Makefile; \ | |
22 | done | |
23 | ||
24 | -install: install-dirs | |
bca7d0b3 | 25 | +install: |
f9d737f9 | 26 | @echo Installing in $(BASEPATH)... |
bca7d0b3 | 27 | |
28 | @for i in $(SUBDIRS) conf; do \ | |
29 | - cd $$i; $(MAKE) install; cd ..; \ | |
30 | + cd $$i; $(MAKE) DESTDIR=$(DESTDIR) install; cd ..; \ | |
31 | done | |
32 | ||
33 | -install-dirs: | |
34 | - @for d in $(INSTALLDIRS); do \ | |
35 | - if (test ! -d $$d) then \ | |
36 | - $(INSTALLCMD) -d $$d || exit 1; \ | |
37 | - fi \ | |
38 | - done | |
39 | - | |
40 | - @if (test ! -d $(STATEPATH)) then \ | |
f9d737f9 | 41 | - $(INSTALLCMD) -d -o $(RUNUID) -g $(RUNGID) $(STATEPATH) || exit 1; \ |
bca7d0b3 | 42 | - fi |
43 | - | |
44 | cgi: | |
45 | @cd clients; $(MAKE) cgi; cd ..; | |
46 | ||
47 | -install-cgi: install-dirs | |
48 | +install-cgi: | |
49 | @cd conf; $(MAKE) install; cd ..; | |
50 | - @cd clients; $(MAKE) install-cgi; cd ..; | |
51 | + @cd clients; $(MAKE) DESTDIR=$(DESTDIR) install-cgi; cd ..; | |
52 | ||
53 | -install-misc: install-dirs | |
54 | - @cd clients; $(MAKE) install-misc; cd ..; | |
55 | +install-misc: | |
56 | + @cd clients; $(MAKE) DESTDIR=$(DESTDIR) install-misc; cd ..; | |
57 | ||
58 | # This is only used to set the "official" version before it goes out the door. | |
59 | # | |
f9d737f9 | 60 | diff -Nru nut-0.44.2/clients/Makefile.in nut-0.44.2.new/clients/Makefile.in |
61 | --- nut-0.44.2/clients/Makefile.in Wed Jan 17 12:06:19 2001 | |
62 | +++ nut-0.44.2.new/clients/Makefile.in Wed Jan 17 11:57:35 2001 | |
63 | @@ -1,11 +1,10 @@ | |
64 | # Network UPS Tools: clients | |
65 | ||
66 | # directories | |
67 | -prefix = $(INSTALLROOT)@prefix@ | |
68 | -BASEPATH = $(prefix) | |
69 | -CGIPATH = $(INSTALLROOT)@CGIPATH@ | |
70 | -BINPATH = $(prefix)/@bindir@ | |
71 | -SBINPATH = $(prefix)/@sbindir@ | |
72 | +prefix = @prefix@ | |
73 | +CGIPATH = @CGIPATH@ | |
74 | +bindir = @bindir@ | |
75 | +sbindir = @sbindir@ | |
76 | ||
77 | # other definitions | |
78 | CC = @CC@ | |
79 | @@ -66,18 +65,17 @@ | |
bca7d0b3 | 80 | distclean: clean |
81 | ||
82 | install: all | |
f9d737f9 | 83 | + $(INSTALLCMD) -d $(DESTDIR)$(bindir) |
84 | + $(INSTALLCMD) -d $(DESTDIR)$(sbindir) | |
bca7d0b3 | 85 | @for f in $(PROGS) ; do \ |
f9d737f9 | 86 | - $(INSTALLCMD) -m $(INSTALLMODE) $$f $(BINPATH); \ |
87 | + $(INSTALLCMD) -m $(INSTALLMODE) $$f $(DESTDIR)$(bindir); \ | |
88 | done | |
89 | @for f in $(SPROGS) ; do \ | |
90 | - $(INSTALLCMD) -m $(INSTALLMODE) $$f $(SBINPATH); \ | |
91 | + $(INSTALLCMD) -m $(INSTALLMODE) $$f $(DESTDIR)$(sbindir); \ | |
bca7d0b3 | 92 | done |
93 | ||
94 | install-cgi: cgi | |
95 | + $(INSTALLCMD) -d $(DESTDIR)$(CGIPATH) | |
96 | @for f in $(CGIPROGS) ; do \ | |
97 | - $(INSTALLCMD) -m $(INSTALLMODE) $$f $(CGIPATH); \ | |
98 | + $(INSTALLCMD) -m $(INSTALLMODE) $$f $(DESTDIR)$(CGIPATH); \ | |
99 | done | |
f9d737f9 | 100 | - |
101 | -install-misc: upsfetch.o | |
bca7d0b3 | 102 | - $(INSTALLCMD) upsfetch.h $(BASEPATH)/misc |
103 | - $(INSTALLCMD) upsfetch.o $(BASEPATH)/misc | |
f9d737f9 | 104 | diff -Nru nut-0.44.2/conf/Makefile.in nut-0.44.2.new/conf/Makefile.in |
105 | --- nut-0.44.2/conf/Makefile.in Wed Jan 17 12:06:19 2001 | |
106 | +++ nut-0.44.2.new/conf/Makefile.in Wed Jan 17 11:53:11 2001 | |
107 | @@ -1,8 +1,7 @@ | |
bca7d0b3 | 108 | # Network UPS Tools: conf |
109 | ||
110 | prefix = @prefix@ | |
111 | -BASEPATH = $(INSTALLROOT)@prefix@ | |
112 | -CONFPATH = $(INSTALLROOT)@sysconfdir@ | |
f9d737f9 | 113 | +sysconfdir = @sysconfdir@ |
bca7d0b3 | 114 | INSTALLCMD = @INSTALL@ |
115 | ||
116 | SECFILES = upsmon.conf upsd.conf upsset.passwd | |
f9d737f9 | 117 | @@ -12,18 +11,19 @@ |
bca7d0b3 | 118 | clean: |
119 | ||
120 | install: | |
f9d737f9 | 121 | + $(INSTALLCMD) -d $(DESTDIR)$(sysconfdir) |
bca7d0b3 | 122 | @for f in $(SECFILES) ; do \ |
f9d737f9 | 123 | - if [ -f $(CONFPATH)/$$f ]; then \ |
124 | + if [ -f $(sysconfdir)/$$f ]; then \ | |
bca7d0b3 | 125 | echo "Preserving existing config file: $$f"; \ |
126 | else \ | |
127 | - $(INSTALLCMD) -m 0600 $$f $(CONFPATH); \ | |
f9d737f9 | 128 | + $(INSTALLCMD) -m 0600 $$f $(DESTDIR)$(sysconfdir); \ |
bca7d0b3 | 129 | fi; \ |
130 | done | |
131 | ||
f9d737f9 | 132 | @for f in $(PUBFILES) ; do \ |
133 | - if [ -f $(CONFPATH)/$$f ]; then \ | |
134 | + if [ -f $(sysconfdir)/$$f ]; then \ | |
bca7d0b3 | 135 | echo "Preserving existing config file: $$f"; \ |
136 | else \ | |
137 | - $(INSTALLCMD) -m 0644 $$f $(CONFPATH); \ | |
f9d737f9 | 138 | + $(INSTALLCMD) -m 0644 $$f $(DESTDIR)$(sysconfdir); \ |
bca7d0b3 | 139 | fi; \ |
140 | done | |
f9d737f9 | 141 | diff -Nru nut-0.44.2/man/Makefile.in nut-0.44.2.new/man/Makefile.in |
142 | --- nut-0.44.2/man/Makefile.in Wed Jan 17 12:06:19 2001 | |
143 | +++ nut-0.44.2.new/man/Makefile.in Wed Jan 17 11:54:48 2001 | |
144 | @@ -2,8 +2,8 @@ | |
145 | ||
146 | MAN8_PAGES = powercom.8 apcsmart.8 | |
147 | ||
148 | -prefix = $(INSTALLROOT)@prefix@ | |
149 | -MANDIR = $(INSTALLROOT)@mandir@ | |
150 | +prefix = @prefix@ | |
151 | +mandir = @mandir@ | |
152 | INSTALLCMD = @INSTALL@ | |
153 | INSTALLMODE = 0644 | |
154 | ||
155 | @@ -14,15 +14,7 @@ | |
156 | distclean: clean | |
157 | ||
158 | install: all | |
159 | - | |
160 | - @if (test ! -d $(MANDIR)) then \ | |
161 | - $(INSTALLCMD) -d $(MANDIR) || exit 1;\ | |
162 | - fi | |
163 | - | |
164 | - @if (test ! -d $(MANDIR)/man8) then \ | |
165 | - $(INSTALLCMD) -d $(MANDIR)/man8 || exit 1;\ | |
166 | - fi | |
167 | - | |
168 | + $(INSTALLCMD) -d $(DESTDIR)$(mandir)/man8 | |
169 | @for f in $(MAN8_PAGES) ; do \ | |
170 | - $(INSTALLCMD) -m $(INSTALLMODE) $$f $(MANDIR)/man8; \ | |
171 | + $(INSTALLCMD) -m $(INSTALLMODE) $$f $(DESTDIR)$(mandir)/man8; \ | |
172 | done | |
173 | diff -Nru nut-0.44.2/models/Makefile.in nut-0.44.2.new/models/Makefile.in | |
174 | --- nut-0.44.2/models/Makefile.in Wed Jan 17 12:06:19 2001 | |
175 | +++ nut-0.44.2.new/models/Makefile.in Wed Jan 17 10:41:09 2001 | |
176 | @@ -5,11 +5,11 @@ | |
bca7d0b3 | 177 | PROGS = ups-trust425+625 apcsmart fentonups genericups optiups bestups \ |
f9d737f9 | 178 | victronups ipt-anzen bestfort mustekups engetron belkin powercom \ |
179 | bestuferrups toshiba1500 newapc | |
bca7d0b3 | 180 | -prefix = $(INSTALLROOT)@prefix@ |
181 | +prefix = @prefix@ | |
182 | BASEPATH = $(prefix) | |
183 | INSTALLCMD = @INSTALL@ | |
184 | INSTALLMODE = 0755 | |
185 | -MODELPATH = $(INSTALLROOT)@MODELPATH@ | |
186 | +MODELPATH = @MODELPATH@ | |
f9d737f9 | 187 | LIBOBJ = @LIBOBJ@ ../common/common.o @NETLIBS@ |
bca7d0b3 | 188 | |
189 | all: $(PROGS) | |
f9d737f9 | 190 | @@ -39,10 +39,7 @@ |
bca7d0b3 | 191 | distclean: clean |
192 | ||
193 | install: all | |
194 | - if (test ! -d $(MODELPATH)) then \ | |
195 | - $(INSTALLCMD) -d $(MODELPATH) || exit 1; \ | |
196 | - fi | |
197 | - | |
198 | + $(INSTALLCMD) -d $(DESTDIR)$(MODELPATH) | |
199 | @for f in $(PROGS) ; do \ | |
200 | - $(INSTALLCMD) -m $(INSTALLMODE) $$f $(MODELPATH); \ | |
201 | + $(INSTALLCMD) -m $(INSTALLMODE) $$f $(DESTDIR)$(MODELPATH); \ | |
202 | done | |
f9d737f9 | 203 | diff -Nru nut-0.44.2/server/Makefile.in nut-0.44.2.new/server/Makefile.in |
204 | --- nut-0.44.2/server/Makefile.in Wed Jan 17 12:06:19 2001 | |
205 | +++ nut-0.44.2.new/server/Makefile.in Wed Jan 17 11:55:23 2001 | |
206 | @@ -3,9 +3,8 @@ | |
bca7d0b3 | 207 | CC = @CC@ |
208 | CFLAGS = -I../include @CFLAGS@ | |
209 | PROGS = upsd | |
210 | -prefix = $(INSTALLROOT)@prefix@ | |
f9d737f9 | 211 | -BASEPATH = $(prefix) |
212 | -SBINPATH = $(prefix)/@sbindir@ | |
bca7d0b3 | 213 | +prefix = @prefix@ |
f9d737f9 | 214 | +sbindir = @sbindir@ |
bca7d0b3 | 215 | NETLIBS = @NETLIBS@ |
216 | INSTALLCMD = @INSTALL@ | |
f9d737f9 | 217 | INSTALLMODE = 0755 |
218 | @@ -25,6 +24,7 @@ | |
bca7d0b3 | 219 | distclean: clean |
220 | ||
221 | install: all | |
f9d737f9 | 222 | + $(INSTALLCMD) -d $(DESTDIR)$(sbindir) |
bca7d0b3 | 223 | @for f in $(PROGS) ; do \ |
f9d737f9 | 224 | - $(INSTALLCMD) $$f $(SBINPATH); \ |
225 | + $(INSTALLCMD) $$f $(DESTDIR)$(sbindir); \ | |
bca7d0b3 | 226 | done |