#!/bin/sh # test we are root if [ "$(id -u)" != "0" ]; then echo "run as root now exitting" exit 1 fi # build order is libfm-extra-dev menu-cache libfm pcmanfm, can build after libfm-extra without reboot CFLAGS="-march=i486 -mtune=i686 -Os -pipe " CXXFLAGS="-march=i486 -mtune=i686 -Os -pipe -fno-exceptions -fno-rtti " echo $CFLAGS && echo $CXXFLAGS P=menu-cache V=1.1.0 SRC=$P-$V USER=`cat /etc/sysconfig/tcuser` LIST="compiletc submitqc libfm-extra-dev " for Z in $LIST do su -c "tce-load -i $Z" $USER done # list may be larger than loaded cd /usr/local/lib rm -rf *.la rm -rf gcc/i486-pc-linux-gnu/12.2.0/plugin/libcp1plugin.la rm -rf gcc/i486-pc-linux-gnu/12.2.0/plugin/libcc1plugin.la rm -rf gcc/i486-pc-linux-gnu/12.2.0/liblto_plugin.la cd /tmp rm -rf /usr/lib/*.la find / -name *.la LFS=http://www.linuxfromscratch.org/patches/blfs/svn su -c "/usr/local/bin/wget -nc --no-check-certificate \ https://sourceforge.net/projects/lxde/files/$P/1.1/$SRC.tar.xz \ $LFS/menu-cache-1.1.0-consolidated_fixes-1.patch " $USER tar xvf $SRC.tar.xz cd $SRC patch -Np1 -i ../menu-cache-1.1.0-consolidated_fixes-1.patch ./configure --prefix=/usr/local --disable-static --enable-debug=no # checking if gcc supports -fno-rtti -fno-exceptions... no make check # about 10 seconds make install-strip DESTDIR=/tmp/$P cd /tmp # dev ##### mkdir -p $P-dev/usr/local/lib/ mv $P/usr/local/include $P-dev/usr/local/ mv $P/usr/local/lib/pkgconfig $P-dev/usr/local/lib/ # main ####### mkdir -p $P/usr/local/share/doc/$P echo 'LGPL v2.1' > $P/usr/local/share/doc/$P/COPYING rm -rf $P/usr/local/lib/libmenu-cache.la # TCZ them ########### LIST="$P $P-dev " for Z in $LIST do mksquashfs $Z $Z.tcz md5sum $Z.tcz > $Z.tcz.md5.txt cd $Z find usr -not -type d > /tmp/$Z.tcz.list sed 's|usr|/usr|g' -i /tmp/$Z.tcz.list cd /tmp done ls -hal echo 'Title: menu-cache-dev.tcz Description: dev files Version: 1.1.0 Author: https://github.com/lxde/menu-cache/blob/master/AUTHORS patch author=Pierre Labastie Original-site: https://sourceforge.net/projects/lxde/files/menu-cache/ Copying-policy: LGPL v2.1 Size: 4.0K Extension_by: aus9 Tags: pcmanfm Comments: Dev files Change-log: 2015/07/05 v 0.6.0 (bmarkus) 2015/09/01 v 0.7.0 on 6.x (gordon64) Current: 2023/08/20 v 1.1.0 on 14.x (aus9) ' > $P-dev.tcz.info echo 'menu-cache.tcz libfm-extra-dev.tcz '> $P-dev.tcz.dep echo 'Title: menu-cache.tcz Description: menu cache Library Version: 1.1.0 Author: see https://github.com/lxde/menu-cache/blob/master/AUTHORS Original-site: https://sourceforge.net/projects/lxde/files/menu-cache/ Copying-policy: LGPL v2.1 Size: 56K Extension_by: aus9 Tags: pcmanfm Comments: A library to speed up the manipulation for freedesktop.org defined application menus Change-log: 2015/07/05 v 0.6.0 (bmarkus) 2015/09/01 v 0.7.0 on 6.x (gordon64) Current: 2023/08/20 v 1.1.0 on 14.x (aus9) ' > $P.tcz.info readelf -d $P/usr/local/lib/libmenu-cache.so | grep 'NEEDED' # [libgio-2.0.so.0][libgobject-2.0.so.0][libglib-2.0.so.0]glib2 echo 'glib2.tcz '> $P.tcz.dep