1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-06 22:51:41 +00:00
freebsd-ports/mail/exmh2/scripts/build
Peter Wemm e108e11e60 Port for build exmh-1.6.9
NOTE: this does not use the GUI build/install, it does the equivalent
work with some scripts.
1996-10-10 15:00:53 +00:00

69 lines
1.5 KiB
Bash

#! /bin/sh
#
# $Id$
#
VERSION="`sed -ne 's/^set vers \(.*\)/\1/p' ${WRKSRC}/exmh.install`"
DATE="`sed -ne 's/^set date \(.*\)/\1/p' ${WRKSRC}/exmh.install`"
SEDFILE=sed.$$
EXPECT="{}"
FACES="{}"
DOMAIN="{}"
PGP="{}"
GLIMPSE="{}"
PLAY="{}"
if [ -f ${PREFIX}/bin/expect ]; then
EXPECT=${PREFIX}/bin/expect #executable
fi
if [ -f ${PREFIX}/faces/faces ]; then
FACES=${PREFIX}/faces/faces #dir
shortname="`hostname -s`"
domain="`hostname | sed -e s/^${shortname}// -e s/^.//`"
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
if [ -f ${PREFIX}/bin/play ]; then
PLAY=${PREFIX}/bin/play #executable
fi
echo "s@^#!wish@#!${WISH}@" >${SEDFILE}
echo "/^#CONFIGURATION/a\\" >>${SEDFILE}
sed <${FILESDIR}/config \
-e "s+!!PREFIX!!+${PREFIX}+g" \
-e "s+!!WISH!!+${WISH}+g" \
-e "s+!!EXPECT!!+${EXPECT}+g" \
-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" \
| sed -e 's/$/\\/' >> ${SEDFILE}
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}
echo "cd lib ; echo 'auto_mkindex . *.tcl ; exit' | tclsh"
cd lib ; echo 'auto_mkindex . *.tcl ; exit' | tclsh