#!/bin/sh
#
# kTm port by Juzer
#
#       regards to hns & psych
#

# local config:
BUILD="1"
PACKAGE="libnet"

check() {
# Checking for configuration
# Downloading sources lists
INSTALLED="`ls -1 $PACKAGES/packages/|grep $PACKAGE-|cut -d "-" -f 1,2`"
$WGET -q http://www.packetfactory.net/libnet/dist/
NEW=`grep $PACKAGE- index.html |grep tar.gz|cut -d "'" -f 4|sed -e s/.tar.*//|tail -1`
#Checking for new version
    checkpkg
# clean
rm index.html
}

download() {
# Downloading version from "${VERFILE}"
$WGET -P $DOWNL http://www.packetfactory.net/libnet/dist/$SRC.tar.gz
}

build() {
# Creating new
tar zxvf $DOWNL/$SRC.tar.gz
cd libnet
./configure \
    --prefix=/usr \
    $TARGET || exit
make || exit
make install prefix=$PKG/usr || exit
    postbuild
    rm -rf $TMP/libnet/
}

source "${DATA:-/usr/lib/ktm}/ktm.ports.sh"

