aboutsummaryrefslogtreecommitdiffstats
path: root/java/shujit/pkg-install
blob: 0d02b136245943a2581a10180f8cf2d70c514936 (plain) (blame)
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
#!/bin/sh
#
# $FreeBSD$
#

[ "$2" = "POST-INSTALL" ] || exit 0

linkfile="${PKG_PREFIX}/etc/shujit-links"
:>"${linkfile}"

sed 's/[[:space:]]*#.*//' ${PKG_PREFIX}/etc/javavms | while read vm
do
    case "$vm" in
    *linux*)
    # Linux JDKs are not supported
    ;;
    *)
    java_home="${vm%%/bin/*}"
    case "$java_home" in
    *jdk1.1.8*)
        libdir="${java_home}/lib/i386/green_threads"
        ;;
    *)
        libdir="${java_home}/jre/lib/i386"
        ;;
    esac
    echo "Installing link in ${libdir}"
    ln -fs "${PKG_PREFIX}/lib/libshujit.so" "${libdir}/libshujit.so"
        echo "${libdir}/libshujit.so" >>"${linkfile}"
    ;;
    esac
done