summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d55b76407527c766697ec56af06ff0bdbaf4f24e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Maintainer: Rafael Dominiquini <rafaeldominiquini at gmail dor com>

_pkgauthor=sachaos
_pkgname=tcpterm
pkgname=${_pkgname}-bin
pkgver=0.0.2
pkgrel=1
pkgdesc='A packet visualizer in TUI.'
url="https://github.com/${_pkgauthor}/${_pkgname}"
_urlraw="https://raw.githubusercontent.com/${_pkgauthor}/${_pkgname}/v${pkgver}"
arch=('x86_64')
license=('MIT')
depends=('glibc')
makedepends=('help2man')
conflicts=("${_pkgname}")
provides=("${_pkgname}")
source=("LICENSE"
        "README-${pkgver}.md::${_urlraw}/README.md")
source_x86_64=("${_pkgname}-${pkgver}::${url}/releases/download/v${pkgver}/${_pkgname}_linux_amd64")
sha256sums=('ec47d46b24ee9d8a58af1c6f75e3dae84afacaa303c40d12d378e870b1f4fd51'
            '6fcbefe8d40e664f37c372ad961774177ab76273f3a725d2ef392945f4b6dd97')
sha256sums_x86_64=('f54d102afa5e5211a948a421f98877db7164f893dde369b8dbfa1985dec80a4d')

prepare() {
  cd "${srcdir}/" || exit

  chmod +x ./${_pkgname}-${pkgver}
}

build() {
  cd "${srcdir}/" || exit

  help2man ./${_pkgname}-${pkgver} --output "MAN-${pkgver}.1" --no-info
  gzip "MAN-${pkgver}.1"
}

package() {
  cd "${srcdir}/" || exit

  install -Dm755 "${_pkgname}-${pkgver}" "${pkgdir}/usr/bin/${_pkgname}"

  install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

  install -Dm644 "README-${pkgver}.md" "${pkgdir}/usr/share/doc/${pkgname}/README.md"

  install -Dm644 "MAN-${pkgver}.1.gz" "${pkgdir}/usr/share/man/man1/${_pkgname}.1.gz"
}