summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 135387286d62cf4a4ece5596bbfb291ab62f8c1e (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
# Maintainer: Nai Erchou <naierchou@mail.ru>
pkgname=enc-dec-uricomp
pkgver=0.0.1
pkgrel=0
epoch=
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
pkgdesc="Provides encodeuricomponent, decodeuricomonent and trim which you can feed from stdin"
arch=('any')
url="https://gitverse.ru/naierchou/mybible-module-mgb"
license=('GPL-3')
depends=()
makedepends=('go')
source=("git+https://gitverse.ru/naierchou/enc-dec-uricomp.git")
sha256sums=("SKIP")

pkgver() {
  cd "$srcdir/${pkgname%-git}"
  git rev-parse --short HEAD
}

build() {
  cd "$srcdir/${pkgname%-git}"
  go build -o build/encodeuricomponent ./cmd/encodeuricomponent
  go build -o build/decodeuricomponent ./cmd/decodeuricomponent
  go build -o build/trim ./cmd/trim
}

package() {
  PREFIX="/usr/local"
  cd "$srcdir/${pkgname%-git}"
  install -d $pkgdir${PREFIX}/bin/
  install -d $pkgdir${PREFIX}/share/enc-dec-uricomp/license/
  cp build/* $pkgdir${PREFIX}/bin/
  cp LICENSE $pkgdir${PREFIX}/share/enc-dec-uricomp/license/
}