#!/bin/sh echo "Don't forget to update this script with the change-log! Press ENTER to start..." read NAME="libtorrent" VERSION="0.12.9" SOURCE="http://libtorrent.rakshasa.no/downloads/libtorrent-$VERSION.tar.gz" CONFIGURE="--prefix=/usr/local --disable-debug" DATE=`date '+%Y/%m/%d'` SCRIPT_NAME=$(basename $0) cp $0 /tmp/ export CFLAGS="-march=i486 -mtune=i686 -Os -pipe" export CXXFLAGS="-march=i486 -mtune=i686 -Os -pipe" export LDFLAGS="-Wl,-O1" echo "Downloading essential packages..." tce-load -wi compiletc squashfs-tools-4.x openssl-1.0.0-dev libsigc++ libsigc++-dev cd /tmp/ wget $SOURCE sudo rm -rf $NAME-$VERSION 2>/dev/null sudo rm /tmp/$NAME.tcz /tmp/$NAME.tcz.list /tmp/$NAME.tcz.md5.txt /tmp/$NAME.tcz.dep 2>/dev/null sudo rm -rf /tmp/$NAME 2>/dev/null tar xvfz $NAME-$VERSION.tar.gz cd $NAME-$VERSION echo " Starting ./configure $CONFIGURE" ./configure $CONFIGURE echo "Press ENTER to continue... " read make -j3 echo " Starting make install to: /tmp/$NAME" sudo make DESTDIR=/tmp/$NAME install-strip cd /tmp/$NAME sudo find . | xargs file | grep "executable" | grep ELF | grep "not stripped" | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null sudo find . | xargs file | grep "shared object" | grep ELF | grep "not stripped" | cut -f 1 -d : | xargs strip -g 2> /dev/null cd /tmp/ sudo mv $NAME $NAME-dev mkdir -p /tmp/$NAME/usr/local/lib cd /tmp/$NAME-dev/usr/local/lib sudo mv *.so* /tmp/$NAME/usr/local/lib/ sudo mv *.la* /tmp/$NAME/usr/local/lib/ echo "Creating package..." cd /tmp/ sudo mksquashfs $NAME $NAME.tcz sudo md5sum $NAME.tcz > $NAME.tcz.md5.txt cd $NAME sudo find usr -not -type d > ../$NAME.tcz.list cd /tmp/ SIZE="`du -k $NAME.tcz|cut -f1`k" sudo echo "Title: $NAME.tcz Description: libTorrent Version: $VERSION Author: Jari Sundell Original-site: http://libtorrent.rakshasa.no/ Copying-policy: GPL Size: $SIZE Extension_by: andriscom Comments: LibTorrent is a BitTorrent library written in C++ for *nix, with a focus on high performance and good code. This is not the same libtorrent project as the one found on SourceForge. Built with CFLAGS: -march=i486 -mtune=i686 -Os -pipe Built with CXXFLAGS: -march=i486 -mtune=i686 -Os -pipe Built with LDFLAGS: -Wl,-O1 Built with the following options: ./configure $CONFIGURE Source: $SOURCE Change-log: 2010/09/28 First version (0.12.6) 2010/10/16 Version: 0.12.6 - Added: CFLAGS, CXXFLAGS, LDFLAGS, file preallocation with posix-fallocate, almost-linear-downloading.patch Current: $DATE Version: $VERSION - Removed: file preallocation with posix-fallocate, almost-linear-downloading.patch " > $NAME.tcz.info sudo echo "openssl-1.0.0.tcz libsigc++.tcz " > $NAME.tcz.dep echo "Creating package..." cd /tmp/ sudo mksquashfs $NAME-dev $NAME-dev.tcz sudo md5sum $NAME-dev.tcz > $NAME-dev.tcz.md5.txt cd $NAME-dev sudo find usr -not -type d > ../$NAME-dev.tcz.list cd /tmp/ SIZE="`du -k $NAME-dev.tcz|cut -f1`k" sudo echo "Title: $NAME-dev.tcz Description: libTorrent dev files Version: $VERSION Author: Jari Sundell Original-site: http://libtorrent.rakshasa.no/ Copying-policy: GPL Size: $SIZE Extension_by: andriscom Comments: LibTorrent is a BitTorrent library written in C++ for *nix, with a focus on high performance and good code. This is not the same libtorrent project as the one found on SourceForge. Built with CFLAGS: -march=i486 -mtune=i686 -Os -pipe Built with CXXFLAGS: -march=i486 -mtune=i686 -Os -pipe Built with LDFLAGS: -Wl,-O1 Built with the following options: ./configure $CONFIGURE Source: $SOURCE Change-log: 2010/09/28 First version (0.12.6) 2010/10/16 Version: 0.12.6 - Added: CFLAGS, CXXFLAGS, LDFLAGS, almost-linear-downloading.patch Current: $DATE Version: $VERSION - Removed: file preallocation with posix-fallocate, almost-linear-downloading.patch " > $NAME-dev.tcz.info sudo echo "$NAME.tcz " > $NAME-dev.tcz.dep cd /tmp/ mkdir packages 2>/dev/null sudo rm packages/$NAME.tar.gz 2>/dev/null tar zcf packages/$NAME.tar.gz $NAME.tcz* $NAME-dev.tcz* $SCRIPT_NAME echo " Run bcrypt on /tmp/packages/*.tar.gz... give password: tinycore" echo "Run the extension_audit.sh and reboot a clean system to try the packages!" echo "Send it to: tcesubmit@gmail.com"