freebsd-ports/lang/fpc-devel/pkg-install
Sam Lawrance da998a483a Fix pkg-install script (which fixes reported incomplete pkg-plist error).
PR:		ports/85255
Submitted by:	Marco van de Voort <marcov@stack.nl> (maintainer)
2005-10-02 15:03:53 +00:00

44 lines
654 B
Bash

#!/bin/sh
# $FreeBSD$
[ $# != 2 ] && exit 1
PKGNAME=$1
ACTION=$2
FILES_DELETE="bin/ppc386 etc/fpc.cfg etc/fpc.cfg.orig"
LIBDIR=${PKG_PREFIX}/lib/fpc/${PKGNAME##fpc-devel-}
LIBDIR=${LIBDIR%_*}
CHMOD=/bin/chmod
LN=/bin/ln
RM=/bin/rm
SH=/bin/sh
case "$ACTION" in
POST-INSTALL)
${CHMOD} 0555 ${LIBDIR}/ppc386
${CHMOD} 0555 ${LIBDIR}/samplecfg
${LN} -sf ${LIBDIR}/ppc386 ${PKG_PREFIX}/bin/ppc386
${SH} ${LIBDIR}/samplecfg ${LIBDIR} ${PKG_PREFIX}/etc
;;
DEINSTALL)
for file in ${FILES_DELETE}
do
if [ -f ${PKG_PREFIX}/${file} ]; then
${RM} ${PKG_PREFIX}/${file}
fi
done
;;
PRE-INSTALL|POST-DEINSTALL)
;;
*)
exit 1
;;
esac
exit