# Contributor: Jeff Bilyk # Maintainer: Natanael Copa pkgname=smokeping pkgver=2.8.2 pkgrel=3 pkgdesc="Smokeping network latency monitoring" pkgusers="smokeping" pkggroups="smokeping" install="$pkgname.pre-install" url="https://oss.oetiker.ch/smokeping/" options="!check" # No test suite source="https://oss.oetiker.ch/smokeping/pub/smokeping-$pkgver.tar.gz smokeping.initd musl-lc_numeric-utf8.patch smokeping-config.patch smokeping-silence.patch smokeping-2.8.2-no-3rd-party.patch smokeping-2.8.2-paths.patch " depends=" font-dejavu fping perl perl-cgi perl-cgi-fast perl-cgi-session perl-config-grammar perl-data-hexdump perl-digest-hmac perl-fcgi perl-io-socket-ssl perl-io-tty perl-ldap perl-libwww perl-mozilla-ca perl-net-dns perl-net-ip perl-net-openssh perl-net-snmp perl-net-telnet perl-text-soundex perl-rrd perl-snmp-session perl-uri rrdtool " makedepends=" autoconf automake openssl-dev>3 perl-dev perl-try-tiny zlib-dev " arch="noarch !riscv64" license="GPL-2.0-or-later" subpackages="$pkgname-doc $pkgname-openrc" _vendorlib=/usr/share/perl5/vendor_perl prepare() { default_prepare # provided by perl-snmp-session rm -r lib/BER.pm lib/SNMP_Session.pm lib/SNMP_util.pm } build() { ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --bindir=/usr/bin \ --libdir=/usr/lib \ --sysconfdir=/etc/smokeping \ --libexecdir=/usr/libexec \ --datarootdir=/usr/share \ --mandir=/usr/share/man \ --with-htdocs-dir=/usr/share/webapps/smokeping make DESTDIR="$pkgdir" } package() { make DESTDIR="$pkgdir" install for i in basepage.html config smokemail smokeping_secrets tmail; do mv "$pkgdir"/etc/smokeping/$i.dist "$pkgdir"/etc/smokeping/$i done # Next part here cleans up the mess that the Makefile leaves behind... # Install cgi in the right spot and fix permissions mv "$pkgdir"/usr/share/webapps/smokeping/smokeping.fcgi.dist \ "$pkgdir"/usr/share/webapps/smokeping/smokeping.cgi chmod 755 "$pkgdir"/usr/share/webapps/smokeping/smokeping.cgi # Fix path to config sed -e 's:etc/config:etc/smokeping/config:' \ -i "$pkgdir"/usr/bin/smokeinfo sed -e 's:etc/config.dist:etc/smokeping/config:' \ -i "$pkgdir"/usr/bin/tSmoke # Create softlink for image directory ln -s /var/lib/smokeping/images/ "$pkgdir"/usr/share/webapps/smokeping/img sed -e '/^