symlinks.include revision 868fa2fe829687343ffae624259930155e16dbd8
1NSS_FILES="libnspr4.so.0d libplds4.so.0d libplc4.so.0d libssl3.so.1d \
2    libnss3.so.1d libsmime3.so.1d libnssutil3.so.1d"
3
4add_nss_symlinks() {
5  get_lib_dir
6  for f in $NSS_FILES
7  do
8    target=$(echo $f | sed 's/\.[01]d$//')
9    if [ -f "/$LIBDIR/$target" ]; then
10      ln -snf "/$LIBDIR/$target" "@@INSTALLDIR@@/$f"
11    elif [ -f "/usr/$LIBDIR/$target" ]; then
12      ln -snf "/usr/$LIBDIR/$target" "@@INSTALLDIR@@/$f"
13    else
14      echo $f not found in "/$LIBDIR/$target" or "/usr/$LIBDIR/$target".
15      exit 1
16    fi
17  done
18}
19
20remove_nss_symlinks() {
21  for f in $NSS_FILES
22  do
23    rm -rf "@@INSTALLDIR@@/$f"
24  done
25}
26
27# Fedora 18 now has libudev.so.1. http://crbug.com/145160
28# Same for Ubuntu 13.04. http://crbug.com/226002
29LIBUDEV_0=libudev.so.0
30LIBUDEV_1=libudev.so.1
31
32add_udev_symlinks() {
33  get_lib_dir
34  if [ -f "/$LIBDIR/$LIBUDEV_0" -o -f "/usr/$LIBDIR/$LIBUDEV_0" -o -f "/lib/$LIBUDEV_0" ]; then
35    return 0
36  fi
37
38  if [ -f "/$LIBDIR/$LIBUDEV_1" ]; then
39    ln -snf "/$LIBDIR/$LIBUDEV_1" "@@INSTALLDIR@@/$LIBUDEV_0"
40  elif [ -f "/usr/$LIBDIR/$LIBUDEV_1" ];
41  then
42    ln -snf "/usr/$LIBDIR/$LIBUDEV_1" "@@INSTALLDIR@@/$LIBUDEV_0"
43  else
44    echo "$LIBUDEV_1" not found in "$LIBDIR" or "/usr/$LIBDIR".
45    exit 1
46  fi
47}
48
49remove_udev_symlinks() {
50  rm -rf "@@INSTALLDIR@@/$LIBUDEV_0"
51}
52