blob: 71b12fe17d14cf7b3ce32b449aebb29bccc21ba1 (
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
|
addremvoclib() {
# copied from $(voc-git-repo)/src/tools/make/addlibrary.sh
if ! which ldconfig >/dev/null 2>&1; then exit 0; fi
if test -d /etc/ld.so.conf.d; then
# Linux-like system
# Need to update the ldconfig configuration in the /etc/ld.so.conf.d dir.
if test "$1" = "install"; then
echo $2>/etc/ld.so.conf.d/lib$3.conf
else
rm -f /etc/ld.so.conf.d/lib$3.conf
fi
ldconfig
else
# BSD-like system
# Just run ldconfig -m to update the cache. It'll add-to/update/reove-from
# the cache appropraitely for whether they are present opt not.
ldconfig -m "$2"
fi
}
post_install() {
addremvoclib install /opt/voc/lib voc
}
pre_remove() {
addremvoclib uninstall /opt/voc/lib voc
}
|