#!/bin/sh # test we are root if [ "$(id -u)" != "0" ]; then echo "run as root now exitting" exit 1 fi export CFLAGS="-march=armv8-a+crc -mtune=cortex-a72 -Os -pipe" export CXXFLAGS="-march=armv8-a+crc -mtune=cortex-a72 -Os -pipe -fno-exceptions -fno-rtti" P=numlockx V=1.2 SRC=$P-$V USER=`cat /etc/sysconfig/tcuser` LIST="compiletc submitqc libX11-dev libXtst-dev " for Z in $LIST do su -c "tce-load -i $Z" $USER done # delete any la files just in case TCEs have some, we want none cd /usr/local/lib rm -rf *.la rm -rf gcc/aarch64-unknown-linux-gnu/12.2.0/plugin/*.la rm -rf gcc/aarch64-unknown-linux-gnu/12.2.0/*.la rm -rf gprofng/*.la cd /tmp rm -rf /usr/lib/*.la su -c "/usr/local/bin/wget -nc --no-check-certificate \ https://github.com/rg3/$P/releases/download/$V/$SRC.tar.gz " $USER tar xvf $SRC*gz cd $SRC ./configure --prefix=/usr/local x_includes=/usr/local/include/X11 x_libraries=/usr/local/lib make -j5 # seconds # ignore -> autoheader: not found as we are using configure make install-strip DESTDIR=/tmp/$P cd /tmp # main #### mkdir -p $P/usr/local/share/doc/$P cp $SRC/LICENSE $P/usr/local/share/doc/$P # TCZ them ########### LIST2="$P " for Z in $LIST2 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 cat >> $P.tcz.info << 'EOF' Title: numlockx.tcz Description: tool to turn numlock on/off/toggle Version: 1.2 Author: Lubos Lunak - xkb stuff Oswald Buddenhagen Original-site: https://github.com/rg3/numlockx Copying-policy: accompanied Size: 8.0K Extension_by: aus9 Tags: numpad numlock Comments: Try this please for autostart numlock on $ mkdir $HOME/.X.d # if missing $ echo 'numlockx on' > $HOME/.X.d/numlock Change-log: 2023/05/25 v 1.2 14x aarch64 Current: 2023/05/25 EOF readelf -d $P/usr/local/bin/numlockx | grep 'NEEDED' # [libXtst.so.6] libXtst # [libXext.so.6] libXext # [libX11.so.6] libX11 # [libc.so.6] TCB # [ld-linux-aarch64.so.1] TCB echo 'libXtst.tcz libXext.tcz libX11.tcz' > $P.tcz.dep submitqc --libs