# $Id: PKGBUILD 229968 2015-01-24 17:42:53Z bisson $
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Juergen Hoetzel <juergen@archlinux.org>
# Contributor: John Proctor <jproctor@prium.net>

pkgname=socat
pkgver=1.7.4.1
pkgrel=1
pkgdesc='Multipurpose relay'
url='http://www.dest-unreach.org/socat/'
license=('GPL2')
arch=('i686' 'x86_64')
depends=('libreadline' 'openssl')
makedepends=('libreadline-devel' 'tar')
source=("http://www.dest-unreach.org/socat/download/${pkgname}-${pkgver}.tar.gz")
sha256sums=('0c7e635070af1b9037fd96869fc45eacf9845cb54547681de9d885044538736d')
noextract=("${pkgname}-${pkgver}.tar.gz")

prepare() {
  cd "${srcdir}"
  tar -xzf ${srcdir}/${pkgname}-${pkgver}.tar.gz -C ${srcdir} || true
}

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

  make
}

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