# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Juergen Hoetzel <juergen@archlinux.org>
# Contributor: John Proctor <jproctor@prium.net>

pkgname=socat
pkgver=1.8.0.1
pkgrel=1
pkgdesc='Multipurpose relay'
url='http://www.dest-unreach.org/socat/'
license=('GPL-2.0-only')
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
depends=(
  'glibc'
  'openssl' 'libssl.so'
  'readline' 'libreadline.so'
)
checkdepends=(
  'bash'
  'net-tools'
  'procps-ng'
)
source=("http://www.dest-unreach.org/socat/download/${pkgname}-${pkgver}.tar.gz")
sha256sums=('dc350411e03da657269e529c4d49fe23ba7b4610b0b225c020df4cf9b46e6982')
b2sums=('a91977494f6d6a30a2b025b9b9d1f47232638b235603e9cab8ed4b559becbc9ebace582ec0280f246a655a2c23b588200a0aab5cf680a5b571e9e8fa2222a6d0')

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

  make
}

check() {
  cd "${pkgname}-${pkgver}"
  # TODO: one of the tests always fails, but lets keep
  # it for manual sanity check
  make test||true
}

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

# vim: ts=2 sw=2 et:
