Initial commit

This commit is contained in:
Trey Blancher 2024-05-18 17:19:13 -04:00
commit 023b3d758b
2 changed files with 83 additions and 0 deletions

22
.SRCINFO Normal file
View File

@ -0,0 +1,22 @@
pkgbase = newrelic-infra
pkgdesc = New Relic Infrastructure Agent
pkgver = 1.52.3
pkgrel = 1
url = https://github.com/newrelic/infrastructure-agent/
changelog = CHANGELOG
arch = x86_64
arch = aarch64
arch = armv7h
groups = newrelic
license = Apache-2.0
makedepends = go
provides = newrelic-infra
conflicts = newrelic-infra-bin
options = !buildflags
backup = etc/newrelic-infra/newrelic-infra.yml
source = newrelic-infra-1.52.3.tar.gz::https://github.com/newrelic/infrastructure-agent/archive/refs/tags/1.52.3.tar.gz
source = newrelic-infra.yml::https://github.com/newrelic/infrastructure-agent/blob/master/assets/examples/infrastructure/newrelic-infra-template.yml.example
sha256sums = ea2301431060e6857299f349e0860fe5990dcd74c6231b93e24f0a7225748f8b
sha256sums = 70bd06d07fa74e785ec9e4b44a32123c2fddeb3aad6ce1278f717135495b52a5
pkgname = newrelic-infra

61
PKGBUILD Normal file
View File

@ -0,0 +1,61 @@
# 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')