summaryrefslogtreecommitdiffstats
path: root/lang/fpc/pkg-install
blob: 36c515e8ec43e3641cf6ef379f950f4c7b823974 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/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
OpenPOWER on IntegriCloud