# Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
# Contributor: dorphell <dorphell@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>

pkgname=httptunnel
pkgver=3.3
pkgrel=7
pkgdesc="Creates a bidirectional virtual data connection tunnelled in HTTP requests"
arch=('x86_64')
url="https://github.com/larsbrinkhoff/httptunnel"
license=('GPL2')
depends=('glibc')
source=("https://ftp.gnu.org/pub/gnu/${pkgname}/$pkgname-$pkgver.tar.gz"
        'httptunnel-3.3-build-fix.patch')
md5sums=('493cc0f5f21e9955db27ee9cd9a976d5'
         '65c1f8a2a847fb4af106c9358f9e0be8')

prepare() {
  cd "${srcdir}"/$pkgname-$pkgver
  patch -p0 -i ../httptunnel-3.3-build-fix.patch
}

build() {
  cd "${srcdir}"/$pkgname-$pkgver
  ./configure --prefix=/usr --mandir=/usr/share/man
  make
}

package() {
  cd "${srcdir}"/$pkgname-$pkgver
  make DESTDIR="${pkgdir}" install
}
