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

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

check() {
# Checking for configuration
# Downloading sources lists
INSTALLED=`ls -1 $PACKAGES/packages/|grep "$PACKAGE-"|cut -d "-" -f 1,2`
$WGET -q ftp://ftp.gtk.org/pub/gtk/v2.4/
NEW=`grep $PACKAGE index.html|grep .tar|cut -d / -f 7|cut -d '"' -f 1|sed -e s/.tar.*//|grep atk|tail -1`
#Checking for new version
    checkpkg
# clean
rm index.html
}

download() {
# Downloading version from "${VERFILE}"
$WGET -P $DOWNL ftp://ftp.gtk.org/pub/gtk/v2.4/$SRC.tar.bz2
}

build() {
# Creating new
tar jxvf $DOWNL/$SRC.tar.bz2
cd $SRC
./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    $TARGET || exit
make || exit
make install DESTDIR=$PKG || exit
rm -rf $PKG/usr/share/gtk-doc
    postbuild
}

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

