#!/bin/sh echo "Don't forget to update this script with the change-log! Press ENTER to start..." read NAME="lshw" VERSION="B.02.15" SOURCE="http://ezix.org/source/packages/lshw/releases/$VERSION" CONFIGURE="" 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 svn squashfs-tools-4.x cd /tmp/ sudo rm -rf $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 svn co $SOURCE cd $VERSION/src sed -i.prev -e "s/DESTDIR?=\//DESTDIR=\/tmp\/$NAME\//" Makefile sed -i.prev -e 's/PREFIX?=\/usr/PREFIX=\/usr\/local/' Makefile sed -i.prev -e 's/INSTALL?=install -p/INSTALL=install -p/' Makefile sed -i.prev -e 's/STRIP?=strip/STRIP=strip/' Makefile sed -i.prev -e 's/\$(PACKAGENAME).1: \$(PACKAGENAME).sgml/#\$(PACKAGENAME).1: \$(PACKAGENAME.sgml)/' Makefile sed -i.prev -e 's/.*docbook2man \$ /dev/null sudo find . | xargs file | grep "shared object" | grep ELF | grep "not stripped" | cut -f 1 -d : | xargs strip -g 2> /dev/null 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: lshw (Hardware Lister) Version: $VERSION Author: Lyonel Vincent Original-site: http://ezix.org/project/wiki/HardwareLiSter Copying-policy: GPLv2 Size: $SIZE Extension_by: andriscom Comments: lshw (Hardware Lister) is a small tool to provide detailed information on the hardware configuration of the machine. It can report exact memory configuration, firmware version, mainboard configuration, CPU version and speed, cache configuration, bus speed, etc. Information can be output in plain text, XML or HTML. Built with CFLAGS: -march=i486 -mtune=i686 -Os -pipe Built with CXXFLAGS: -march=i486 -mtune=i686 -Os -pipe Built with LDFLAGS: -Wl,-O1 For man entries you can visit: http://linux.die.net/man/1/lshw Source: $SOURCE Change-log: $DATE Version: $VERSION Current: $DATE Version: $VERSION " > $NAME.tcz.info cd /tmp/ mkdir packages 2>/dev/null sudo rm packages/$NAME.tar.gz 2>/dev/null tar zcf packages/$NAME.tar.gz $NAME.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"