1 diff -urN epic4-1.2.9.org/bsdinstall epic4-1.2.9/bsdinstall
2 --- epic4-1.2.9.org/bsdinstall 2004-06-13 22:24:06.122067584 +0200
3 +++ epic4-1.2.9/bsdinstall 2004-06-13 22:24:14.876736672 +0200
8 -# @(#)install.sh 4.5 (Berkeley) 10/12/83
9 +# install - install a program, script, or datafile
10 +# This comes from X11R5 (mit/util/scripts/install.sh).
14 -chmod="/bin/chmod 755"
19 - -s ) strip="/bin/strip"
22 - -c ) cmd="/bin/cp -p"
25 - -m ) chmod="/bin/chmod $2"
29 - -o ) chown="/etc/chown -f $2"
33 - -g ) chgrp="/bin/chgrp -f $2"
37 - -d ) cmd="/bin/mkdir"
43 +# Copyright 1991 by the Massachusetts Institute of Technology
45 +# Permission to use, copy, modify, distribute, and sell this software and its
46 +# documentation for any purpose is hereby granted without fee, provided that
47 +# the above copyright notice appear in all copies and that both that
48 +# copyright notice and this permission notice appear in supporting
49 +# documentation, and that the name of M.I.T. not be used in advertising or
50 +# publicity pertaining to distribution of the software without specific,
51 +# written prior permission. M.I.T. makes no representations about the
52 +# suitability of this software for any purpose. It is provided "as is"
53 +# without express or implied warranty.
55 +# Calling this script install-sh is preferred over install.sh, to prevent
56 +# `make' implicit rules from creating a file called install from it
57 +# when there is no Makefile.
59 +# This script is compatible with the BSD install script, but was written
60 +# from scratch. It can only install one file at a time, a restriction
61 +# shared with many OS's install programs.
64 +# set DOITPROG to echo to test this script
66 +# Don't use :- since 4.3BSD and earlier shells don't like it.
70 +# put in absolute paths if you don't have them in your path; or use env. vars.
72 +mvprog="${MVPROG-mv}"
73 +cpprog="${CPPROG-cp}"
74 +chmodprog="${CHMODPROG-chmod}"
75 +chownprog="${CHOWNPROG-chown}"
76 +chgrpprog="${CHGRPPROG-chgrp}"
77 +stripprog="${STRIPPROG-strip}"
78 +rmprog="${RMPROG-rm}"
79 +mkdirprog="${MKDIRPROG-mkdir}"
84 +chmodcmd="$chmodprog 0755"
94 +while [ x"$1" != x ]; do
96 + -c) instcmd="$cpprog"
104 + -m) chmodcmd="$chmodprog $2"
109 + -o) chowncmd="$chownprog $2"
114 + -g) chgrpcmd="$chgrpprog $2"
119 + -s) stripcmd="$stripprog"
123 + -t=*) transformarg=`echo $1 | sed 's/-t=//'`
127 + -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
131 + *) if [ x"$src" = x ]
135 + # this colon is to work around a 386BSD /bin/sh bug
144 -if test ! ${2-""}; then
145 - echo "install: no destination specified"
148 + echo "install: no input file specified"
153 -if test ${3-""}; then
154 - echo "install: too many files specified -> $*"
157 -if test $1 = $2 -o $2 = .; then
158 - echo "install: can't move $1 onto itself"
166 - if test '!' -f $1; then
167 - echo "install: can't open $1"
170 +if [ x"$dir_arg" != x ]; then
174 + if [ -d $dst ]; then
180 - if test -d $2; then
184 +# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
185 +# might cause directories to be created, which would be especially bad
186 +# if $src (and thus $dsttmp) contains '*'.
188 + if [ -f $src -o -d $src ]
193 + echo "install: $src does not exist"
202 - if test ! -d "$file"; then
208 - if test -n "$strip"; then
213 + echo "install: no destination specified"
221 -if test -n "$chown"; then
223 +# If destination is a directory, append the input filename; if your system
224 +# does not like double slashes in filenames, you may need to add some logic
228 + dst="$dst"/`basename $src`
233 -if test -n "$chgrp"; then
236 +## this sed command emulates the dirname command
237 +dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
239 +# Make sure that the destination directory exists.
240 +# this part is taken from Noah Friedman's mkinstalldirs script
242 +# Skip lots of stat calls in the usual case.
243 +if [ ! -d "$dstdir" ]; then
246 +IFS="${IFS-${defaultIFS}}"
249 +# Some sh's can't handle IFS=/ for some reason.
251 +set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
256 +while [ $# -ne 0 ] ; do
257 + pathcomp="${pathcomp}${1}"
260 + if [ ! -d "${pathcomp}" ] ;
262 + $mkdirprog "${pathcomp}"
267 + pathcomp="${pathcomp}/"
272 +if [ x"$dir_arg" != x ]
274 + $doit $instcmd $dst &&
276 + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
277 + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
278 + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
279 + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
282 +# If we're going to rename the final executable, determine the name now.
284 + if [ x"$transformarg" = x ]
286 + dstfile=`basename $dst`
288 + dstfile=`basename $dst $transformbasename |
289 + sed $transformarg`$transformbasename
292 +# don't allow the sed command to completely eliminate the filename
294 + if [ x"$dstfile" = x ]
296 + dstfile=`basename $dst`
301 +# Make a temp file name in the proper directory.
303 + dsttmp=$dstdir/#inst.$$#
305 +# Move or copy the file name to the temp name
307 + $doit $instcmd $src $dsttmp &&
309 + trap "rm -f ${dsttmp}" 0 &&
311 +# and set any options; do chmod last to preserve setuid bits
313 +# If any of these fail, we abort the whole thing. If we want to
314 +# ignore errors from any of these, just make sure not to ignore
315 +# errors from the above "$doit $instcmd $src $dsttmp" command.
317 + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
318 + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
319 + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
320 + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
322 +# Now rename the file to the real destination.
324 + $doit $rmcmd -f $dstdir/$dstfile &&
325 + $doit $mvcmd $dsttmp $dstdir/$dstfile
331 diff -urN epic4-1.2.9.org/Makefile.in epic4-1.2.9/Makefile.in
332 --- epic4-1.2.9.org/Makefile.in 2004-06-13 22:24:06.120067888 +0200
333 +++ epic4-1.2.9/Makefile.in 2004-06-13 22:25:43.489265520 +0200
338 -epic_exe = $(bindir)/$(epic)
339 -wserv_exe = $(libexecdir)/wserv4
340 -epicdir = $(sharedir)/$(epic)
345 ############ You ought not change anything below this line ###################
347 @@ -111,23 +111,12 @@
348 epic: source/Makefile Makefile
349 @cd source; $(MAKE2) all
351 -EPIC = $(epic_exe)-$(VERSION)
353 EPIC_OLD = $(epic_exe).old
354 EPIC_LINK = $(epic_exe)
355 installepic installirc: epic installdirs test
356 - if ./my_test \( ! -f $(IP)$(EPIC) \) \
357 - -o source/epic -nt $(IP)$(EPIC); then \
358 - $(INSTALL_PROGRAM) source/epic $(IP)$(EPIC); \
359 - if ./my_test -f $(IP)$(EPIC_OLD); then \
360 - $(RM) $(IP)$(EPIC_OLD); \
362 - if ./my_test -f $(IP)$(EPIC_LINK); then \
363 - $(MV) $(IP)$(EPIC_LINK) $(IP)$(EPIC_OLD); \
365 - $(RM) $(IP)$(EPIC_LINK); \
366 - ln -s $(IP)$(EPIC) $(IP)$(EPIC_LINK); \
369 + $(INSTALL_PROGRAM) source/epic $(DESTDIR)$(bindir)
374 @@ -136,19 +125,16 @@
377 installwserv: wserv4 installdirs test
378 - if ./my_test \( \! -f $(IP)$(WSERV) \) -o \
379 - source/wserv4 -nt $(IP)$(WSERV); then \
380 - $(INSTALL_PROGRAM) source/wserv4 $(IP)$(WSERV); \
384 + @srcdir@/mkinstalldirs $(DESTDIR)$(bindir)
385 + $(INSTALL_PROGRAM) source/wserv4 $(DESTDIR)$(bindir)
390 scriptdir = $(epicdir)/script
391 installscript: installdirs test
393 - if ./my_test -f $(IP)$(scriptdir)/local; then \
394 + if ./my_test -f $(DESTDIR)$(scriptdir)/local; then \
395 if ./my_test -f script/local; then \
396 $(MV) @srcdir@/script/local \
397 @srcdir@/script/local.orig; \
399 if ./my_test -x $$i; then \
402 - target=$(IP)$(scriptdir)/`basename $$i`; \
403 + target=$(DESTDIR)$(scriptdir)/`basename $$i`; \
404 if ./my_test -f $$target; then \
405 if ./my_test $$i -nt $$target; then \
406 $(INSTALL_DATA) $$i $$target; \
410 $(INSTALL_DATA) $$i $$target; \
411 - if ./my_test -f $(IP)$(scriptdir)/gzip-scripts; then \
412 + if ./my_test -f $(DESTDIR)$(scriptdir)/gzip-scripts; then \
416 @@ -183,19 +169,19 @@
417 helpdir = $(epicdir)/help
418 installhelp: installdirs
419 if ./my_test -d help ; then \
420 - (cd @srcdir@/help; tar cf - .) | (cd $(IP)$(helpdir); tar xf -) ; \
421 + (cd @srcdir@/help; tar cf - .) | (cd $(DESTDIR)$(helpdir); tar xf -) ; \
423 echo No help files to install. ; \
426 installman: installdirs
427 - $(INSTALL_DATA) @srcdir@/doc/epic.1 $(IP)/$(mandir)/man1/$(epic).1
428 + $(INSTALL_DATA) @srcdir@/doc/epic.1 $(DESTDIR)/$(mandir)/man1/$(epic).1
432 - @srcdir@/mkinstalldirs $(IP)$(epicdir) $(IP)$(scriptdir) \
433 - $(IP)$(helpdir) $(IP)$(bindir) $(IP)$(libexecdir) \
434 - $(IP)$(mandir)/man1
435 + @srcdir@/mkinstalldirs $(DESTDIR)$(epicdir) $(DESTDIR)$(scriptdir) \
436 + $(DESTDIR)$(helpdir) $(DESTDIR)$(bindir) $(DESTDIR)$(libexecdir) \
437 + $(DESTDIR)$(mandir)/man1
439 test.o: @srcdir@/test.c
440 $(CC) -c @srcdir@/test.c