summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-05-18 14:21:53 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-05-18 14:21:53 (EDT)
commitae27cbc255615b578207924d3b159e41aadee626 (patch)
treea976e6127c6f175a54b08fc07fb99da5dadce1fd
parenta6cee6c601eba39a5d97cf215ae07ec62f536777 (diff)
g++: Provide g++ and c++ links if host == target.
-rw-r--r--g++.pkg.in/postinst8
-rw-r--r--g++.pkg.in/prerm8
2 files changed, 16 insertions, 0 deletions
diff --git a/g++.pkg.in/postinst b/g++.pkg.in/postinst
new file mode 100644
index 0000000..308d177
--- /dev/null
+++ b/g++.pkg.in/postinst
@@ -0,0 +1,8 @@
+#! /bin/sh
+
+if [ "x${1}" = 'xconfigure' ]; then
+ if [ "x$(cat /etc/proteanos_arch)" = 'x@PKG_TARGET_ARCH@' ]; then
+ ln -sf @PKG_TARGET_ARCH@-g++ /usr/bin/g++
+ update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 20
+ fi
+fi
diff --git a/g++.pkg.in/prerm b/g++.pkg.in/prerm
new file mode 100644
index 0000000..09bd436
--- /dev/null
+++ b/g++.pkg.in/prerm
@@ -0,0 +1,8 @@
+#! /bin/sh
+
+if [ "${1}" = remove ]; then
+ if [ "x$(cat /etc/proteanos_arch)" = 'x@PKG_TARGET_ARCH@' ]; then
+ rm -f /usr/bin/g++
+ update-alternatives --remove c++ /usr/bin/g++
+ fi
+fi