# vim: set syn=sh ai et sw=2 st=2 ts=2 tw=0:
#Packager: JRD <jrd@enialis.net>

pkgname=gajim
pkgver=0.15.2
pkgrel=1rl
source=(http://www.$pkgname.org/downloads/$(echo $pkgver|cut -d. -f1-2)/$pkgname-$pkgver.tar.bz2)
sourcetemplate=http://people.salixos.org/jrd/salix/$pkgname/$pkgver-\$arch-$pkgrel/
docs=("authors" "install" "readme" "readme.html" "copying" "thanks" "thanks.artists" "changelog" "readme.slackware")
url=http://gajim.org/

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"$pkgname (a GTK2+ Jabber/XMPP client)"
"The goal of Gajim is to provide a full featured and easy to use"
"Jabber client."
"Gajim works nicely with GNOME, but does not require it to run."
"It is released under the GNU General Public License."
)

build() {
  cd $SRC/$pkgname-$pkgver || return 1
  ./configure --prefix=/usr --libdir=/usr/lib${LIBDIRSUFFIX} --localstatedir=/var --sysconfdir=/etc --build=$arch-slackware-linux || return 1
  make || return 1
  make install DESTDIR=$PKG || return 1
  cat <<EOF > README.Slackware
Extra Gajim Features
====================

Some Gajim features are not provided as a direct dependancy of this package.
Instead they are provided as a suggestion (look for a .sug file).

If you want to have the full features of Gajim, install all dependancies
listed in the .sug file using:
  slapt-get -i \$(LANG= slapt-get --show $pkgname|grep '^Package Suggests:'|cut -d: -f2-|tr ',' ' ')

If you want to install per-feature dependancies, here is a table that can help you:
/-------------------------------+-----------------------------------------------------\\
| Feature                       | Dependancies                                        |
+-------------------------------+-----------------------------------------------------+
| SSL certificate validation    | pyOpenSSL pyasn1                                    |
| Bonjour / Zeroconf            | avahi bind                                          |
| Password encryption           | libgnome-keyring gnome-keyring gnome-python-desktop |
| LaTeX                         | texlive imagemagick                                 |
| End to End message encryption | pycrypto                                            |
| RST Generator                 | docutils                                            |
| Audio / Video                 | farstream gnome-python                              |
\\-------------------------------+-----------------------------------------------------/

Some of the dependancies may not be present in the binary repository.
For those, you will need to compile and install them using slapt-src/sourcery.

Other features are already covered by the regular dependancies of the package.
Some feature cannot, at the date of writing, be enabled using Slackware/Salix packages:
- Network-manager
- Session Management
- UPnP-IGD
If you find a way to enable those, please email me: JRD <jrd@enialis.net>
If you find a bug related to a package in some feature, please email me too, with as much details
information as you have.

EOF
}