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

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

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

download() {
# Downloading version from "${VERFILE}"
$WGET -P $DOWNL https://ccvs.cvshome.org/files/documents/19/191/$SRC.tar.bz2
}

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

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

