summaryrefslogtreecommitdiffstats
path: root/redhat/genla.sh
diff options
context:
space:
mode:
authorFrançois Andriot <albator78@libertysurf.fr>2014-04-04 21:17:27 +0200
committerFrançois Andriot <albator78@libertysurf.fr>2014-04-04 21:17:27 +0200
commit7b26da834f79b8b6eb2d8e99a1467ffea2791380 (patch)
treef26773747d20d14d82fe43fd5c245d2f9e803eee /redhat/genla.sh
parent61c9cb24d0d3319c8c800fabf1af8153dcabce2c (diff)
downloadtde-packaging-7b26da834f79b8b6eb2d8e99a1467ffea2791380.tar.gz
tde-packaging-7b26da834f79b8b6eb2d8e99a1467ffea2791380.zip
RPM Packaging: update build scripts
Diffstat (limited to 'redhat/genla.sh')
-rwxr-xr-xredhat/genla.sh63
1 files changed, 63 insertions, 0 deletions
diff --git a/redhat/genla.sh b/redhat/genla.sh
new file mode 100755
index 000000000..b909b0601
--- /dev/null
+++ b/redhat/genla.sh
@@ -0,0 +1,63 @@
+#!/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
+
+sudo mv "/tmp/$LIB.$$" "${FILE}"