#!/bin/sh echo "Don't forget to update this script with the change-log! Press ENTER to start..." read NAME="libnet" VERSION="1.1.4" SOURCE="http://sourceforge.net/projects/libnet-dev/files/libnet-dev/libnet-$VERSION/libnet-$VERSION.tar.gz" CONFIGURE="--prefix=/usr/local" DATE=`date '+%Y/%m/%d'` 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 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 sudo rm /tmp/$NAME-dev.tcz /tmp/$NAME-dev.tcz.list /tmp/$NAME-dev.tcz.md5.txt /tmp/$NAME-dev.tcz.dep 2>/dev/null sudo rm -rf /tmp/$NAME-dev 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: libnet Version: $VERSION Author: Sam Roberts Original-site: https://github.com/sam-github/libnet Copying-policy: BSD Size: $SIZE Extension_by: andriscom Comments: Libnet is a high-level API (toolkit) allowing the application programmer to construct and inject network packets. It provides a portable and simplified interface for low-level network packet shaping, handling and injection. Libnet hides much of the tedium of packet creation from the application programmer such as multiplexing, buffer management, arcane packet header information, byte-ordering, OS-dependent issues, and much more. Libnet features portable packet creation interfaces at both the IP-layer and link-layer, as well as a host of supplementary and complementary functionality. Using libnet, quick and simple packet assembly applications can be whipped up with little effort. With a bit more time, more complex programs can be written (Traceroute and Ping were easily rewritten using libnet and libpcap). The original libnet has become unmaintained at packetfactory.net, and it's original author is unreachable. This version was forked from the 1.1.3 release candidate, then bug fixed, actively maintained, and rereleased. 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: $DATE Version: $VERSION Current: $DATE Version: $VERSION " > $NAME.tcz.info echo "Creating dev 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: libnet dev files and man pages Version: $VERSION Author: Sam Roberts Original-site: https://github.com/sam-github/libnet Copying-policy: BSD Size: $SIZE Extension_by: andriscom Comments: Libnet is a high-level API (toolkit) allowing the application programmer to construct and inject network packets. It provides a portable and simplified interface for low-level network packet shaping, handling and injection. Libnet hides much of the tedium of packet creation from the application programmer such as multiplexing, buffer management, arcane packet header information, byte-ordering, OS-dependent issues, and much more. Libnet features portable packet creation interfaces at both the IP-layer and link-layer, as well as a host of supplementary and complementary functionality. Using libnet, quick and simple packet assembly applications can be whipped up with little effort. With a bit more time, more complex programs can be written (Traceroute and Ping were easily rewritten using libnet and libpcap). The original libnet has become unmaintained at packetfactory.net, and it's original author is unreachable. This version was forked from the 1.1.3 release candidate, then bug fixed, actively maintained, and rereleased. 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: $DATE Version: $VERSION Current: $DATE Version: $VERSION " > $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 sudo rm packages/$NAME-dev.tar.gz 2>/dev/null tar zcf packages/$NAME.tar.gz $NAME.tcz* tar zcf packages/$NAME-dev.tar.gz $NAME-dev.tcz* 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"