summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 141ef263d15a6462f1d5750ab656cabaf9bc723d (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: Karol "Kenji Takahashi" Wo┼║niak <kenji.sx>
# Contributor: Terin Stock <terinjokes@gmail.com>

pkgname=archiver
pkgver=3.5.0
pkgrel=1
pkgdesc="Easily create & extract archives, and compress & decompress files of various formats"
arch=("x86_64")
url="https://github.com/mholt/archiver"
license=("MIT")
makedepends=("go")
depends=("glibc")
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/mholt/archiver/archive/v${pkgver}.tar.gz")
sha256sums=('8f2e3ad68553f6b58bf99e8635ff0953f62ff0a7804da7658954ffaa7d0aaa0a')

build() {
  cd "${pkgname}-${pkgver}"
  go build \
    -trimpath \
	-buildmode=pie \
	-mod=readonly \
    -ldflags "-linkmode external -extldflags ${LDFLAGS}" \
    -o . ./cmd/arc/...
}

check() {
  cd "${pkgname}-${pkgver}"
  go test ./...
}

package() {
  cd "${pkgname}-${pkgver}"

  install -Dm755 arc -t "${pkgdir}/usr/bin"
  install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}