# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: kpcyrd <git@rxv.cc>

pkgname=rshijack
pkgver=0.4.0
pkgrel=1
pkgdesc='TCP connection hijacker, rust rewrite of shijack'
url='https://github.com/kpcyrd/rshijack'
depends=('gcc-libs')
makedepends=('cargo')
arch=('x86_64')
license=('GPL3')
source=(https://github.com/kpcyrd/${pkgname}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz
        https://github.com/kpcyrd/${pkgname}/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz.asc)
sha512sums=('cde0c8505d826fbe86344650fdf724a87ca879530b27617a8e841e620886324abca38809624f5b15c4a29e4bb81a0bab60c3fccd3c18dfccee27a9132d7ed210'
            'SKIP')
b2sums=('add1da1f86d3dd7bfb95b122ce4ad010c835e42fb5548633d95e9a7de9d296a27ee041ee246d4d205c0c1dd1233d48f787748a7cc7cd6f8fe059a45c3459a617'
        'SKIP')

validpgpkeys=("64B13F7117D6E07D661BBCE0FE763A64F5E54FD6")

build() {
  cd ${pkgname}-${pkgver}
  cargo build --release --locked
}

package() {
  cd ${pkgname}-${pkgver}
  install -Dm 755 target/release/${pkgname} "${pkgdir}/usr/bin/${pkgname}"
  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
  install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
}

# vim: ts=2 sw=2 et:
