cd /tmp mkdir package DESTDIR='/tmp/package' wget http://web.mit.edu/kerberos/dist/krb5/1.16/krb5-1.16.tar.gz tar xzvf krb5-1.16.tar.gz cd krb5-1.16/src tce-load -w -i compiletc perl5 openssl-dev openssh squashfs-tools export CFLAGS="-mtune=generic -Os -pipe" export CXXFLAGS="-mtune=generic -Os -pipe" export LDFLAGS="-Wl,-O1" ./configure --prefix=/usr/local make make DESTDIR=/tmp/package install-strip # Create package directory . /etc/init.d/tc-functions PKGDIR=/tmp/`getMajorVer`.x/`getBuild` mkdir -p $PKGDIR/tar.gz $PKGDIR/tcz # Create krb5-dev.tcz package cd $DESTDIR mkdir -p dev/usr/local/bin mv usr/local/bin/krb5-config dev/usr/local/bin 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/krb5-dev.tcz.tar.gz * mksquashfs $DESTDIR/dev $PKGDIR/tcz/krb5-dev.tcz -all-root -info find $DESTDIR/dev -not -type d | sed -e "s#^${DESTDIR}/dev##" > $PKGDIR/tcz/krb5-dev.tcz.list cd .. && rm -rf dev cd $PKGDIR/tcz md5sum krb5-dev.tcz > krb5-dev.tcz.md5.txt echo "krb5.tcz" > krb5-dev.tcz.dep # Create krb5-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/krb5-doc.tcz.tar.gz * mksquashfs $DESTDIR/doc $PKGDIR/tcz/krb5-doc.tcz -all-root -info find $DESTDIR/doc -not -type d | sed -e "s#^${DESTDIR}/doc##" > $PKGDIR/tcz/krb5-doc.tcz.list cd .. && rm -rf doc cd $PKGDIR/tcz md5sum krb5-doc.tcz > krb5-doc.tcz.md5.txt # Create krb5.tcz package cd $DESTDIR tar -czf $PKGDIR/tar.gz/krb5.tcz.tar.gz * mksquashfs $DESTDIR $PKGDIR/tcz/krb5.tcz -all-root -info find $DESTDIR -not -type d | sed -e "s#^${DESTDIR}##" > $PKGDIR/tcz/krb5.tcz.list cd $PKGDIR/tcz md5sum krb5.tcz > krb5.tcz.md5.txt # Cleanup cd /tmp rm -rf $DESTDIR rm -rf krb5-1.16/