recipes: optimize lzlib and plzip
[dragora.git] / stages / 1 / 18-symlinks
blob4f99d7e80443c2488dac1cb7ebfe84e113969d4c
1 # Build script for essential symlinks.
3 # Copyright (c) 2014-2019 Matias Fonzo, <selk@dragora.org>.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 #    http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 # Essential symbolic links for rootdir
19 # Binaries
20 for file in awk bash cat dd echo env file grep ln ls pwd rm sed sh stty
22     ln -sf "/tools/bin/${file}" "${rootdir}/bin"
23 done
25 ln -sf gcc                 /tools/bin/cc
26 ln -sf /tools/bin/perl     "${rootdir}/usr/bin"
27 ln -sf /tools/bin/install  "${rootdir}/usr/bin"
28 ln -sf /proc/self/mounts   "${rootdir}/etc/mtab"
30 # Libraries
31 ln -sf /tools/lib${libSuffix}/libgcc_s.so         "${rootdir}/usr/lib${libSuffix}"
32 ln -sf /tools/lib${libSuffix}/libgcc_s.so.1       "${rootdir}/usr/lib${libSuffix}"
34 ln -sf /tools/lib${libSuffix}/libstdc++.so        "${rootdir}/usr/lib${libSuffix}"
35 ln -sf /tools/lib${libSuffix}/libstdc++.so.6      "${rootdir}/usr/lib${libSuffix}"
36 ln -sf /tools/lib${libSuffix}/libstdc++.a         "${rootdir}/usr/lib${libSuffix}"
38 ln -sf /tools/lib${libSuffix}/libssp.so           "${rootdir}/usr/lib${libSuffix}"
39 ln -sf /tools/lib${libSuffix}/libssp.so.0         "${rootdir}/usr/lib${libSuffix}"
40 ln -sf /tools/lib${libSuffix}/libssp.so.0.0.0     "${rootdir}/usr/lib${libSuffix}"
41 ln -sf /tools/lib${libSuffix}/libssp.a            "${rootdir}/usr/lib${libSuffix}"
42 ln -sf /tools/lib${libSuffix}/libssp_nonshared.a  "${rootdir}/usr/lib${libSuffix}"
44 # Strip temporary prefix
45 for file in libstdc++.la libssp.la libssp_nonshared.la
47     sed -e 's/tools/usr/' /tools/lib${libSuffix}/$file \
48      > "${rootdir}/usr/lib${libSuffix}/$file"
49 done
50 unset file