# Maintainer: Gaetan Bisson <bisson@archlinux.org>

pkgname=tsocks
pkgver=1.8beta5
pkgrel=9
pkgdesc='Transparent SOCKS proxying library'
url='http://tsocks.sourceforge.net/'
license=('GPL')
arch=('x86_64')
source=("https://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz")
sha512sums=('b41636ea6b77abf0d1e3cda7bbca4e7ee96f3cdb1843f3a2c530650931e5567f67921de67b28ba9bab0f51df39770a3f7fb458cf7ac78aad7aa861923df2c4a9')

build() {
	cd "${srcdir}/${pkgname}-1.8"
	export CPPFLAGS=
	./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man --libdir=/usr/lib
	make
}

package() {
	cd "${srcdir}/${pkgname}-1.8"
	make DESTDIR="${pkgdir}" install
	install -d "${pkgdir}/usr/share/${pkgname}"
	install -m644 tsocks.conf.{simple,complex}.example "${pkgdir}/usr/share/${pkgname}"
}
