From e6254526d26a6c5001e7a7d6bbd9328f8ebf1ab2 Mon Sep 17 00:00:00 2001 From: lioux Date: Mon, 10 Dec 2001 01:50:42 +0000 Subject: o Uphold port style tradition: handle post extraction duties in 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 (PR), maintainer (most of the fix) --- lang/fpc-devel/pkg-install | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'lang/fpc-devel/pkg-install') diff --git a/lang/fpc-devel/pkg-install b/lang/fpc-devel/pkg-install index a41e51a80852..36c515e8ec43 100644 --- a/lang/fpc-devel/pkg-install +++ b/lang/fpc-devel/pkg-install @@ -5,19 +5,31 @@ 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) - @${LN} -sf ${LIBDIR}/ppc386 ${PKG_PREFIX}/bin/ppc386 - @${SH} ${LIBDIR}/samplecfg ${LIBDIR} ${PKG_PREFIX}/etc + ${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) -- cgit