archrelease: copy trunk to community-any
[ArchLinux/community.git] / nut / repos / community-x86_64 / PKGBUILD
blobece4e6144f88825a6259da991829c90345a06265
1 # Maintainer: Maxime Gauduin <alucryd@archlinux.org>
2 # Contributor: Florian Bruhin <archlinux.org@the-compiler.org>
3 # Contributor: Alex Reznichenko <sa5gap@yandex.ru>
4 # Contributor: Roman Kyrylych <roman@archlinux.org>
5 # Contributor: Giuseppe Lucarelli <luk@rebelsoft.org>
6 # Contributor: Dan Ziemba <zman0900@gmail.com>
8 pkgname=nut
9 pkgver=2.8.0
10 pkgrel=3
11 pkgdesc='A collection of programs which provide a common interface for monitoring and administering UPS, PDU and SCD hardware'
12 arch=(x86_64)
13 url=https://networkupstools.org/
14 license=(
15   GPL2
16   GPL3
18 depends=(
19   gcc-libs
20   glibc
21   libtool
22   libusb-compat
23   neon
24   net-snmp
25   openssl
27 makedepends=(
28   asciidoc
29   gd
30   git
31   python
32   systemd
34 optdepends=('gd: CGI support')
35 provides=(network-ups-tools)
36 conflicts=(network-ups-tools)
37 replaces=(network-ups-tools)
38 options=(!makeflags)
39 backup=(
40   etc/nut/hosts.conf
41   etc/nut/nut.conf
42   etc/nut/ups.conf
43   etc/nut/upsd.conf
44   etc/nut/upsd.users
45   etc/nut/upsmon.conf
46   etc/nut/upssched.conf
47   etc/nut/upsstats.html
48   etc/nut/upsstats-single.html
50 _tag=ff16dabca191e5fd8ddc20137317bdebee554d8d
51 source=(
52   git+https://github.com/networkupstools/nut.git#tag=${_tag}
53   nut.sysusers
54   nut.tmpfiles
55   nut-lowspeed-buffer-size.patch
56   nut-no-libdummy.patch
57   nut-openssl-1.1.patch
58   nut-snmp-usb-order.patch
60 b2sums=('SKIP'
61         'b136678723bae38f2e1b99d682e5bad6c4387c2d709052681f1dc0d41e8dd6d061115f6d3e573400bded671296ca61e5e194258e801c83f26bf309313b3f2319'
62         'b5466d4142fdeadd07859c030a9e6f7a73f1a4f3902a07b6e8b9a5ead738279ff557ac21770edef21e55b015a3b19cd9579e638da0a37f102ed130ed749ac03b'
63         'cdd11335a8d60b2cada25a2cd9be2d0f1c911029a46e3adf8eda7d8687c1b2caf0fd66cd92c41ecbd660d44bc2606e92aa81d4a2c9746b2ef9e15c4048679487'
64         '0314fe2358fab9d49a8bc5b939c2855151c4f35b2b51e6d1accf25469c9d55831960cd5f9b53ee151fb5a45ae7068c9bfcc91c84a7623b783f6c3c5d5da75d65'
65         '17877276e46372aa17d357efc0851b9cdb33b14ac0c40913b47ea513a8ecaa6eebe3241ae8b324583070d76b6c12d3cf18c043778754b5774af846fb8a33b4d7'
66         'e39f049413cb3d393befe5795c895128271f4ca2791b5723eba5c5f20be0b770369ee6144a1e5d6793727709b1ba578d8ace6cbf91695a2771453047827e5334')
68 pkgver() {
69   cd nut
70   git describe --tags | sed 's/^v//'
73 prepare() {
74   cd nut
75   ./autogen.sh
78 build() {
79   cd nut
80   ./configure \
81     --prefix=/usr \
82     --datadir=/usr/share/nut \
83     --libexecdir=/usr/lib/nut \
84     --sbindir=/usr/bin \
85     --sysconfdir=/etc/nut \
86     --disable-static \
87     --with-user=nut \
88     --with-group=nut \
89     --with-altpidpath=/run/nut \
90     --with-cgipath=/usr/share/nut/cgi \
91     --with-drvpath=/usr/lib/nut \
92     --with-htmlpath=/usr/share/nut/html \
93     --with-pidpath=/run/nut \
94     --with-statepath=/var/lib/nut \
95     --with-systemdsystemunitdir=/usr/lib/systemd/system \
96     --with-udev-dir=/usr/lib/udev \
97     --with-cgi \
98     --with-dev \
99     --with-doc=man \
100     --with-libltdl \
101     --with-neon \
102     --with-openssl \
103     --with-serial \
104     --with-snmp \
105     --with-usb \
106     --without-avahi \
107     --without-ipmi \
108     --without-freeipmi \
109     --without-powerman \
110     --without-wrap
111   make
114 package() {
115   make DESTDIR="${pkgdir}" -C nut install
116   find "${pkgdir}"/etc/nut -name *.sample -exec rename '.sample' '' {} \;
117   install -Dm 644 nut.sysusers "${pkgdir}"/usr/lib/sysusers.d/nut.conf
118   install -Dm 644 nut.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/nut.conf
121 # vim: ts=2 sw=2 et: