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

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

check() {
# Checking for configuration
# Downloading sources lists
INSTALLED="`ls -1 /var/packages/packages/|grep wget|cut -d "-" -f 1,2`"
$WGET -q ftp://ftp.gnu.org/gnu/wget/
NEW=`grep wget index.html|grep .tar|cut -d / -f 6|cut -d '"' -f 1|sed -e s/.tar.*//|sort -n|tail -1`
#Checking for new version
    checkpkg
# clean
rm index.html
}

download() {
# Downloading version from "${VERFILE}"
$WGET -P $DOWNL ftp://ftp.gnu.org/gnu/wget/$SRC.tar.gz
}

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

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

