summaryrefslogtreecommitdiff
path: root/precise-armhf-libc-dev
diff options
context:
space:
mode:
Diffstat (limited to 'precise-armhf-libc-dev')
-rwxr-xr-xprecise-armhf-libc-dev/customization/hooks/60-remove_not_needed.binary (renamed from precise-armhf-libc-dev/customization/hooks/90-remove_not_needed.binary)0
-rwxr-xr-xprecise-armhf-libc-dev/customization/hooks/90-change-symlinks-to-relative.binary22
-rwxr-xr-xprecise-armhf-libc-dev/customization/hooks/99-move-to-libc.binary6
3 files changed, 28 insertions, 0 deletions
diff --git a/precise-armhf-libc-dev/customization/hooks/90-remove_not_needed.binary b/precise-armhf-libc-dev/customization/hooks/60-remove_not_needed.binary
index 55a7447..55a7447 100755
--- a/precise-armhf-libc-dev/customization/hooks/90-remove_not_needed.binary
+++ b/precise-armhf-libc-dev/customization/hooks/60-remove_not_needed.binary
diff --git a/precise-armhf-libc-dev/customization/hooks/90-change-symlinks-to-relative.binary b/precise-armhf-libc-dev/customization/hooks/90-change-symlinks-to-relative.binary
new file mode 100755
index 0000000..ec2a448
--- /dev/null
+++ b/precise-armhf-libc-dev/customization/hooks/90-change-symlinks-to-relative.binary
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# Taken from http://bazaar.launchpad.net/~linaro-toolchain-dev/crosstool-ng/linaro/view/head:/contrib/linaro/make-sysroot.sh
+
+sysroot=binary/boot/filesystem.dir
+
+# Some packages include absolute links in sysroot/usr/lib.
+# Convert to relative links instead
+for lib in $( find $sysroot -type l ); do
+ target=$( readlink $lib )
+ base=$( basename $target )
+
+ case $target in
+ /*)
+ v=$( echo $lib | sed -r "s#^$sysroot/##" | tr -cd / | sed "s#/#../#g" )
+ p=$( echo $target | sed "s#^/##" )
+ rm $lib
+ ln -s $v$p $lib
+ ;;
+ *) ;;
+ esac
+done
diff --git a/precise-armhf-libc-dev/customization/hooks/99-move-to-libc.binary b/precise-armhf-libc-dev/customization/hooks/99-move-to-libc.binary
new file mode 100755
index 0000000..bc3b315
--- /dev/null
+++ b/precise-armhf-libc-dev/customization/hooks/99-move-to-libc.binary
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+cd binary
+mkdir libc
+mv boot/filesystem.dir/* libc
+rm -rf boot