or
http://vouters.dyndns.org/Intel/Intel-Readme.html
Source package
http://vouters.dyndns.org/Intel/intel-5 ... 19.tar.bz2
cut + paste code below and save as
Code: Select all
intel536.slaxbuild
Code: Select all
chmod +x intel536.slaxbuild
Code: Select all
# ./intel536.slaxbuild
Code: Select all
#!/bin/sh
# slax build script for intel-536EP
# uncooment if you have source file
# wget http://vouters.dyndns.org/Intel/intel-536EP-537EP_2010_07_19.tar.bz2
CWD=$PWD
ARCH=$(uname -m)
ARCH=${ARCH:-i486}
TMP=/tmp/packages
PKG=$TMP/_pkg_
##get ready when module extension is going to be changed
pkgext=lzm
#SLAXMAJOR=$(awk '{print $2}' /etc/slax-version | cut -d'.' -f1)
##don't know yet what it's gonna be
#if [ $SLAXMAJOR -ge 7 ]; then
# pkgext=lzm
#fi
#archive expected in format intel-536EP-*.tar.bz2
if [ $(ls intel-536EP-*.tar.bz2 2>/dev/null | wc -l) -ne 1 ]; then
echo "couldn't find the source archive"
exit 1
fi
archive=$(ls intel-536EP-*.tar.bz2)
src=$(tar tf $archive | head -n1 | awk -F '/' '{print $1}')
VERSION=$(echo ${archive%.tar.bz2} | sed 's?^intel-536EP-??')
#if package name is something like foo-somedigits-src.tar.bz2, etc. try
#VERSION=$(echo ${archive%.tar.bz2} | sed 's?^intel-536EP-??' | \
# sed 's?-[a-z]\{3,\}$??' | sed 's?-?_?g')
LIB=""
case "$ARCH" in
i386) CFLAGS="-O3 -march=i386 -mcpu=i686";;
i486) CFLAGS="-O3 -march=i486 -mtune=i686";;
i686) CFLAGS="-O3 -march=i686 -mtune=i686";;
athlon-xp) CFLAGS="-O3 -march=athlon-xp -pipe -fomit-frame-pointer";;
x86_64) CFLAGS="-O3 -fPIC"; LIB=64;;
esac
#should we include the architecture in the name?
#MODNAME=intel-536ep-${VERSION}-$ARCH.$pkgext
MODNAME=intel-536ep-$VERSION.sq4.$pkgext
#$echo " check that the following variables are set correctly"
#echo "archive=$archive"
#echo " src=$src"
#echo "VERSION=$VERSION"
#echo "MODNAME=$MODNAME"
#echo " if this is correct, remove these lines from this script"
#exit 0
description()
{
cat < /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
xargs strip --strip-unneeded 2> /dev/null
)
}
generatelist()
{
mkdir -p $PKG/usr/src/slaxbuilds/intel-536ep
(cd $PKG
LIST=$PKG/usr/src/slaxbuilds/intel-536ep/pkglist.txt
find * | while read f
do
if [ -d "$f" ]; then
echo "${f}/" >> $LIST
fi
if [ -L "$f" ]; then
echo "$f -> $(readlink -n $f)" >> $LIST
elif [ ! -d "$f" ]; then
echo "$f" >> $LIST
fi
done
cp $LIST $CWD
)
}
if [ -e $TMP ]; then
rm -Rf $TMP/*
fi
mkdir -p $TMP
cd $TMP
tar jxvf $CWD/$archive || exit 1
cd $src || exit 1
permissions
sed -i 84d Intel536_inst
sed -i '84 a D=/etc/slackware' Intel536_inst
make clean
make 536
#make install
mkdir -p $PKG
make install DESTDIR=$PKG || exit 1
mkdir -p $PKG/lib/modules/`uname -r`/kernel/drivers/char
mkdir -p $PKG/usr/sbin
mkdir -p $PKG/etc/rc.d/
cp -ra /usr/sbin/hamregistry $PKG/usr/sbin
cp -ra /lib/modules/`uname -r`/kernel/drivers/char/Intel536.ko $PKG/lib/modules/`uname -r`/kernel/drivers/char
cp -ra /etc/rc.d/rc.intel536 $PKG/etc/rc.d/
sed -i '47 a depmod -a' $PKG/etc/rc.d/rc.intel536
sed -i '48 a sleep 3' $PKG/etc/rc.d/rc.intel536
sed -i '49 a \' $PKG/etc/rc.d/rc.intel536
chmod +x $PKG/etc/rc.d/rc.intel536
sleep 3
rm -rf /usr/sbin/hamregistry
rm -rf /lib/modules/`uname -r`/kernel/drivers/char/Intel536.ko
rm -rf /etc/rc.d/rc.intel536
sed -i 11d /etc/rc.d/rc.local
sed -i 12d /etc/rc.d/rc.local
sed -i 13d /etc/rc.d/rc.local
sed -i 14d /etc/rc.d/rc.local
sed -i 15d /etc/rc.d/rc.local
strip
#copy this script and some info to /usr/src/slaxbuilds/intel-536ep
mkdir -p $PKG/usr/src/slaxbuilds/intel-536ep
cp $CWD/intel-536ep.slaxbuild $PKG/usr/src/slaxbuilds/intel-536ep
description > $PKG/usr/src/slaxbuilds/intel-536ep/readme.txt
echo "installed version: $VERSION" >> $PKG/usr/src/slaxbuilds/intel-536ep/readme.txt
#list contents of package
generatelist
clear
echo
cd $CWD
rm -f $MODNAME
#mksquashfs $PKG $MODNAME -b 256K -lzmadic 256K || exit 33
dir2lzm $PKG $MODNAME
chmod a-wx $MODNAME
chmod a+r $MODNAME
echo
echo " intel-536EP"
echo
description
echo
echo "module $MODNAME successfully created in $CWD"
echo
rm -Rf $TMP/*