#!/bin/sh # test we are root if [ "$USER" != "root" ] ; then echo "Run as root please, exiting." exit 1 fi CFLAGS="-march=i486 -mtune=i686 -Os -pipe " CXXFLAGS="-march=i486 -mtune=i686 -Os -pipe -fno-exceptions -fno-rtti " echo $CFLAGS && echo $CXXFLAGS P=libjpeg-turbo V=3.0.0 SRC=$P-$V USER=`cat /etc/sysconfig/tcuser` LIST="compiletc squashfs-tools wget cmake" 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 su -c "/usr/local/bin/wget -nc \ https://sourceforge.net/projects/$P/files/$V/$SRC.tar.gz " $USER tar -xvf $SRC*gz cd $SRC mkdir build && cd build cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=TRUE \ -DENABLE_STATIC=FALSE -DCMAKE_INSTALL_DEFAULT_LIBDIR=lib ../ make -j4 # 1M35 make install DESTDIR=/tmp/$P # install-strip fails cd /tmp # dev ##### mkdir -p $P-dev/usr/local/lib mv $P/usr/local/include $P-dev/usr/local/ mv $P/usr/local/lib/cmake $P-dev/usr/local/lib mv $P/usr/local/lib/pkgconfig $P-dev/usr/local/lib/ # bin ##### mkdir -p $P-bin/usr/local mv $P/usr/local/bin $P-bin/usr/local/ # doc ###### mkdir -p $P-doc/usr/local/share/ mv $P/usr/local/share/man $P-doc/usr/local mv $P/usr/local/share/doc $P-doc/usr/local/share # main start afresh ##### mkdir -p $P/usr/local/share/doc/$P cp $SRC/LICENSE.md $P/usr/local/share/doc/$P/COPYING cp $SRC/README.ijg $P/usr/local/share/doc/$P/ # TCZ them ####### LIST="$P $P-dev $P-bin $P-doc " 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: libjpeg-turbo-bin.tcz Description: bin files only Version: 3.0.0 Author: libjpeg-turbo Team Original-site: https://sourceforge.net/projects/libjpeg-turbo Copying-policy: accompanied Size: 144K Extension_by: aus9 Tags: libjpeg-turbo Comments: This software is based in part on the work of the Independent JPEG Group. eg $ jpegtran -rotate 90 1.jpg > 2.jpg Change-log: 2014/09/28 v 1.3.1 (bmarkus) 2014/12/12 Dropped libjpegturbo lib 2022/02/21 v 2.1.2 (Juanito) Current: 2023/08/17 v 3.0.0 on 14.x (aus9) ' > $P-bin.tcz.info readelf -d $P-bin/usr/local/bin/* | grep 'NEEDED' #[libjpeg.so.62]main TCE #[libturbojpeg.so.0]" echo 'libjpeg-turbo.tcz' >$P-bin.tcz.dep echo 'Title: libjpeg-turbo-dev.tcz Description: dev files Version: 3.0.0 Author: libjpeg-turbo Team Original-site: https://sourceforge.net/projects/libjpeg-turbo Copying-policy: accompanied Size: 68K Extension_by: aus9 Tags: libjpeg-turbo Comments: dev files This software is based in part on the work of the Independent JPEG Group. Change-log: 2014/09/28 v 1.3.1 (bmarkus) 2014/12/12 Dropped libjpegturbo lib 2022/02/21 v 2.1.2 (Juanito) Current: 2023/08/17 v 3.0.0 on 14.x (aus9) ' > $P-dev.tcz.info echo 'libjpeg-turbo.tcz' >$P-dev.tcz.dep echo 'Title: libjpeg-turbo-doc.tcz Description: man pages and doc Version: 3.0.0 Author: libjpeg-turbo Team Original-site: https://sourceforge.net/projects/libjpeg-turbo Copying-policy: accompanied Size: 168K Extension_by: aus9 Tags: libjpeg-turbo Comments: dev files This software is based in part on the work of the Independent JPEG Group. man page viewer try man-db TCE Change-log: 2014/09/28 v 1.3.1 (bmarkus) 2014/12/12 Dropped libjpegturbo lib 2022/02/21 v 2.1.2 (Juanito) Current: 2023/08/17 v 3.0.0 on 14.x (aus9) ' > $P-doc.tcz.info echo 'Title: libjpeg-turbo.tcz Description: JPEG image codec Version: 3.0.0 Author: libjpeg-turbo Team Original-site: https://sourceforge.net/projects/libjpeg-turbo Copying-policy: accompanied Size: 628K Extension_by: aus9 Tags: libjpeg-turbo Comments: libraries only and This software is based in part on the work of the Independent JPEG Group. Change-log: 2014/09/28 v 1.3.1 (bmarkus) 2014/12/12 Dropped libjpegturbo lib 2022/02/21 v 2.1.2 (Juanito) Current: 2023/08/17 v 3.0.0 on 14.x (aus9) ' > $P.tcz.info readelf -d $P/usr/local/lib/* | grep 'NEEDED' # only TCBs ldd $P/usr/local/lib/*.so # check pcre libffi openssl # no dep # test $ jpegtran sample sample.jpg