summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
Diffstat (limited to 'data')
-rw-r--r--data/llvm-clang/_metadata/depends1
-rwxr-xr-xdata/llvm-clang/_metadata/postinst22
-rwxr-xr-xdata/llvm-clang/_metadata/prerm20
3 files changed, 43 insertions, 0 deletions
diff --git a/data/llvm-clang/_metadata/depends b/data/llvm-clang/_metadata/depends
new file mode 100644
index 000000000..10ba93442
--- /dev/null
+++ b/data/llvm-clang/_metadata/depends
@@ -0,0 +1 @@
+dpkg (>= 1.18.25-9)
diff --git a/data/llvm-clang/_metadata/postinst b/data/llvm-clang/_metadata/postinst
new file mode 100755
index 000000000..bebc210cd
--- /dev/null
+++ b/data/llvm-clang/_metadata/postinst
@@ -0,0 +1,22 @@
+#!/bin/bash
+LLVMPROGS="ar as bcanalyzer cxxdump cxxfilt diff dlltool dsymutil dwarfdump nm objdump pdbutil profdata ranlib readelf readobj size split strings"
+
+case "$1" in
+ configure)
+ for prog in ${LLVMPROGS}; do
+ update-alternatives --quiet --install /usr/bin/${prog} ${prog} /usr/bin/llvm-${prog} 50
+ done
+ update-alternatives --quiet --install /usr/bin/gcc gcc /usr/bin/clang 50
+ update-alternatives --quiet --install /usr/bin/cpp cpp /usr/bin/clang-cpp 50
+ update-alternatives --quiet --install /usr/bin/g++ g++ /usr/bin/clang++ 50
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
diff --git a/data/llvm-clang/_metadata/prerm b/data/llvm-clang/_metadata/prerm
new file mode 100755
index 000000000..119c2de8f
--- /dev/null
+++ b/data/llvm-clang/_metadata/prerm
@@ -0,0 +1,20 @@
+#!/bin/bash
+LLVMPROGS="ar as bcanalyzer cxxdump cxxfilt diff dlltool dsymutil dwarfdump nm objdump pdbutil profdata ranlib readelf readobj size split strings"
+case "$1" in
+ remove|deconfigure)
+ for prog in ${LLVMPROGS}; do
+ update-alternatives --quiet --remove ${prog} /usr/bin/llvm-${prog}
+ done
+ update-alternatives --quiet --remove gcc /usr/bin/clang
+ update-alternatives --quiet --remove cpp /usr/bin/clang-cpp
+ update-alternatives --quiet --remove g++ /usr/bin/clang++
+ ;;
+ upgrade)
+ ;;
+ failed-upgrade)
+ ;;
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac