#!/bin/sh
#
# Copyright 2005, 2006 Scott Harmon
# Available under the terms of the GNU GPL.
#

NAME="system-tools-backends"
VERSION="2.8.3"
REVISION="1"

PKG_SOURCEURL='http://system-tools-backends.freedesktop.org/downloads/$VER_MAJ.$VER_MIN/$NAME-$VERSION.tar.gz'

PKG_PATCH[0]="system-tools-backends.conf.dropline"
PKG_PATCH[1]="rc.stb"
PKG_PATCH[2]="slackware-support.diff"

. $DLG_ROOT/config
. $DLG_ROOT/SCRIPTS/dropline-functions.sh

cflags
cxxflags
prepare
analyzesource
applypatch 2 1
configure --localstatedir=/var --with-stb-group=wheel
make
makeinstall install-strip

# Replace the system-tools-backends.conf
findpatch filename system-tools-backends.conf.dropline
spewdo "cp $filename $PKG_STAGEROOT$PKG_SYSCONFDIR/dbus-1/system.d/system-tools-backends.conf"

# Insert our rc.stb script
findpatch initscript ${PKG_PATCH[1]}
sysvinitsetup $initscript 345 91

tidydocumentation
analyzebinaries
finalizepackage
packagize
cleanup

