#!/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 then pcmanfm 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=pcmanfm V=1.3.2 SRC=$P-$V USER=`cat /etc/sysconfig/tcuser` LIST="compiletc submitqc libfm-dev " for Z in $LIST do su -c "tce-load -i $Z" $USER done # list may have more 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 cd /tmp rm -rf /usr/lib/*.la # /etc as same rule for libfm cd /tmp su -c "/usr/local/bin/wget -nc --no-check-certificate \ https://downloads.sourceforge.net/$P/$SRC.tar.xz " $USER tar xvf $P*xz cd $SRC ./configure --prefix=/usr/local --sysconfdir=/etc --with-gtk=2 make check # about 30s 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 # no doc ##### rm -rf $P/usr/local/share/man # no dev ##### rm -rf $P/usr/local/include rm -rf $P/usr/local/lib # main ##### mkdir -p $P/usr/local/share/doc/$P echo 'GPL v2' > $P/usr/local/share/doc/$P/COPYING mkdir -p $P/usr/local/share/pixmaps ICON=/tmp/tcloop/adwaita-icon-theme/usr/local/share/icons/Adwaita/48x48/apps/system-file-manager-symbolic.symbolic.png cp $ICON $P/usr/local/share/pixmaps/pcmanfm.png APP=$P/usr/local/share/applications/$P.desktop echo 'X-FullPathIcon=/usr/local/share/pixmaps/pcmanfm.png' >> $APP sed 's|Utility|Utilities|' -i $APP sed 's|Core;||' -i $APP # gvfs not compiled into libfm so remove its GUI rm -rf $P/usr/local/share/$P/ui/connect.ui # create template ################## mkdir -p $P/usr/local/share/$P echo 'file:///usr/local/share/applications executable-icons file:///home/tc/Downloads Downloads file:///home/tc/.config .config file:///home/tc/.local .local ' > $P/usr/local/share/$P/.gtk-bookmarks # tce.install ############# mkdir -p $P/usr/local/tce.installed cat >> $P/usr/local/tce.installed/$P <<'EOF' #!/bin/sh USER=`cat /etc/sysconfig/tcuser` DIR=/usr/local/share/pcmanfm/.gtk-bookmarks HOME=/home/$USER [ -f $HOME/.gtk-bookmarks ] || cp $DIR $HOME chown $USER:staff $HOME/.gtk-bookmarks chmod 644 $HOME/.gtk-bookmarks EOF chown -R root:staff $P/usr/local/tce.installed chmod -R 755 $P/usr/local/tce.installed # create update-desktops as pcmanfm may have TCEs loaded later echo '#!/bin/sh sudo update-desktop-database /usr/local/share/applications/ sudo update-mime-database /usr/local/share/mime ' > $P/usr/local/bin/update-desktops chmod 755 $P/usr/local/bin/update-desktops # 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 find etc -not -type d >> /tmp/$Z.tcz.list sed 's|usr|/usr|g' -i /tmp/$Z.tcz.list sed 's|etc|/etc|g' -i /tmp/$Z.tcz.list cd /tmp done ls -hal echo 'Title: pcmanfm-locale.tcz Description: locales for pcmanfm Version: 1.3.2 Author: Hong Jen Yee Original-site: https://downloads.sourceforge.net/pcmanfm Copying-policy: GPL v2 Size: 476K Extension_by: aus9 Tags: locale file manager Comments: locales untested by me Change-log: 2014/01/18 First version, 1.1.2.2 (bmarkus) 2015/08/20 v1.2.3 (gordon64) 2019/02/10 v1.3.0 for 10x(aus9) 2020/07/19 v 1.3.1 for 11x 2023/03/26 v 1.3.2 on 14x Current: 2023/06/08 rebuilt for pcre2 ' > $P-locale.tcz.info echo 'pcmanfm.tcz ' > $P-locale.tcz.dep echo 'Title: pcmanfm.tcz Description: Graphical File Manager Version: 1.3.2 Author: Hong Jen Yee Original-site: https://downloads.sourceforge.net/pcmanfm Copying-policy: GPL v2 Size: 124K Extension_by: aus9 Tags: file manager gtk2 fm Comments: online manual https://man.archlinux.org/man/pcmanfm.1.en Config will auto-create at ~/.config/pcmanfm/default/pcmanfm.conf Original /etc/xdg/pcmanfm/pcmanfm.conf Change by pulldown Edit -> Preferences. If pcmanfm run in desktop mode, other preferences can be activated see https://tinyurl.com/y3ouvb94 Recommend change preferences to not allow volume management automount of volumes on startup. FM preferences can also change libfm (dependency) config. FM Bookmarks at ~/.gtk-bookmarks gvfs and trash can support disabled. pcmanfm has trashcan/network settings but do not try to use please. FM can integrate with either xarchiver, file-roller or engrampa to unpack common archives types but no dependencies set. Load your preferred archive tool and various archive format TCEs then run $ update-desktops If you load an extra GUI run $ update-desktops to get mime handling please Change-log: 2014/01/18 First version, 1.1.2.2 (bmarkus) 2015/08/20 v1.2.3 (gordon64) 2019/02/10 v1.3.0 for 10x(aus9) 2020/07/19 v 1.3.1 for 11x change install script 2023/03/26 v 1.3.2 on 14x Current: 2023/06/08 rebuilt for pcre2 ' > $P.tcz.info readelf -d $P/usr/local/bin/$P | grep 'NEEDED' ############################delete TCB #[libX11.so.6] libX11 pixbuf libfm #[libfm-gtk.so.4] libfm #[libgtk-x11-2.0.so.0] " #[libgdk-x11-2.0.so.0] " #[libpangocairo-1.0.so.0] " #[libatk-1.0.so.0] " #[libcairo.so.2 ] " #[libgdk_pixbuf-2.0.so.0]" #[libpangoft2-1.0.so.0] " #[libpango-1.0.so.0] " #libharfbuzz.so.0] " #[libfontconfig.so.1] " #[libfreetype.so.6] " #[libfm.so.4] " #[libgthread-2.0.so.0] " #[libgio-2.0.so.0] " #[libgobject-2.0.so.0] " #[libglib-2.0.so.0] " echo 'libfm.tcz shared-mime-info.tcz desktop-file-utils.tcz ' > $P.tcz.dep submitqc --libs rm -rf *.zsync