summaryrefslogtreecommitdiffstats
path: root/redhat/docker/pclinuxos/genla.sh
diff options
context:
space:
mode:
authorFrançois Andriot <[email protected]>2018-11-27 21:34:48 +0100
committerFrançois Andriot <[email protected]>2018-11-27 21:34:48 +0100
commita615d19df88eb2e989316b480519161945dbc7dc (patch)
tree369970b98042998b86c11024598155e037b76fec /redhat/docker/pclinuxos/genla.sh
parent76a93e0011ade1583a1ec672f33411dfd35454f3 (diff)
downloadtde-packaging-a615d19df88eb2e989316b480519161945dbc7dc.tar.gz
tde-packaging-a615d19df88eb2e989316b480519161945dbc7dc.zip
RPM: merge redhat directory with master branch
Diffstat (limited to 'redhat/docker/pclinuxos/genla.sh')
-rwxr-xr-xredhat/docker/pclinuxos/genla.sh64
1 files changed, 64 insertions, 0 deletions
diff --git a/redhat/docker/pclinuxos/genla.sh b/redhat/docker/pclinuxos/genla.sh
new file mode 100755
index 000000000..ecc7ac98f
--- /dev/null
+++ b/redhat/docker/pclinuxos/genla.sh
@@ -0,0 +1,64 @@
+#!/bin/bash
+
+LIB="$1"
+LIBDIR="$(rpm -E %_libdir)"
+FILENAME="${LIB}.la"
+FILE="${LIBDIR}/${FILENAME}"
+
+if [ -r "${FILE}" ]; then
+ echo "Already exists !!! Abort"
+ exit 1
+fi
+
+LIBLONG="$(echo ${LIBDIR}/${LIB}.so.*.*)"
+LIBSHORT="$(echo ${LIBDIR}/${LIB}.so.?)"
+
+echo "Library: ${LIBLONG} | ${LIBSHORT}"
+
+
+cat <<EOF >/tmp/$LIB.$$
+# ${FILENAME} - a libtool library file
+# Generated by libtool (GNU libtool) 2.4.2
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='${LIBSHORT}'
+
+# Names of this library.
+library_names='${LIBLONG} ${LIBSHORT} ${LIB}.so'
+
+# The name of the static archive.
+old_library='${LIB}.a'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags=''
+
+# Libraries that this one depends upon.
+dependency_libs=' -lm'
+
+# Names of additional weak libraries provided by this library
+weak_library_names=''
+
+# Version information for ${LIB}.
+current=4
+age=2
+revision=0
+
+# Is this an already installed library?
+installed=yes
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=no
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='${LIBDIR}'
+EOF
+
+[ $(whoami) = "root" ] || SUDO="sudo"
+$SUDO mv "/tmp/$LIB.$$" "${FILE}"