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

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

check() {
# Checking for configuration
# Downloading sources lists
INSTALLED="`ls -1 $PACKAGES/packages/|grep $PACKAGE|cut -d "-" -f 1,2,3`"
$WGET -q http://www.overnet.com/downloads.php
NEW=`grep $PACKAGE downloads.php|grep .tar.gz|cut -d '/' -f 4|cut -d '"' -f 1|sed -e s/.tar.gz//|head -1`
#Checking for new version
    checkpkg
# clean
rm downloads.php
}

download() {
# Downloading version from "${VERFILE}"
$WGET -P $DOWNL http://download.overnet.com/$SRC.tar.gz
}

build() {
# Creating new
tar zxvf $DOWNL/$SRC.tar.gz
cd $SRC
mkdir -p $PKG/usr/bin
cp `echo $SRC|sed -e s/-//` $PKG/usr/bin
cd $PKG/usr/bin ; ln -s `echo $SRC|sed -e s/-//` overnet
    postbuild
}

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


