#Maintainer: Dimitris Jemos <djemos~at~slackel~dot~gr>

pkgname=libtorrent-rasterbar
pkgver=0.14.7
pkgrel=1dj
arch=i486
source=(http://downloads.sourceforge.net/libtorrent/$pkgname-$pkgver.tar.gz)
docs=("AUTHORS" "COPYING" "ChangeLog" "INSTALL" "NEWS" "README" "docs")
url=http://www.rasterbar.com/products/libtorrent

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
 "libtorrent-rasterbar (a bittorrent C++ library)"
 "libtorrent is a C++ library that aims to be a good alternative to all"
 "of the other bittorrent implementations around.  It is a library, not"
 "a full featured client, although it comes with an example client."
 ""
 "Homepage: http://www.rasterbar.com/products/libtorrent/"
)


build() {
	cd $startdir/src/$pkgname-$pkgver
	./configure --prefix=/usr --libdir=/usr/lib${LIBDIRSUFFIX} --localstatedir=/var --sysconfdir=/etc \
	--disable-static \
    --enable-python-binding \
    --with-zlib=system \
    --with-boost-system=mt \
    --with-boost-filesystem=mt \
    --with-boost-thread=mt \
    --with-boost-regex=mt \
    --with-boost-program-options=mt \
    --build=$arch-slackware-linux
	
	make || return 1
	make install DESTDIR=$startdir/pkg
	
	mkdir -p $startdir/pkg/usr/doc/$pkgname-$pkgver
	cp -a docs $startdir/pkg/usr/doc/$pkgname-$pkgver || return 1

	# Install missing asio includes
    cp -a include/libtorrent/asio $startdir/pkg/usr/include/libtorrent/ || return 1
    chown -R root:root $startdir/pkg 

} 
