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

NAME="dropline-version"
VERSION="2.26.0"
REVISION="2"
DATE="2009-03-18"
DISTRIBUTOR="Dropline GNOME"
STARTPAGE="dropline-startpage-2.26.tar.bz2"
SPLASH="splash-2.20.png"
PKG_ARCH="noarch"

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

# gnome-version
PKG_SOURCEURL=http://ftp.gnome.org/pub/GNOME/sources/gnome-desktop/$VER_MAJ.$VER_MIN/gnome-desktop-$VERSION.tar.bz2
createdir $PKG_WORKROOT
createdir $PKG_LOGROOT
findtarball filename
if [ -z "$filename" ]; then
	echo "Unable to locate $PKG_SOURCEURL!  Exiting..."
	die
fi
opentarball $filename
createdir $PKG_STAGEROOT$PKG_PREFIX/share/gnome-about/
sed -e "s/<distributor>.*<\/distributor>/<distributor>$DISTRIBUTOR<\/distributor>/g" -e "s/<date>.*<\/date>/<date>$DATE<\/date>/g" $PKG_SRCROOT/gnome-version.xml > $PKG_STAGEROOT$PKG_PREFIX/share/gnome-about/gnome-version.xml

# Webpage
opentarball $DLG_SRCDIR/$NAME/$STARTPAGE
sanifysource $PKG_SRCROOT
spewdo "find $PKG_SRCROOT -type d -exec chmod 755 {} \;"
spewdo "find $PKG_SRCROOT -type f -exec chmod 644 {} \;"
spewdo "createdir $PKG_STAGEROOT$PKG_PREFIX/share/dropline"
spewdo "mv $PKG_SRCROOT $PKG_STAGEROOT$PKG_PREFIX/share/dropline/home"
spewdo "cd $PKG_STAGEROOT$PKG_PREFIX/share/dropline/home; ln -s start.html index.html"

# Splash
spewdo "createdir $PKG_STAGEROOT$PKG_PREFIX/share/pixmaps/splash"
spewdo "install -d $DLG_SRCDIR/$NAME/$SPLASH $PKG_STAGEROOT$PKG_PREFIX/share/pixmaps/splash/"
spewdo "mv $PKG_STAGEROOT$PKG_PREFIX/share/pixmaps/splash/$SPLASH $PKG_STAGEROOT$PKG_PREFIX/share/pixmaps/splash/gnome-splash.png"

# Finish up
analyzebinaries
finalizepackage
packagize
cleanup
