cd /tmp mkdir package mkdir src_package DESTDIR='/tmp/package' tce-load -w -i compiletc squashfs-tools trousers-dev openssl-1.1.1-dev curl perl5 export CFLAGS="-mtune=generic -Os -pipe" export CXXFLAGS="-mtune=generic -Os -pipe" export LDFLAGS="-Wl,-O1" curl -L -k -O https://sourceforge.net/projects/trousers/files/tpm-tools/1.3.9.1/tpm-tools-1.3.9.1.tar.gz/download tar xzvf download -C ./src_package cd ./src_package ./configure make make DESTDIR=/tmp/package install # Create package directory . /etc/init.d/tc-functions PKGDIR=/tmp/`getMajorVer`.x/`getBuild` mkdir -p $PKGDIR/tar.gz $PKGDIR/tcz # Create tpm-tools-doc.tcz package cd $DESTDIR mkdir doc for i in usr/local/share/man; do tar cpf - $i | (cd doc && tar xvpf - ) rm -rf $i done cd doc tar -czf $PKGDIR/tar.gz/tpm-tools-doc.tcz.tar.gz * mksquashfs $DESTDIR/doc $PKGDIR/tcz/tpm-tools-doc.tcz -all-root -info find $DESTDIR/doc -not -type d | sed -e "s#^${DESTDIR}/doc##" > $PKGDIR/tcz/tpm-tools-doc.tcz.list cd .. && rm -rf doc cd $PKGDIR/tcz md5sum tpm-tools-doc.tcz > tpm-tools-doc.tcz.md5.txt # Create tpm-tools-dev.tcz package cd $DESTDIR mkdir dev for i in usr/local/include; do tar cpf - $i | (cd dev && tar xvpf - ) rm -rf $i done cd dev tar -czf $PKGDIR/tar.gz/tpm-tools-dev.tcz.tar.gz * mksquashfs $DESTDIR/dev $PKGDIR/tcz/tpm-tools-dev.tcz -all-root -info find $DESTDIR/dev -not -type d | sed -e "s#^${DESTDIR}/dev##" > $PKGDIR/tcz/tpm-tools-dev.tcz.list cd .. && rm -rf dev cd $PKGDIR/tcz md5sum tpm-tools-dev.tcz > tpm-tools-dev.tcz.md5.txt echo "tpm-tools.tcz" > tpm-tools-dev.tcz.dep # Create tpm-tools.tcz package cd $DESTDIR rm -fr usr/local/share/ strip --strip-all usr/local/*/* tar -czf $PKGDIR/tar.gz/tpm-tools.tcz.tar.gz * mksquashfs $DESTDIR $PKGDIR/tcz/tpm-tools.tcz -all-root -info find $DESTDIR -not -type d | sed -e "s#^${DESTDIR}##" > $PKGDIR/tcz/tpm-tools.tcz.list cd $PKGDIR/tcz md5sum tpm-tools.tcz > tpm-tools.tcz.md5.txt # Cleanup cd /tmp rm -rf $DESTDIR rm -rf /tmp/src_package/ rm -fr /tmp/download