wok rev 25271
created recipe for gcc83-lang
author | Hans-G?nter Theisgen |
---|---|
date | Sun Jul 17 17:44:46 2022 +0100 (2022-07-17) |
parents | 58045f5f09a4 |
children | 11a579233744 |
files | gcc83-lang/receipt |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gcc83-lang/receipt Sun Jul 17 17:44:46 2022 +0100 1.3 @@ -0,0 +1,73 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="gcc83-lib-base" 1.7 +VERSION="8.3.0" 1.8 +CATEGORY="development" 1.9 +SHORT_DESC="GCC base libraries, libgcc_s and libstdc++." 1.10 +WEB_SITE="https://gcc.gnu.org/" 1.11 +MAINTAINER="developer@slitaz.org" 1.12 +LICENSE="GPL2" 1.13 + 1.14 +WANTED="gcc83" 1.15 +PROVIDE="gcc-lib-base" 1.16 + 1.17 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.18 +genpkg_rules() 1.19 +{ 1.20 + mkdir -p $fs/usr/lib $fs/usr/libgcc83 1.21 + for i in $install/usr/libgcc83/libgcc_s.so* ; do 1.22 + cp -a $i $fs/usr/lib/next.$(basename $i) 1.23 + done 1.24 + cp -a $install/usr/libgcc83/libstdc++.so.*.*.* $fs/usr/lib 1.25 + cp -a $install/usr/libgcc83/libstdc++.la $fs/usr/libgcc83 1.26 + ln -s ../lib/libstdc++.so $fs/usr/libgcc83 1.27 + rm -f $fs/usr/lib/*-gdb.py 1.28 +} 1.29 + 1.30 +pre_install() 1.31 +{ 1.32 + cd "$1/usr/lib" 1.33 + local lib=$(ls libstdc++.so.6.*.* 2> /dev/null) 1.34 + [ "$lib" ] && cp -a $lib prev.$lib 1.35 + [ -s libgcc_s.so.1 ] && for i in libgcc_s.so*; do 1.36 + cp -a $i prev.$i 1.37 + done 1.38 + cd - >/dev/null 1.39 +} 1.40 + 1.41 +post_install() 1.42 +{ 1.43 + cd "$1/usr/lib" 1.44 + ln -fs libstdc++.so.6.*.* libstdc++.so.6 1.45 + ln -fs libstdc++.so.6.*.* libstdc++.so 1.46 + for i in next.libgcc_s.so* ; do 1.47 + cp -af $i ${i#next.} 1.48 + done 1.49 + cd - >/dev/null 1.50 +} 1.51 + 1.52 +pre_remove() 1.53 +{ 1.54 + cd "$1/usr/lib" 1.55 + local lib=$(ls prev.libstdc++.so.6.*.* 2> /dev/null) 1.56 + if [ "$lib" ]; then 1.57 + mv -f $lib ${lib#prev.} 1.58 + ln -fs ${lib#prev.} libstdc++.so.6 1.59 + ln -fs ${lib#prev.} libstdc++.so 1.60 + else 1.61 + rm -f libstdc++.so.6 libstdc++.so 1.62 + fi 1.63 + for i in libgcc_s.so* ; do 1.64 + cp -a $i next.$i 1.65 + done 1.66 + cd - >/dev/null 1.67 +} 1.68 + 1.69 +post_remove() 1.70 +{ 1.71 + cd "$1/usr/lib" 1.72 + [ -s prev.libgcc_s.so.1 ] && for i in prev.libgcc_s.so* ; do 1.73 + mv -f $i ${i#prev.} 1.74 + done || rm -f libgcc_s.so* 1.75 + cd - >/dev/null 1.76 +}