#!/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" P=qpdf V=10.0.1 SRC=$P-$V USER=`cat /etc/sysconfig/tcuser` pcre-dev LIST="compiletc wget squashfs-tools zsync pcre2-dev bash gnutls-dev perl5" for Z in $LIST do su -c "tce-load -i $Z" $USER done cd /tmp su -c "/usr/local/bin/wget -nc --no-check-certificate \ https://github.com/$P/$P/releases/download/release-$SRC/$SRC.tar.gz" $USER mkdir $P tar xvf $P*gz cd $SRC ./configure --prefix=/usr/local --disable-static make -j5 # 3.5 minutes make install 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/ mv $P/usr/local/lib/*la $P-dev/usr/local/lib/ # to keep repo smaller rm -rf $P/usr/local/share/man rm -rf $P/usr/local/share/doc mkdir -p $P/usr/local/share/doc/$P cp $SRC/LICENSE.txt $P/usr/local/share/doc/$P/ strip --strip-unneeded $P/usr/local/bin/* # 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 zsyncmake $Z.tcz done ls -hal echo 'Title: qpdf-dev.tcz Description: qpdf devs Version: 10.0.1 Author: Jay Berkenbilt Original-site: https://github.com/qpdf/qpdf Copying-policy: accompanied Size: 72K Extension_by: aus9 Tags: pdf Comments: dev files Change-log: 2020/09/25 Original v 10.0.1 on 12x Current: 2020/09/25 ' > $P-dev.tcz.info echo 'Title: qpdf.tcz Description: see below Version: 10.0.1 Author: Jay Berkenbilt Original-site: https://github.com/qpdf/qpdf Copying-policy: accompanied Size: 556K Extension_by: aus9 Tags: pdf Comments: QPDF is not a PDF content creation library, a PDF viewer, or a program capable of converting PDF into other formats. It does structual, content preserving transformations on pdf files $ pdf --check sample.pdf Change-log: 2020/09/25 Original v 10.0.1 on 12x Current: 2020/09/25 ' > $P.tcz.info echo 'qpdf.tcz pcre2-dev.tcz bash.tcz gnutls-dev.tcz perl5.tcz ' > $P-dev.tcz.dep echo 'gnutls.tcz pcre2.tcz ' > $P.tcz.dep # $ pdf --check sample.pdf # checking sample.pdf..PDF Version: 1.3..File is not encrypted..File is not linearized # No syntax or stream encoding errors found; the file may still contain errors that qpdf cannot detect