mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-19 03:52:17 +00:00
c05f72127c
post-extract instead of pre-install o Handle per installation transient files in PKG{,DE}INSTALL instead of PLIST o Do not install corrupted binary o Do not @ prefix inside PKG{,DE}INSTALL PR: 32645 Submitted by: Kuang-che Wu <kcwu@ck.tp.edu.tw> (PR), maintainer (most of the fix)
44 lines
634 B
Bash
44 lines
634 B
Bash
#!/bin/sh
|
|
# $FreeBSD$
|
|
|
|
[ $# != 2 ] && exit 1
|
|
PKGNAME=$1
|
|
ACTION=$2
|
|
|
|
FILES_DELETE="bin/ppc386 etc/ppc386.cfg etc/ppc386.cfg.orig"
|
|
|
|
LIBDIR=${PKG_PREFIX}/lib/fpc/${PKGNAME##fpc-}
|
|
|
|
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
|