pkgbuilds/splunkforwarder/PKGBUILD

37 lines
1.6 KiB
Bash
Raw Normal View History

2023-08-30 19:27:59 -06:00
# Maintainer: L. Bradley LaBoon <me@bradleylaboon.com>
pkgname=splunkforwarder
2023-11-17 16:33:06 -06:00
basever=9.1.1
splunkver=${basever}-64e843ea36b1
2023-08-30 19:27:59 -06:00
# Splunk is inconsistent with the length of their version numbers
if [ ${#basever} -gt 5 ]; then
pkgver=${basever}
else
pkgver=${basever}.0
fi
pkgrel=1
epoch=3
pkgdesc="Splunk Universal Forwarder"
url="https://www.splunk.com/"
arch=('x86_64' 'aarch64')
license=('custom')
conflicts=('splunk')
install="$pkgname.install"
source=("$pkgname.service" "$pkgname.sysusers" "$pkgname.tmpfiles")
source_x86_64=("https://download.splunk.com/products/universalforwarder/releases/$basever/linux/$pkgname-$splunkver-Linux-x86_64.tgz")
source_aarch64=("https://download.splunk.com/products/universalforwarder/releases/$basever/linux/$pkgname-$splunkver-Linux-armv8.tgz")
sha256sums=('39bbd367e561fb2eac0be5bc23e32484d3728d0f5dde9cbcfd2295eff93ce8c3'
'27d1d172add8c64a275ec3356f0fa0b9d56036a7e64b7b882e066a67f6173b5b'
'bca1b7720a827973f1c959cb78d788324f47dd6fcfc03bf4452c457f2d044db5')
2023-11-17 16:33:06 -06:00
sha256sums_x86_64=('caeffbe149eac13ab5e77da4492bd76aff7214e976ab8122a637bf578b641437')
sha256sums_aarch64=('307fbe1ba8018108986e05a6cdce49314ebc03ad6552ba28164629df7974aae5')
2023-08-30 19:27:59 -06:00
package() {
cd "$srcdir"
install -vDm 644 ${pkgname}.sysusers "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
install -vDm 644 ${pkgname}.tmpfiles "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
install -Dm644 "$pkgname/license-eula.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -Dm644 "$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service"
mkdir "$pkgdir/opt"
cp -r "$pkgname" "$pkgdir/opt/"
}