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

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

check() {
# Checking for configuration
# Downloading sources lists
INSTALLED=`ls -1 $PACKAGES/packages/|grep $PACKAGE|cut -d "-" -f 1,2`
$WGET -q http://www.xmms.org/download.php
NEW=`grep $PACKAGE download.php|grep xmms|grep .tar.bz2|cut -d / -f 12|cut -d '"' -f 1|sed -e s/.tar.*//`
#Checking for new version
    checkpkg
# clean
rm download.php
}

download() {
# Downloading version from "${VERFILE}"
$WGET -P $DOWNL http://www.xmms.org/files/1.2.x/$SRC.tar.bz2
}

build() {
# Creating new
tar jxvf $DOWNL/$SRC.tar.bz2
cd $SRC
./configure \
    --prefix=/usr \
    --localstatedir=/var/lib \
    --enable-simd \
    --disable-mikmod \
    --with-ipv6 \
    $TARGET || exit
make || exit
make install DESTDIR=$PKG || exit
    postbuild
}

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

