From e56ab77f9c0027be86c7ec44f5ba96862faa6969 Mon Sep 17 00:00:00 2001 From: Bas Ploeger <5904333+basploeger@users.noreply.github.com> Date: Sat, 2 Apr 2022 22:00:49 +0200 Subject: [PATCH] New package: apcupsd-3.14.14 --- srcpkgs/apcupsd/files/apcupsd/run | 3 +++ srcpkgs/apcupsd/template | 40 +++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 srcpkgs/apcupsd/files/apcupsd/run create mode 100644 srcpkgs/apcupsd/template diff --git a/srcpkgs/apcupsd/files/apcupsd/run b/srcpkgs/apcupsd/files/apcupsd/run new file mode 100644 index 000000000000..2c0b807da287 --- /dev/null +++ b/srcpkgs/apcupsd/files/apcupsd/run @@ -0,0 +1,3 @@ +#!/bin/sh +[ -r conf] && . ./conf +exec apcupsd -b ${OPTS} diff --git a/srcpkgs/apcupsd/template b/srcpkgs/apcupsd/template new file mode 100644 index 000000000000..892c66c41c27 --- /dev/null +++ b/srcpkgs/apcupsd/template @@ -0,0 +1,40 @@ +# Template file for 'apcupsd' +pkgname=apcupsd +version=3.14.14 +revision=1 +build_style=gnu-configure +configure_args=" + --disable-install-distdir + --enable-modbus-usb + --enable-usb + --sysconfdir=/etc/apcupsd + --with-dev='' + --with-halpolicydir= + --with-pwrfail-dir=/etc/apcupsd + --with-upscable=usb + --with-upstype=usb" +hostmakedepends="autoconf automake pkg-config" +makedepends="libusb-compat-devel net-snmp-devel" +depends="libusb-compat net-snmp nullmailer" +conf_files="/etc/apcupsd/*" +short_desc="APC UPS daemon with integrated tcp/ip remote shutdown" +maintainer="Bas Ploeger " +license="GPL-2.0-only" +homepage="http://www.apcupsd.org/" +distfiles="${SOURCEFORGE_SITE}/apcupsd/apcupsd-${version}.tar.gz" +checksum="db7748559b6b4c3784f9856561ef6ac6199ef7bd019b3edcd7e0a647bf8f9867" + +# Avoid passing an invalid arg 'strip' to the install command for the binaries. +make_install_args="STRIP=" + +pre_configure() { + export SHUTDOWN=/usr/bin/shutdown + export WALL=/usr/bin/wall + export APCUPSD_MAIL=/usr/bin/mail +} + +post_install() { + # This binary is not needed and conflicts with a binary from an other package. + rm ${DESTDIR}/usr/bin/smtp + vsv apcupsd +}