summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d5e37dabcb48060748f703c258cae6d8a16831df (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
# Maintainer: ZenQy <zenqy.qin@gmail.com>

pkgname=athens
pkgver=0.3.1
pkgrel=1
pkgdesc="A proxy server for the Go Modules download API"
arch=('x86_64')
url="https://github.com/gomods/athens"
license=('MIT')
depends=('glibc')
makedepends=('git' 'go')
source=("${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz" 'athens.service')
md5sums=('b6351cb11b81bdbbfd0b27ebb3372457'
         '5bb8e6295d07efcd72392f89702d9501')

build() {
  # rm "${srcdir}/${pkgname}-${pkgver}/go.sum"
  cd "${srcdir}/${pkgname}-${pkgver}/cmd/proxy"
  go build -ldflags "-extldflags ${LDFLAGS}" -buildmode=pie
}

package() {
  install -Dm755 "${srcdir}/${pkgname}-${pkgver}/cmd/proxy/proxy" "${pkgdir}/usr/bin/${pkgname}"
  install -Dm644 "${srcdir}/${pkgname}-${pkgver}/config.dev.toml" "${pkgdir}/etc/${pkgname}/config.toml"
  install -Dm644 "${srcdir}/${pkgname}-${pkgver}/LICENSE" "${pkgdir}/usr/share/licenses/athens/LICENSE"
  install -Dm644 "${srcdir}/athens.service" "$pkgdir/usr/lib/systemd/system/athens.service"
}