]> git.pld-linux.org Git - packages/epic4.git/blob - epic-DESTDIR.patch
- Don't run autoconf. It's generates a broken configure script.
[packages/epic4.git] / epic-DESTDIR.patch
1 diff -urN epic4-0.9.15.org/Makefile.in epic4-0.9.15/Makefile.in
2 --- epic4-0.9.15.org/Makefile.in        Sun Jan  7 11:39:32 2001
3 +++ epic4-0.9.15/Makefile.in    Sun Jan  7 11:40:30 2001
4 @@ -72,9 +72,9 @@
5  mandir     = @mandir@
6  
7  epic        = @epic@
8 -epic_exe    = $(bindir)/$(epic)
9 -wserv_exe   = $(libexecdir)/wserv
10 -epicdir     = $(sharedir)/$(epic)
11 +epic_exe    = $(epic)
12 +wserv_exe   = wserv
13 +epicdir     = $(epic)
14  
15  ############ You ought not change anything below this line ###################
16  
17 @@ -111,22 +111,11 @@
18  epic: source/Makefile Makefile
19         @cd source; $(MAKE2) all
20  
21 -EPIC     = $(epic_exe)-$(VERSION)
22 +EPIC     = $(epic_exe)
23  EPIC_OLD  = $(epic_exe).old
24  EPIC_LINK = $(epic_exe)
25  installepic installirc: epic installdirs test
26 -       if ./my_test \( ! -f $(IP)$(EPIC) \) \
27 -                       -o source/epic -nt $(IP)$(EPIC); then \
28 -               $(INSTALL_PROGRAM) source/epic $(IP)$(EPIC);    \
29 -               if ./my_test -f $(IP)$(EPIC_OLD); then \
30 -                       $(RM) $(IP)$(EPIC_OLD); \
31 -               fi; \
32 -               if ./my_test -f $(IP)$(EPIC_LINK); then \
33 -                       $(MV) $(IP)$(EPIC_LINK) $(IP)$(EPIC_OLD); \
34 -               fi; \
35 -               $(RM) $(IP)$(EPIC_LINK); \
36 -               ln -s $(IP)$(EPIC) $(IP)$(EPIC_LINK); \
37 -       fi
38 +       $(INSTALL_PROGRAM) source/epic $(DESTDIR)$(bindir)
39  
40  #
41  # wserv
42 @@ -136,11 +125,8 @@
43  
44  WSERV   = $(wserv_exe)
45  installwserv: wserv installdirs test
46 -       if ./my_test \( \! -f $(IP)$(WSERV) \) -o \
47 -                       source/wserv -nt $(IP)$(WSERV); then    \
48 -               $(INSTALL_PROGRAM) source/wserv $(IP)$(WSERV);  \
49 -       fi
50 -
51 +       @srcdir@/mkinstalldirs $(DESTDIR)$(bindir)
52 +       $(INSTALL_PROGRAM) source/wserv $(DESTDIR)$(bindir)
53  
54  #
55  # Script library
56 @@ -148,7 +134,7 @@
57  scriptdir = $(epicdir)/script
58  installscript: installdirs test
59         -@(                                                             \
60 -               if ./my_test -f $(IP)$(scriptdir)/local; then           \
61 +               if ./my_test -f $(DESTDIR)$(scriptdir)/local; then              \
62                         if ./my_test -f script/local; then              \
63                                 $(MV) @srcdir@/script/local             \
64                                         @srcdir@/script/local.orig;     \
65 @@ -157,7 +143,7 @@
66         )
67         for i in @srcdir@/script/*; \
68         do \
69 -               target=$(IP)$(scriptdir)/`basename $$i`; \
70 +               target=$(DESTDIR)$(scriptdir)/`basename $$i`; \
71                 if ./my_test -f $$target; then \
72                         if ./my_test $$i -nt $$target; then \
73                                 $(INSTALL_DATA) $$i $$target; \
74 @@ -172,7 +158,7 @@
75                 elif ./my_test -f $$i; then \
76                         $(INSTALL_DATA) $$i $$target; \
77                         chmod -x $$target; \
78 -                       if ./my_test -f $(IP)$(scriptdir)/gzip-scripts; then \
79 +                       if ./my_test -f $(DESTDIR)$(scriptdir)/gzip-scripts; then \
80                                 gzip -f $$target; \
81                         fi; \
82                 fi; \
83 @@ -180,16 +166,16 @@
84  
85  helpdir   = $(epicdir)/help
86  installhelp: installdirs
87 -       (cd @srcdir@/help; tar cf - .) | (cd $(IP)$(helpdir); tar xf -)
88 +       (cd @srcdir@/help; tar cf - .) | (cd $(DESTDIR)$(helpdir); tar xf -)
89  
90  installman: installdirs
91 -       $(INSTALL_DATA) @srcdir@/doc/epic.1 $(IP)/$(mandir)/man1/$(epic).1
92 +       $(INSTALL_DATA) @srcdir@/doc/epic.1 $(DESTDIR)$(mandir)/man1/$(epic).1
93  
94  installdirs:
95         umask 022; \
96 -       @srcdir@/mkinstalldirs $(IP)$(epicdir) $(IP)$(scriptdir) \
97 -               $(IP)$(helpdir) $(IP)$(bindir) $(IP)$(libexecdir) \
98 -               $(IP)$(mandir)/man1
99 +       @srcdir@/mkinstalldirs $(DESTDIR)$(epicdir) $(DESTDIR)$(scriptdir) \
100 +               $(DESTDIR)$(helpdir) $(DESTDIR)$(bindir) $(DESTDIR)$(libexecdir) \
101 +               $(DESTDIR)$(mandir)/man1
102  
103  test.o: @srcdir@/test.c
104         $(CC) -c @srcdir@/test.c
105 diff -urN epic4-0.9.15.org/bsdinstall epic4-0.9.15/bsdinstall
106 --- epic4-0.9.15.org/bsdinstall Sun Jan  7 11:39:32 2001
107 +++ epic4-0.9.15/bsdinstall     Sun Jan  7 11:39:41 2001
108 @@ -1,90 +1,251 @@
109 -#! /bin/sh
110 +#!/bin/sh
111  #
112 -#      @(#)install.sh  4.5     (Berkeley)      10/12/83
113 +# install - install a program, script, or datafile
114 +# This comes from X11R5 (mit/util/scripts/install.sh).
115  #
116 -cmd=/bin/mv
117 -strip=""
118 -chmod="/bin/chmod 755"
119 -chown=""
120 -chgrp=""
121 -while true ; do
122 -       case $1 in
123 -               -s )    strip="/bin/strip"
124 -                       shift
125 -                       ;;
126 -               -c )    cmd="/bin/cp -p"
127 -                       shift
128 -                       ;;
129 -               -m )    chmod="/bin/chmod $2"
130 -                       shift
131 -                       shift
132 -                       ;;
133 -               -o )    chown="/etc/chown -f $2"
134 -                       shift
135 -                       shift
136 -                       ;;
137 -               -g )    chgrp="/bin/chgrp -f $2"
138 -                       shift
139 -                       shift
140 -                       ;;
141 -               -d )    cmd="/bin/mkdir"
142 -                       shift
143 -                       ;;
144 -               * )     break
145 -                       ;;
146 -       esac
147 +# Copyright 1991 by the Massachusetts Institute of Technology
148 +#
149 +# Permission to use, copy, modify, distribute, and sell this software and its
150 +# documentation for any purpose is hereby granted without fee, provided that
151 +# the above copyright notice appear in all copies and that both that
152 +# copyright notice and this permission notice appear in supporting
153 +# documentation, and that the name of M.I.T. not be used in advertising or
154 +# publicity pertaining to distribution of the software without specific,
155 +# written prior permission.  M.I.T. makes no representations about the
156 +# suitability of this software for any purpose.  It is provided "as is"
157 +# without express or implied warranty.
158 +#
159 +# Calling this script install-sh is preferred over install.sh, to prevent
160 +# `make' implicit rules from creating a file called install from it
161 +# when there is no Makefile.
162 +#
163 +# This script is compatible with the BSD install script, but was written
164 +# from scratch.  It can only install one file at a time, a restriction
165 +# shared with many OS's install programs.
166 +
167 +
168 +# set DOITPROG to echo to test this script
169 +
170 +# Don't use :- since 4.3BSD and earlier shells don't like it.
171 +doit="${DOITPROG-}"
172 +
173 +
174 +# put in absolute paths if you don't have them in your path; or use env. vars.
175 +
176 +mvprog="${MVPROG-mv}"
177 +cpprog="${CPPROG-cp}"
178 +chmodprog="${CHMODPROG-chmod}"
179 +chownprog="${CHOWNPROG-chown}"
180 +chgrpprog="${CHGRPPROG-chgrp}"
181 +stripprog="${STRIPPROG-strip}"
182 +rmprog="${RMPROG-rm}"
183 +mkdirprog="${MKDIRPROG-mkdir}"
184 +
185 +transformbasename=""
186 +transform_arg=""
187 +instcmd="$mvprog"
188 +chmodcmd="$chmodprog 0755"
189 +chowncmd=""
190 +chgrpcmd=""
191 +stripcmd=""
192 +rmcmd="$rmprog -f"
193 +mvcmd="$mvprog"
194 +src=""
195 +dst=""
196 +dir_arg=""
197 +
198 +while [ x"$1" != x ]; do
199 +    case $1 in
200 +       -c) instcmd="$cpprog"
201 +           shift
202 +           continue;;
203 +
204 +       -d) dir_arg=true
205 +           shift
206 +           continue;;
207 +
208 +       -m) chmodcmd="$chmodprog $2"
209 +           shift
210 +           shift
211 +           continue;;
212 +
213 +       -o) chowncmd="$chownprog $2"
214 +           shift
215 +           shift
216 +           continue;;
217 +
218 +       -g) chgrpcmd="$chgrpprog $2"
219 +           shift
220 +           shift
221 +           continue;;
222 +
223 +       -s) stripcmd="$stripprog"
224 +           shift
225 +           continue;;
226 +
227 +       -t=*) transformarg=`echo $1 | sed 's/-t=//'`
228 +           shift
229 +           continue;;
230 +
231 +       -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
232 +           shift
233 +           continue;;
234 +
235 +       *)  if [ x"$src" = x ]
236 +           then
237 +               src=$1
238 +           else
239 +               # this colon is to work around a 386BSD /bin/sh bug
240 +               :
241 +               dst=$1
242 +           fi
243 +           shift
244 +           continue;;
245 +    esac
246  done
247  
248 -if test ! ${2-""}; then
249 -       echo "install: no destination specified"
250 +if [ x"$src" = x ]
251 +then
252 +       echo "install:  no input file specified"
253         exit 1
254 +else
255 +       true
256  fi
257 -if test ${3-""}; then
258 -       echo "install: too many files specified -> $*"
259 -       exit 1
260 -fi
261 -if test $1 = $2 -o $2 = .; then
262 -       echo "install: can't move $1 onto itself"
263 -       exit 1
264 -fi
265 -case $cmd in
266 -/bin/mkdir )
267 -       file=$2/$1
268 -       ;;
269 -* )
270 -       if test '!' -f $1; then
271 -               echo "install: can't open $1"
272 -               exit 1
273 +
274 +if [ x"$dir_arg" != x ]; then
275 +       dst=$src
276 +       src=""
277 +       
278 +       if [ -d $dst ]; then
279 +               instcmd=:
280 +               chmodcmd=""
281 +       else
282 +               instcmd=mkdir
283         fi
284 -       if test -d $2; then
285 -               file=$2/$1
286 +else
287 +
288 +# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
289 +# might cause directories to be created, which would be especially bad 
290 +# if $src (and thus $dsttmp) contains '*'.
291 +
292 +       if [ -f $src -o -d $src ]
293 +       then
294 +               true
295         else
296 -               file=$2
297 +               echo "install:  $src does not exist"
298 +               exit 1
299         fi
300 -       /bin/rm -f $file
301 -       ;;
302 -esac
303 -
304 -case $cmd in
305 -/bin/mkdir )
306 -       if test ! -d "$file"; then
307 -               $cmd $file
308 -       fi
309 -       ;;
310 -* )
311 -       $cmd $1 $file
312 -       if test -n "$strip"; then
313 -               $strip $file
314 +       
315 +       if [ x"$dst" = x ]
316 +       then
317 +               echo "install:  no destination specified"
318 +               exit 1
319 +       else
320 +               true
321         fi
322 -       ;;
323 -esac
324  
325 -if test -n "$chown"; then
326 -       $chown $file
327 +# If destination is a directory, append the input filename; if your system
328 +# does not like double slashes in filenames, you may need to add some logic
329 +
330 +       if [ -d $dst ]
331 +       then
332 +               dst="$dst"/`basename $src`
333 +       else
334 +               true
335 +       fi
336  fi
337 -if test -n "$chgrp"; then
338 -       $chgrp $file
339 +
340 +## this sed command emulates the dirname command
341 +dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
342 +
343 +# Make sure that the destination directory exists.
344 +#  this part is taken from Noah Friedman's mkinstalldirs script
345 +
346 +# Skip lots of stat calls in the usual case.
347 +if [ ! -d "$dstdir" ]; then
348 +defaultIFS='   
349 +'
350 +IFS="${IFS-${defaultIFS}}"
351 +
352 +oIFS="${IFS}"
353 +# Some sh's can't handle IFS=/ for some reason.
354 +IFS='%'
355 +set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
356 +IFS="${oIFS}"
357 +
358 +pathcomp=''
359 +
360 +while [ $# -ne 0 ] ; do
361 +       pathcomp="${pathcomp}${1}"
362 +       shift
363 +
364 +       if [ ! -d "${pathcomp}" ] ;
365 +        then
366 +               $mkdirprog "${pathcomp}"
367 +       else
368 +               true
369 +       fi
370 +
371 +       pathcomp="${pathcomp}/"
372 +done
373  fi
374 -$chmod $file
375 +
376 +if [ x"$dir_arg" != x ]
377 +then
378 +       $doit $instcmd $dst &&
379 +
380 +       if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
381 +       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
382 +       if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
383 +       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
384 +else
385 +
386 +# If we're going to rename the final executable, determine the name now.
387 +
388 +       if [ x"$transformarg" = x ] 
389 +       then
390 +               dstfile=`basename $dst`
391 +       else
392 +               dstfile=`basename $dst $transformbasename | 
393 +                       sed $transformarg`$transformbasename
394 +       fi
395 +
396 +# don't allow the sed command to completely eliminate the filename
397 +
398 +       if [ x"$dstfile" = x ] 
399 +       then
400 +               dstfile=`basename $dst`
401 +       else
402 +               true
403 +       fi
404 +
405 +# Make a temp file name in the proper directory.
406 +
407 +       dsttmp=$dstdir/#inst.$$#
408 +
409 +# Move or copy the file name to the temp name
410 +
411 +       $doit $instcmd $src $dsttmp &&
412 +
413 +       trap "rm -f ${dsttmp}" 0 &&
414 +
415 +# and set any options; do chmod last to preserve setuid bits
416 +
417 +# If any of these fail, we abort the whole thing.  If we want to
418 +# ignore errors from any of these, just make sure not to ignore
419 +# errors from the above "$doit $instcmd $src $dsttmp" command.
420 +
421 +       if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
422 +       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
423 +       if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
424 +       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
425 +
426 +# Now rename the file to the real destination.
427 +
428 +       $doit $rmcmd -f $dstdir/$dstfile &&
429 +       $doit $mvcmd $dsttmp $dstdir/$dstfile 
430 +
431 +fi &&
432 +
433  
434  exit 0
This page took 0.071319 seconds and 3 git commands to generate.