#!/bin/sh

VERSION=2.4.9
ARCH=`/bin/arch`
BUILD=1

CWD=`pwd`
TMP=/tmp
cd $TMP
tar xjvf $CWD/ksymoops-$VERSION.tar.bz2
cd ksymoops-$VERSION
zcat $CWD/ksymoops.dynamic.bfd.diff.gz | patch -p1
chown -R root.root .
find . -perm 777 -exec chmod 755 {} \;
find . -perm 664 -exec chmod 644 {} \;
make
cat ksymoops > $PKG/usr/bin/ksymoops
chmod 755 $PKG/usr/bin/ksymoops
cat ksymoops.8 | gzip -9c > $PKG/usr/man/man8/ksymoops.8.gz
