#Packager: George Vlahavas <vlahavas~at~gmail~dot~com>

# Mandatory
pkgname=ekiga
pkgver=3.9.90
pkgrel=1rl
source=("http://ftp.gnome.org/pub/gnome/sources/ekiga/3.9/ekiga-3.9.90.tar.xz")
# Optional
docs=("AUTHORS COPYING ChangeLog FAQ INSTALL LICENSE MAINTAINERS NEWS README TODO")
url="http://www.ekiga.org"
options=('noautodotnew')
 
doinst() {
# Update the scrollkeeper database (Remove stale pieces)
if [ -x usr/bin/scrollkeeper-update ]; then
	usr/bin/scrollkeeper-update > /dev/null 2>&1
fi
}

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"Ekiga (VoIP and video conferencing application)"
"Ekiga (formely known as GnomeMeeting) is an open source SoftPhone,"
"Video Conferencing and Instant Messenger application over the"
"Internet."
""
"It supports HD sound quality and video up to DVD size and quality."
""
"It is interoperable with many other standard compliant softwares,"
"hardwares and service providers as it uses both the major"
"telephony standards (SIP and H.323)."
)

build() {
        cd $startdir/src/$pkgname-$pkgver
        ./configure \
          --prefix=/usr \
          --libdir=/usr/lib${LIBDIRSUFFIX} \
          --sysconfdir=/etc \
          --localstatedir=/var \
          --mandir=/usr/man \
          --docdir=/usr/doc/$pkgname-$pkgver \
          --enable-static=no \
          --enable-shared=yes \
          --disable-avahi \
          --disable-eds \
          --disable-gdu \
          --disable-gnome \
          --disable-schemas-install \
          --disable-scrollkeeper \
          --build=$arch-slackware-linux
        make || return 1
        make DESTDIR=$startdir/pkg install

        # gconf stuff
        export GCONF_CONFIG_SOURCE="xml::$startdir/pkg/etc/gconf/gconf.xml.defaults"
        if [ -d $startdir/pkg/etc/gconf/schemas ]; then
            install -v -d -m755 $startdir/pkg/etc/gconf/gconf.xml.defaults
            SCHEMAS=$startdir/pkg/etc/gconf/schemas
            for schema in $SCHEMAS/*.schemas; do
                gconftool-2 --makefile-install-rule $schema
            done
            # Reset / Verify correct permissions
            ( cd $startdir/pkg/etc/gconf ; find . -type d -exec chmod 755 {} \; )
            ( cd $startdir/pkg/etc/gconf ; find . -type f -exec chmod 644 {} \; )
        fi
}