cd /tmp mkdir package DESTDIR='/tmp/package' tce-load -w -i compiletc squashfs-tools curl-dev autoconf automake libtool-dev git export CFLAGS="-mtune=generic -Os -pipe" export CXXFLAGS="-mtune=generic -Os -pipe" export LDFLAGS="-Wl,-O1" curl -O -L https://github.com/01org/tpm2-tss/archive/1.0.tar.gz tar xzvf 1.0.tar.gz cd tpm2-tss-1.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-tss-dev.tcz package cd $DESTDIR mkdir dev for i in usr/local/include usr/local/lib/pkgconfig; do tar cpf - $i | (cd dev && tar xvpf - ) rm -rf $i done cd dev tar -czf $PKGDIR/tar.gz/tpm2-tss.tcz.tar.gz * mksquashfs $DESTDIR/dev $PKGDIR/tcz/tpm2-tss-dev.tcz -all-root -info find $DESTDIR/dev -not -type d | sed -e "s#^${DESTDIR}/dev##" > $PKGDIR/tcz/tpm2-tss-dev.tcz.list cd .. && rm -rf dev cd $PKGDIR/tcz md5sum tpm2-tss-dev.tcz > tpm2-tss-dev.tcz.md5.txt echo "tpm2-tss.tcz" > tpm2-tss-dev.tcz.dep # Create tpm2-tss.tcz package cd $DESTDIR tar -czf $PKGDIR/tar.gz/tpm2-tss.tcz.tar.gz * mksquashfs $DESTDIR $PKGDIR/tcz/tpm2-tss.tcz -all-root -info find $DESTDIR -not -type d | sed -e "s#^${DESTDIR}##" > $PKGDIR/tcz/tpm2-tss.tcz.list cd $PKGDIR/tcz md5sum tpm2-tss.tcz > tpm2-tss.tcz.md5.txt # Cleanup cd /tmp rm -rf $DESTDIR rm -rf /tmp/1.0