cd /tmp mkdir package mkdir src_package DESTDIR='/tmp/package' cd src_package tce-load -w -i compiletc squashfs-tools curl openssl-1.1.1-dev 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/trousers/0.3.14/trousers-0.3.14.tar.gz/download tar xzvf download ./configure --prefix=/usr/local make make install DESTDIR=/tmp/package # Create package directory . /etc/init.d/tc-functions PKGDIR=/tmp/`getMajorVer`.x/`getBuild` mkdir -p $PKGDIR/tar.gz $PKGDIR/tcz # Create trousers-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 mkdir -p dev/usr/local/lib/ mv usr/local/lib/*.a dev/usr/local/lib/ mv usr/local/lib/*.la dev/usr/local/lib/ cd dev tar -czf $PKGDIR/tar.gz/trousers-dev.tcz.tar.gz * mksquashfs $DESTDIR/dev $PKGDIR/tcz/trousers-dev.tcz -all-root -info find $DESTDIR/dev -not -type d | sed -e "s#^${DESTDIR}/dev##" > $PKGDIR/tcz/trousers-dev.tcz.list cd .. && rm -rf dev cd $PKGDIR/tcz md5sum trousers-dev.tcz > trousers-dev.tcz.md5.txt echo "trousers.tcz" > trousers-dev.tcz.dep echo "openssl-1.1.1-dev.tcz" >> trousers-dev.tcz.dep # Create trousers-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/trousers-doc.tcz.tar.gz * mksquashfs $DESTDIR/doc $PKGDIR/tcz/trousers-doc.tcz -all-root -info find $DESTDIR/doc -not -type d | sed -e "s#^${DESTDIR}/doc##" > $PKGDIR/tcz/trousers-doc.tcz.list if [ ! -d /var/krb5kdc ]; then mkdir -p /var/krb5kdc fi cd .. && rm -rf doc cd $PKGDIR/tcz md5sum trousers-doc.tcz > trousers-doc.tcz.md5.txt # Create trousers.tcz package cd $DESTDIR rm -fr usr/local/var tar -czf $PKGDIR/tar.gz/trousers.tcz.tar.gz * mksquashfs $DESTDIR $PKGDIR/tcz/trousers.tcz -all-root -info find $DESTDIR -not -type d | sed -e "s#^${DESTDIR}##" > $PKGDIR/tcz/trousers.tcz.list cd $PKGDIR/tcz md5sum trousers.tcz > trousers.tcz.md5.txt # Cleanup cd /tmp rm -rf $DESTDIR rm -rf /tmp/src_package