cd /tmp mkdir package DESTDIR='/tmp/package' tce-load -w -i compiletc squashfs-tools autoconf automake libtool-dev curl-dev git autoconf-archive tpm2-tss-dev export CFLAGS="-mtune=generic -Os -pipe" export CXXFLAGS="-mtune=generic -Os -pipe" export LDFLAGS="-Wl,-O1" curl -O -k -L https://github.com/01org/tpm2-tools/archive/2.0.0.tar.gz tar xzvf 2.0.0.tar.gz cd tpm2-tools-2.0.0/ ./bootstrap ./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 tpm2-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/tpm2-tools-doc.tcz.tar.gz * mksquashfs $DESTDIR/doc $PKGDIR/tcz/tpm2-tools-doc.tcz -all-root -info find $DESTDIR/doc -not -type d | sed -e "s#^${DESTDIR}/doc##" > $PKGDIR/tcz/tpm2-tools-doc.tcz.list cd .. && rm -rf doc cd $PKGDIR/tcz md5sum tpm2-tools-doc.tcz > tpm2-tools-doc.tcz.md5.txt # Create tpm2-tools.tcz package cd $DESTDIR tar -czf $PKGDIR/tar.gz/tpm2-tools.tcz.tar.gz * mksquashfs $DESTDIR $PKGDIR/tcz/tpm2-tools.tcz -all-root -info find $DESTDIR -not -type d | sed -e "s#^${DESTDIR}##" > $PKGDIR/tcz/tpm2-tools.tcz.list cd $PKGDIR/tcz md5sum tpm2-tools.tcz > tpm2-tools.tcz.md5.txt # Cleanup cd /tmp rm -rf $DESTDIR rm -rf /tmp/2.0.0.tar.gz rm -fr /tmp/tpm2-tools-2.0.0/