jobextra/nut/PKGBUILD

112 lines
3.1 KiB
Bash

#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=nut
pkgver=2.8.1
pkgrel=02
pkgdesc='A collection of programs which provide a common interface for monitoring and administering UPS, PDU and SCD hardware'
url=https://networkupstools.org/
depends=(gcc-libs glibc libtool libusb-compat neon net-snmp openssl)
makedepends=(asciidoc gd git python)
optdepends=('gd: CGI support')
provides=(network-ups-tools)
conflicts=(network-ups-tools)
replaces=(network-ups-tools)
options=(!makeflags)
backup=(
etc/nut/hosts.conf
etc/nut/nut.conf
etc/nut/ups.conf
etc/nut/upsd.conf
etc/nut/upsd.users
etc/nut/upsmon.conf
etc/nut/upssched.conf
etc/nut/upsstats.html
etc/nut/upsstats-single.html
)
_tag=4ba352d8f82e4c51032d4166d4cc3276b31fb3a5
source=(
git+https://github.com/networkupstools/nut.git#tag=${_tag}
nut.sysusers
nut.tmpfiles
nut-lowspeed-buffer-size.patch
nut-no-libdummy.patch
nut-openssl-1.1.patch
nut-snmp-usb-order.patch
)
pkgver() {
cd nut
git describe --tags | sed 's/^v//'
}
prepare() {
cd nut
./autogen.sh
}
build() {
cd nut
./configure \
--prefix=/usr \
--datadir=/usr/share/nut \
--libexecdir=/usr/lib/nut \
--sbindir=/usr/bin \
--sysconfdir=/etc/nut \
--disable-static \
--with-user=nut \
--with-group=nut \
--with-altpidpath=/run/nut \
--with-cgipath=/usr/share/nut/cgi \
--with-drvpath=/usr/lib/nut \
--with-htmlpath=/usr/share/nut/html \
--with-pidpath=/run/nut \
--with-statepath=/var/lib/nut \
--with-systemdsystemunitdir=no \
--with-udev-dir=/usr/lib/udev \
--with-cgi \
--with-dev \
--with-doc=man \
--with-libltdl \
--with-neon \
--with-openssl \
--with-serial \
--with-snmp \
--with-usb \
--without-dbus \
--without-avahi \
--without-ipmi \
--without-freeipmi \
--without-powerman \
--without-wrap
make
}
package() {
make DESTDIR="${pkgdir}" -C nut install
find "${pkgdir}"/etc/nut -name *.sample -exec rename '.sample' '' {} \;
install -Dm 644 nut.sysusers "${pkgdir}"/usr/lib/sysusers.d/nut.conf
install -Dm 644 nut.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/nut.conf
}
#---- arch license gpg-key & sha256sums ----
arch=(x86_64)
license=(GPL2 GPL3)
sha256sums=(SKIP # git
3001e24969545136361670c5d615684d2b37830525e090c2ab3bcfa90d90e4ac # nut.sysusers
c924ccaae9ec75ee7795c872e1708d10201402642a6d5de2304cc644744bbcc5 # nut.tmpfiles
40d6fc328ad2e127f580bb359bd5c2fb721a2c6cf1860334be96c18552d6f8f7 # nut-lowspeed-buffer-size.patch
b35a8d28fde10668e8e54e97be9c5505f296c989e67da847c5abf1acab6a219b # nut-no-libdummy.patch
717e116aa93f42ccca901de920da3ff97407672003f721b4976caf525f3e5f08 # nut-openssl-1.1.patch
c2c7d3b72f94f9c7987ab047bba466923c63ddb80b468485f100b1e44997ec84) # nut-snmp-usb-order.patch
## e9cbd2ee1d1ab1d4fa31b6ca729c82689b63b30a7412a1a9f33d74815db8aaba nut-2.8.1-02-x86_64.pkg.tar.lz