1996-10-10 15:00:53 +00:00
|
|
|
#! /bin/sh
|
|
|
|
#
|
1998-10-01 18:38:06 +00:00
|
|
|
# $Id: build,v 1.6 1998/03/20 09:28:16 markm Exp $
|
1996-10-10 15:00:53 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
VERSION="`sed -ne 's/^set vers \(.*\)/\1/p' ${WRKSRC}/exmh.install`"
|
|
|
|
DATE="`sed -ne 's/^set date \(.*\)/\1/p' ${WRKSRC}/exmh.install`"
|
|
|
|
|
|
|
|
SEDFILE=sed.$$
|
1998-03-20 09:28:16 +00:00
|
|
|
if [ x${USE_NMH} = xYES ] ; then
|
|
|
|
CONFIGFILE=config.nmh
|
|
|
|
else
|
|
|
|
CONFIGFILE=config.mh
|
|
|
|
fi
|
1996-10-10 15:00:53 +00:00
|
|
|
|
|
|
|
EXPECT="{}"
|
1997-08-14 03:44:30 +00:00
|
|
|
EXPECTK="{}"
|
1996-10-10 15:00:53 +00:00
|
|
|
FACES="{}"
|
|
|
|
DOMAIN="{}"
|
|
|
|
PGP="{}"
|
|
|
|
GLIMPSE="{}"
|
|
|
|
PLAY="{}"
|
|
|
|
|
|
|
|
if [ -f ${PREFIX}/bin/expect ]; then
|
|
|
|
EXPECT=${PREFIX}/bin/expect #executable
|
|
|
|
fi
|
1997-07-02 04:59:54 +00:00
|
|
|
if [ -f ${PREFIX}/bin/expectk ]; then
|
|
|
|
EXPECTK=${PREFIX}/bin/expectk #executable
|
|
|
|
fi
|
1996-10-10 15:00:53 +00:00
|
|
|
|
1996-12-31 21:27:03 +00:00
|
|
|
if [ -d ${PREFIX}/share/faces ]; then
|
|
|
|
FACES=${PREFIX}/share/faces #dir
|
1996-10-10 15:00:53 +00:00
|
|
|
shortname="`hostname -s`"
|
1996-12-31 21:27:03 +00:00
|
|
|
domain="`hostname | sed -e s/^${shortname}// -e s/^.// | tr A-Z a-z`"
|
1996-10-10 15:00:53 +00:00
|
|
|
if [ "${domain}" != "" ]; then
|
|
|
|
DOMAIN="{${domain}}"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -f ${PREFIX}/bin/pgp ]; then
|
|
|
|
PGP=${PREFIX}/bin #bindir
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -f ${PREFIX}/bin/glimpse ]; then
|
|
|
|
GLIMPSE=${PREFIX}/bin #bindir
|
|
|
|
fi
|
|
|
|
|
1996-12-31 21:27:03 +00:00
|
|
|
if [ -f ${PREFIX}/bin/rplay ]; then
|
|
|
|
PLAY=${PREFIX}/bin/rplay #executable
|
1996-10-10 15:00:53 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
echo "s@^#!wish@#!${WISH}@" >${SEDFILE}
|
1996-12-31 21:27:03 +00:00
|
|
|
if [ "${EXPECT}" != "{}" ]; then
|
|
|
|
echo "s@^#!expect@#!${EXPECT}@" >>${SEDFILE}
|
|
|
|
fi
|
1996-10-10 15:00:53 +00:00
|
|
|
echo "/^#CONFIGURATION/a\\" >>${SEDFILE}
|
|
|
|
|
1998-03-20 09:28:16 +00:00
|
|
|
sed <${FILESDIR}/${CONFIGFILE} \
|
1996-10-10 15:00:53 +00:00
|
|
|
-e "s+!!PREFIX!!+${PREFIX}+g" \
|
|
|
|
-e "s+!!WISH!!+${WISH}+g" \
|
|
|
|
-e "s+!!EXPECT!!+${EXPECT}+g" \
|
1997-07-02 04:59:54 +00:00
|
|
|
-e "s+!!EXPECTK!!+${EXPECTK}+g" \
|
1996-10-10 15:00:53 +00:00
|
|
|
-e "s+!!FACES!!+${FACES}+g" \
|
|
|
|
-e "s+!!DOMAIN!!+${DOMAIN}+g" \
|
|
|
|
-e "s+!!PGP!!+${PGP}+g" \
|
|
|
|
-e "s+!!GLIMPSE!!+${GLIMPSE}+g" \
|
|
|
|
-e "s+!!PLAY!!+${PLAY}+g" \
|
|
|
|
-e "s+!!VERSION!!+${VERSION}+g" \
|
|
|
|
-e "s+!!DATE!!+${DATE}+g" \
|
1998-10-01 18:38:06 +00:00
|
|
|
| sed -e 's/$/\\/' -e '$ s/.$//' >> ${SEDFILE}
|
1996-10-10 15:00:53 +00:00
|
|
|
|
|
|
|
for i in exmh-async exmh-bg exmh ftp.expect
|
|
|
|
do
|
|
|
|
echo "sed -f ${SEDFILE} < $i.MASTER > $i"
|
|
|
|
sed -f ${SEDFILE} < $i.MASTER > $i
|
|
|
|
done
|
|
|
|
|
|
|
|
rm -f ${SEDFILE}
|
|
|
|
|
1997-08-21 08:09:56 +00:00
|
|
|
echo "cd lib ; echo 'auto_mkindex . *.tcl ; exit' | ${TCLSH}"
|
|
|
|
cd lib ; echo 'auto_mkindex . *.tcl ; exit' | ${TCLSH}
|