tce-load -w -i compiletc autoconf automake libtool-dev intltool gettext-dev gtk3-dev squashfs-tools curl cd /tmp mkdir package mkdir src_package DESTDIR='/tmp/package' curl -L -o galculator-2.1.3.tar.gz https://sourceforge.net/projects/galculator/files/galculator/2.1.3/galculator-2.1.3.tar.gz/download tar xzvf galculator-2.1.3.tar.gz -C ./src_package cd ./src_package/galculator-2.1.3/ export CFLAGS="-mtune=generic -Os -pipe" export CXXFLAGS="-mtune=generic -Os -pipe" export LDFLAGS="-Wl,-O1" ./configure --prefix=/usr/local --disable-quadmath 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 galculator-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/galculator-doc.tcz.tar.gz * mksquashfs $DESTDIR/doc $PKGDIR/tcz/galculator-doc.tcz -all-root -info find $DESTDIR/doc -not -type d | sed -e "s#^${DESTDIR}/doc##" > $PKGDIR/tcz/galculator-doc.tcz.list cd .. && rm -rf doc cd $PKGDIR/tcz md5sum galculator-doc.tcz > galculator-doc.tcz.md5.txt # Create galculator.tcz package cd $DESTDIR strip --strip-all usr/local/bin/* mkdir usr/local/tce.installed/ echo -e "#!/bin/sh\ngtk-update-icon-cache -q -f -t /usr/local/share/icons/hicolor" > usr/local/tce.installed/galculator chmod +x usr/local/tce.installed/galculator tar -czf $PKGDIR/tar.gz/galculator.tcz.tar.gz * mksquashfs $DESTDIR $PKGDIR/tcz/galculator.tcz -all-root -info find $DESTDIR -not -type d | sed -e "s#^${DESTDIR}##" > $PKGDIR/tcz/galculator.tcz.list cd $PKGDIR/tcz md5sum galculator.tcz > galculator.tcz.md5.txt echo "gtk3.tcz" > galculator.tcz.dep # Cleanup cd /tmp rm -rf $DESTDIR rm -rf /tmp/src_package/ rm /tmp/galculator-2.1.3.tar.gz