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

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

check() {
# Checking for configuration
# Downloading sources lists
INSTALLED="`ls -1 $PACKAGES/packages/|grep $PACKAGE-|cut -d "-" -f 1,2`"
$WGET -q http://www.tcpdump.org/release/
NEW=`grep libpcap index.html|cut -d '"' -f 2|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.tcpdump.org/release/$SRC.tar.gz
}

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

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

