62 lines
1.8 KiB
Bash
62 lines
1.8 KiB
Bash
|
# Maintainer: Trey Blancher $(base64 -d <<< dHJleUBibGFuY2hlci5uZXQK)
|
||
|
pkgname=newrelic-infra
|
||
|
_name='infrastructure-agent'
|
||
|
pkgver=1.52.3
|
||
|
pkgrel=1
|
||
|
pkgdesc="New Relic Infrastructure Agent"
|
||
|
arch=('x86_64' 'aarch64' 'armv7h')
|
||
|
url="https://github.com/newrelic/${_name}/"
|
||
|
license=('Apache-2.0')
|
||
|
groups=('newrelic')
|
||
|
makedepends=('go')
|
||
|
optdepends=()
|
||
|
options=(!buildflags)
|
||
|
provides=("${pkgname}")
|
||
|
conflicts=("${pkgname}-bin")
|
||
|
backup=("etc/${pkgname}/${pkgname}.yml")
|
||
|
changelog=CHANGELOG
|
||
|
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/newrelic/${_name}/archive/refs/tags/$pkgver.tar.gz"
|
||
|
"${pkgname}.yml::https://github.com/newrelic/infrastructure-agent/blob/master/assets/examples/infrastructure/newrelic-infra-template.yml.example")
|
||
|
|
||
|
build() {
|
||
|
cd "${srcdir}/${_name}-$pkgver"
|
||
|
make compile
|
||
|
make dist
|
||
|
}
|
||
|
|
||
|
# Ignoring this because `make test` fails for me, I think it fails because some
|
||
|
# tests have no files associated with them.
|
||
|
#
|
||
|
# check() {
|
||
|
# cd "${_name}-$pkgver"
|
||
|
# make test
|
||
|
#}
|
||
|
|
||
|
package() {
|
||
|
cd "${srcdir}/${_name}-$pkgver"
|
||
|
local _arch
|
||
|
case $(uname -m) in
|
||
|
x86_64)
|
||
|
_arch="amd64"
|
||
|
;;
|
||
|
aarch64)
|
||
|
_arch="arm64"
|
||
|
;;
|
||
|
armv7h)
|
||
|
_arch="arm"
|
||
|
;;
|
||
|
*)
|
||
|
print "Unknown architecture $(uname -m)! Exiting..." >&2
|
||
|
exit 1
|
||
|
;;
|
||
|
esac
|
||
|
install -dm u=rwx,go=rx "${pkgdir}/usr/bin"
|
||
|
install -dm u=rwx,go=rx "${pkgdir}/etc/${pkgname}"
|
||
|
install -Dm u=rwx,go=rx \
|
||
|
dist/linux-${pkgname}{,-ctl,-service}_linux_${_arch}/${pkgname}* \
|
||
|
"${pkgdir}/usr/bin/"
|
||
|
install -Dm u=rw,go=r "${srcdir}/${pkgname}.yml" "${pkgdir}/etc/${pkgname}/"
|
||
|
}
|
||
|
sha256sums=('ea2301431060e6857299f349e0860fe5990dcd74c6231b93e24f0a7225748f8b'
|
||
|
'70bd06d07fa74e785ec9e4b44a32123c2fddeb3aad6ce1278f717135495b52a5')
|