181 lines
4.6 KiB
Bash
181 lines
4.6 KiB
Bash
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
|
|
# Maintainer: Carl Smedstad <carsme@archlinux.org>
|
|
# Contributor: Florian Pritz <bluewind@xinu.at>
|
|
# Contributor: Eric Bélanger <eric@archlinux.org>
|
|
|
|
pkgname=syslog-ng
|
|
pkgver=4.8.1
|
|
pkgrel=3
|
|
pkgdesc="Next-generation syslogd with advanced networking and filtering capabilities"
|
|
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
|
|
url="https://github.com/syslog-ng/syslog-ng"
|
|
license=(
|
|
GPL-2.0-or-later
|
|
LGPL-2.1-or-later
|
|
)
|
|
depends=(
|
|
abseil-cpp
|
|
bash
|
|
curl
|
|
gawk
|
|
gcc-libs
|
|
glib2
|
|
glibc
|
|
grpc
|
|
json-c
|
|
libcap
|
|
libnet
|
|
openssl
|
|
pcre2
|
|
protobuf
|
|
systemd-libs
|
|
)
|
|
makedepends=(
|
|
autoconf-archive
|
|
docbook-xsl
|
|
git
|
|
gperf
|
|
hiredis
|
|
libdbi
|
|
libesmtp
|
|
libmaxminddb
|
|
librabbitmq-c
|
|
librdkafka
|
|
libxslt
|
|
mongo-c-driver
|
|
net-snmp
|
|
python
|
|
python-boto3
|
|
python-botocore
|
|
python-cachetools
|
|
python-certifi
|
|
python-charset-normalizer
|
|
python-dateutil
|
|
python-google-auth
|
|
python-idna
|
|
python-kubernetes
|
|
python-oauthlib
|
|
python-ply
|
|
python-pyasn1
|
|
python-pyasn1-modules
|
|
python-pyyaml
|
|
python-requests
|
|
python-requests-oauthlib
|
|
python-rsa
|
|
python-setuptools
|
|
python-six
|
|
python-urllib3
|
|
python-websocket-client
|
|
systemd
|
|
)
|
|
checkdepends=(
|
|
criterion
|
|
python-pytest
|
|
python-pytest-mock
|
|
)
|
|
optdepends=(
|
|
'hiredis: for the Redis plugin'
|
|
'libdbi: for the SQL plugin'
|
|
'libesmtp: for the SMTP plugin'
|
|
'libmaxminddb: for the GeoIP2 plugin'
|
|
'librabbitmq-c: for the AMQP plugin'
|
|
'librdkafka: for the Kafka C plugin'
|
|
'logrotate: for rotating log files'
|
|
'mongo-c-driver: for the MongoDB plugin'
|
|
'net-snmp: for the SNMP plugin'
|
|
'python-boto3: for Python S3 module'
|
|
'python-botocore: for Python S3 module'
|
|
'python-kubernetes: for Python Kubernetes module'
|
|
'python-ply: for debugger CLI'
|
|
'python-requests: for Python hypr module'
|
|
'python: for Python-based plugins'
|
|
)
|
|
conflicts=(eventlog)
|
|
replaces=(eventlog)
|
|
backup=(
|
|
"etc/$pkgname/$pkgname.conf"
|
|
"etc/logrotate.d/$pkgname"
|
|
"etc/default/$pkgname@default"
|
|
)
|
|
install=$pkgname.install
|
|
source=(
|
|
"git+$url.git#tag=$pkgname-$pkgver"
|
|
"git+https://github.com/buytenh/ivykis.git"
|
|
"git+https://github.com/open-telemetry/opentelemetry-proto.git"
|
|
"git+https://github.com/Thalhammer/jwt-cpp.git"
|
|
"$pkgname.logrotate"
|
|
"$pkgname-systemd-integration.patch"
|
|
"$pkgname-do-not-install-python-venv.patch"
|
|
"$pkgname-config.patch"
|
|
)
|
|
sha256sums=('7e8568185e4e2380417ac0db8ab3773721bcfb117d378776ef9f1953bc4faf25'
|
|
'SKIP'
|
|
'SKIP'
|
|
'SKIP'
|
|
'93c935eca56854011ea9e353b7a1da662ad40b2e8452954c5b4b5a1d5b2d5317'
|
|
'12e7d38ca2b79aae9417207a7b3a777f8f7646cc23bddfd383a6a6e9b7014d6e'
|
|
'7ca7f0d9fb203b3814fe2f609904af84df346b84591eeeb171bb2e5eb6393990'
|
|
'1039550b091df1a50e8d30b624d52a7fd56c29d0ceec596b4b029a7cc92a3825')
|
|
|
|
prepare() {
|
|
cd $pkgname
|
|
git submodule init
|
|
git config submodule.lib/ivykis.url "$srcdir/ivykis"
|
|
git config submodule.modules/grpc/protos/opentelemetry-proto.url "$srcdir/opentelemetry-protos"
|
|
git config submodule.modules/cloud-auth/jwt-cpp.url "$srcdir/jwt-cpp"
|
|
git -c protocol.file.allow=always submodule update
|
|
|
|
patch -Np1 -i "$srcdir/$pkgname-systemd-integration.patch" # Fix paths for systemd integration.
|
|
patch -Np1 -i "$srcdir/$pkgname-do-not-install-python-venv.patch" # Don't install Python venv using pip.
|
|
patch -Np1 -i "$srcdir/$pkgname-config.patch" # Add further distribution examples, disable default log file.
|
|
|
|
# Remove tests failing in a chroot but not on host. Not sure why.
|
|
sed -i '/include lib\/secret-storage\/tests\/Makefile.am/d' lib/secret-storage/Makefile.am
|
|
rm -r lib/secret-storage/tests
|
|
|
|
./autogen.sh
|
|
}
|
|
|
|
build() {
|
|
cd $pkgname
|
|
local configure_options=(
|
|
--datadir=/usr/share
|
|
--disable-java
|
|
--disable-java-modules
|
|
--disable-mqtt
|
|
--disable-riemann
|
|
--enable-all-modules
|
|
--enable-ipv6
|
|
--enable-manpages
|
|
--enable-spoof-source
|
|
--enable-systemd
|
|
--libexecdir=/usr/lib
|
|
--localstatedir="/var/lib/$pkgname"
|
|
--prefix=/usr
|
|
--sbindir=/usr/bin
|
|
--sysconfdir="/etc/$pkgname"
|
|
--with-jsonc=system
|
|
--with-pidfile-dir=/run
|
|
--with-python-packages=system
|
|
--with-systemdsystemunitdir=/usr/lib/systemd/system
|
|
)
|
|
./configure "${configure_options[@]}"
|
|
|
|
# Prevent excessive overlinking due to libtool.
|
|
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
|
|
make
|
|
}
|
|
|
|
check() {
|
|
cd $pkgname
|
|
make check
|
|
}
|
|
|
|
package() {
|
|
cd $pkgname
|
|
make DESTDIR="$pkgdir" install
|
|
install -vDm644 -t "$pkgdir/etc/default" contrib/systemd/$pkgname@default
|
|
install -vdm755 "$pkgdir/var/lib/$pkgname"
|
|
install -vDm644 "$srcdir/$pkgname.logrotate" "$pkgdir/etc/logrotate.d/$pkgname"
|
|
}
|