#!/bin/sh
#
# Copyright 2005 Scott Harmon
# Available under the terms of the GNU GPL.
#
# Note: that most plugins are stupid, this means you need to install
# the package and then rebuild it so the plugins will be for the
# correct version of gaim :-(

NAME="gaim"
VERSION="1.5.0"
REVISION="1"
PKG_SOURCEURL='http://heanet.dl.sourceforge.net/sourceforge/$NAME/$NAME-$VERSION.tar.bz2'

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

cflags
cxxflags
prepare
analyzesource
configure --with-nspr-includes=/usr/include/firefox/nspr \
        --with-nspr-libs=/usr/lib/firefox \
        --with-nss-includes=/usr/include/firefox/nss \
        --with-nss-libs=/usr/lib/firefox
make
makeinstall install-strip
#gaim-encryption
(
	GAIM_STAGEROOT=$PKG_STAGEROOT
	NAME="gaim-encryption"
	VERSION="2.38"
	REVISION="1"
	PKG_SOURCEURL='http://heanet.dl.sourceforge.net/sourceforge/$NAME/$NAME-$VERSION.tar.gz'

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

	cflags
	cxxflags
	prepare
	analyzesource
	configure --with-nspr-includes=/usr/include/firefox/nspr \
	        --with-nspr-libs=/usr/lib/firefox \
       		--with-nss-includes=/usr/include/firefox/nss \
	        --with-nss-libs=/usr/lib/firefox \
		--with-gaim=$GAIM_STAGEROOT \
		--program-prefix="" \
		--program-suffix=""
	make
	PKG_STAGEROOT=$GAIM_STAGEROOT
	makeinstall install-strip
)
if [ $? != 0 ]; then
	die
fi

#gaim-guification
(
	GAIM_STAGEROOT=$PKG_STAGEROOT
	NAME="guifications"
	VERSION="2.12"
	REVISION="1"
	PKG_SOURCEURL='http://heanet.dl.sourceforge.net/sourceforge/$NAME/$NAME-$VERSION.tar.bz2'

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

	cflags
	cxxflags
	prepare
	analyzesource
	configure --with-nspr-includes=/usr/include/firefox/nspr \
	        --with-nspr-libs=/usr/lib/firefox \
       		--with-nss-includes=/usr/include/firefox/nss \
	        --with-nss-libs=/usr/lib/firefox \
		--with-gaim=$GAIM_STAGEROOT \
		--program-prefix="" \
		--program-suffix=""
	make
	PKG_STAGEROOT=$GAIM_STAGEROOT
	makeinstall install-strip
)

if [ $? != 0 ]; then
	die
fi

tidydocumentation
analyzebinaries
includescript
finalizepackage
packagize
cleanup
