#!/bin/sh # test we are root if [ "$(id -u)" != "0" ]; then echo "run as root now exitting" exit 1 fi export CFLAGS='-flto=auto -Os -pipe -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp ' export CXXFLAGS='-flto=auto -Os -pipe -fno-exceptions -fno-rtti -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp ' export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig echo $CFLAGS && echo $CXXFLAGS P=leafpad PATCH=0001-fix-format-security-error-from-gcc.patch V=0.8.19 SRC=$P-$V USER=`cat /etc/sysconfig/tcuser` LIST="compiletc squashfs-tools wget gettext perl5 gtk2-dev libtool-dev automake " 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/aarch64-unknown-linux-gnu/12.2.0/plugin/*.la rm -rf gcc/aarch64-unknown-linux-gnu/12.2.0/*.la rm -rf gprofng/*.la rm -rf python3.8/site-packages/*.la rm -rf pkcs11/*.la rm -rf cairo/*.la rm -rf gtk-2.0/modules/*.la rm -rf gtk-2.0/2.10.0/printbackends/*.la rm -rf gtk-2.0/2.10.0/immodules/*.la rm -rf gtk-2.0/2.10.0/engines/*.la rm -rf imlib2/loaders/*.la rm -rf imlib2/filters/*.la rm -rf gdk-pixbuf-2.0/2.10.0/loaders/*.la rm -rf gcc/armv7l-unknown-linux-gnueabihf/12.2.0/plugin/libcp1plugin.la rm -rf gcc/armv7l-unknown-linux-gnueabihf/12.2.0/plugin/libcc1plugin.la rm -rf gcc/armv7l-unknown-linux-gnueabihf/12.2.0/liblto_plugin.la rm -rf pulseaudio/libpulsedsp.la rm -rf pulseaudio/libpulsecore-13.0.la rm -rf pulseaudio/libpulsecommon-13.0.la rm -rf libv4l/v4l2convert.la rm -rf libv4l/v4l1compat.la rm -rf libv4l/plugins/libv4l-mplane.la rm -rf vala-0.46/libvalaccodegen.la cd /tmp rm -rf /usr/lib/*.la find / -name *.la URL=https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/$P/trunk su -c "/usr/local/bin/wget -nc --no-check-certificate \ https://download.savannah.gnu.org/releases/$P/$SRC.tar.gz \ $URL/0001-fix-format-security-error-from-gcc.patch " $USER tar xvf $SRC*gz cd $SRC patch -Np1 < ../$PATCH ./configure --prefix=/usr/local make -j4 # 15S make install-strip DESTDIR=/tmp/$P cd /tmp # locale ######### mkdir -p $P-locale/usr/local/share mv $P/usr/local/share/locale $P-locale/usr/local/share # main ####### APP=$P/usr/local/share/applications/$P.desktop echo 'X-FullPathIcon=/usr/local/share/pixmaps/leafpad.png' >> $APP mkdir -p $P/usr/local/share/doc/$P echo 'GPL v2' > $P/usr/local/share/doc/$P/COPYING rm -rf $P/usr/local/share/man # TCZ them ########### LIST="$P $P-locale " 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: leafpad-locale.tcz Description: leafpad locales Version: 0.8.18.1 Author: Tarot Osuji Original-site: https://github.com/tarot231/leafpad Copying-policy: GPL v2 Size: 104K Extension_by: aus9 Tags: gtk2 text editor Comments: locales untested by me Change-log: 2020/09/06 v 0.8.17 on 12.x Current: 2023/08/05 v 0.8.18.1 on 14.x '> $P-locale.tcz.info echo 'leafpad.tcz' > $P-locale.tcz.dep echo 'Title: leafpad.tcz Description: gtk2 GUI text editor Version: 0.8.18.1 Author: Tarot Osuji Original-site: https://github.com/tarot231/leafpad Copying-policy: GPL v2 Size: 52K Extension_by: aus9 Tags: gtk2 text editor Comments: Supports UTF-8.... Keybindings are: Ctrl-N New ..................Ctrl-O Open Ctrl-S Save............Shift-Ctrl-S Save As Ctrl-W Close.................Ctrl-P Print Ctrl-Q Quit..................Ctrl-Z Undo Shift-Ctrl-Z ................Ctrl-Y Redo Ctrl-X Cut...................Ctrl-C Copy Ctrl-V Paste.................Ctrl-A Select All Ctrl-F Find..........Ctrl-G (or F3) Find Next Shift-Ctrl-G..............Shift-F3) Find Previous Ctrl-H (Ctrl-R) Replace......Ctrl-J Jump To Ctrl-T Always on Top.......Ctrl-Tab toggle tab width Tab with selection bound multi-line indent Shift-Tab with selection bound multi-line unindent online man page https://github.com/tarot231/leafpad/blob/main/data/leafpad.1 Can also print with cups, libcups, hplip or gutenprint depending on whether your printer is driverless Change-log: 2020/09/06 v 0.8.17 on 12.x Current: 2023/08/05 v 0.8.18.1 on 14.x '> $P.tcz.info readelf -d $P/usr/local/bin/$P | grep 'NEEDED' # delete TCBs #[libgtk-x11-2.0.so.0][libgdk-x11-2.0.so.0]gtk2 #[libpangocairo-1.0.so.0][libpangoft2-1.0.so.0][libpango-1.0.so.0]pango gtk2 #[libatk-1.0.so.0]atk gtk2 #[libcairo.so.2]cairo #[libgdk_pixbuf-2.0.so.0]gdk-pixbuf #[libgio-2.0.so.0][libgobject-2.0.so.0][libglib-2.0.so.0]glib2 gtk2 #[libharfbuzz.so.0]harbuzz gtk2 #[libfontconfig.so.1] fontconfig cairo #[libfreetype.so.6] freetype cairo echo 'gtk2.tcz cairo.tcz gdk-pixbuf.tcz ' > $P.tcz.dep