summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c88d436bf8f829fdc33fc9cc083694adb9de9734 (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
# This file was generated by GoReleaser. DO NOT EDIT.
# Maintainer: Fernandez Ludovic <lfernandez dot dev at gmail dot com>

pkgname='motoko'
pkgver=0.3.2
pkgrel=2
pkgdesc='Based on Go modules, update a dependency to a major version.'
url='https://github.com/ldez/motoko'
arch=('aarch64' 'x86_64')
license=('APACHE')
provides=('motoko')
conflicts=('motoko')
makedepends=('go' 'git')
source=("${pkgname}_${pkgver}.tar.gz::https://github.com/ldez/motoko/releases/download/v0.3.2/motoko-v0.3.2-source.tar.gz")
sha256sums=('d6c0916b27834de3aa1f80ef98682ce315ab956f42278b0816cf8f2df7dad7bc')

build() {
  export BUILD_DATE=$(date -u '+%Y-%m-%d_%I:%M:%S%p')

  export CGO_CPPFLAGS="${CPPFLAGS}"
  export CGO_CFLAGS="${CFLAGS}"
  export CGO_CXXFLAGS="${CXXFLAGS}"
  export CGO_LDFLAGS="${LDFLAGS}"
  export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"

  go build -ldflags="-w -s -linkmode=external -X 'main.version=v${pkgver}' -X 'main.date=${BUILD_DATE}'"

  chmod +x "./${pkgname}"
}
package() {
  # Bin
  install -Dsm755 "./${pkgname}" "${pkgdir}/usr/bin/${pkgname}"

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