diff options
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | PKGBUILD | 26 |
2 files changed, 22 insertions, 12 deletions
@@ -1,18 +1,14 @@ pkgbase = ccat pkgdesc = Colorizes output for cat. pkgver = 1.1.0 - pkgrel = 3 + pkgrel = 4 url = https://github.com/jingweno/ccat arch = any - license = CUSTOM + license = MIT makedepends = go - makedepends = git conflicts = ccat-git conflicts = ccrypt - options = !strip - options = !emptydirs source = https://github.com/jingweno/ccat/archive/v1.1.0.tar.gz sha256sums = b02d2c8d573f5d73595657c7854c9019d3bd2d9e6361b66ce811937ffd2bfbe1 pkgname = ccat - @@ -4,21 +4,35 @@ pkgname=ccat pkgver=1.1.0 -pkgrel=3 +pkgrel=4 pkgdesc="Colorizes output for cat." arch=('any') url="https://github.com/jingweno/ccat" -license=('CUSTOM') -makedepends=('go' 'git') +license=('MIT') +makedepends=('go') conflicts=('ccat-git' 'ccrypt') -options=('!strip' '!emptydirs') source=("${url}/archive/v${pkgver}.tar.gz") sha256sums=('b02d2c8d573f5d73595657c7854c9019d3bd2d9e6361b66ce811937ffd2bfbe1') +prepare() { + cd "${pkgname}-${pkgver}" + go mod init "${url#https://}" # strips https:// from URL + go mod tidy +} + build() { cd "${pkgname}-${pkgver}" - msg2 'Building...' - ./script/build + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" + go build -o ccat . +} + +check() { + cd "${pkgname}-${pkgver}" + go test ./... } package() { |