db-move: moved webkit2gtk from [testing] to [extra] (x86_64)
[arch-packages.git] / usbguard / trunk / PKGBUILD
blobb06b949f66c3e715951ee713be2446a3502ebbb9
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Contributor: Ian Beringer <ian@ianberinger.com>
4 pkgname=usbguard
5 pkgver=1.1.2
6 pkgrel=1
7 pkgdesc='Software framework for implementing USB device authorization policies'
8 url='https://github.com/USBGuard/usbguard'
9 arch=('x86_64')
10 license=('GPL2')
11 depends=('glibc' 'libqb' 'libqb.so' 'libsodium' 'libcap-ng' 'protobuf' 'polkit' 'dbus-glib'
12          'audit' 'libaudit.so' 'libseccomp' 'libseccomp.so' 'libcap-ng.so' 'libgio-2.0.so'
13          'libglib-2.0.so' 'libprotobuf.so')
14 makedepends=('catch2' 'pegtl' 'libxslt' 'libxml2' 'asciidoc' 'systemd')
15 provides=('libusbguard.so')
16 backup=(etc/usbguard/usbguard-daemon.conf
17         etc/usbguard/rules.conf)
18 source=(https://github.com/USBGuard/usbguard/releases/download/usbguard-${pkgver}/usbguard-${pkgver}.tar.gz{,.asc})
19 sha512sums=('03b6dd026a0fe6a7a055208f09a56e2cc86985570388e33fde08671b8aa2d60ea4a0e59505e9646ddf50f42f5b6310d1b230379f9c26ec99c7ca736f3b4ad850'
20             'SKIP')
21 validpgpkeys=(
22   'DE78B93EAED8A620F5AA14DF52F7E84653274B59' # Radovan Sroka <rsroka@redhat.com>
25 prepare() {
26   cd ${pkgname}-${pkgver}
27   autoreconf -fiv
30 build() {
31   cd ${pkgname}-${pkgver}
32   ./configure \
33     --prefix=/usr \
34     --sysconfdir=/etc \
35     --localstatedir=/var \
36     --sys=/etc \
37     --sbindir=/usr/bin \
38     --libdir=/usr/lib \
39     --enable-systemd \
40     --without-bundled-catch \
41     --without-bundled-pegtl \
42     --with-dbus \
43     --with-polkit \
44     --with-crypto-library=sodium
45   make
46   touch rules.conf
49 check() {
50   cd ${pkgname}-${pkgver}
51   make check
54 package() {
55   cd ${pkgname}-${pkgver}
56   make INSTALL='install -p' DESTDIR="${pkgdir}" install
58   chmod 750 "${pkgdir}/etc/usbguard"
59   install -Dpm 600 usbguard-daemon.conf rules.conf -t "${pkgdir}/etc/usbguard"
61   install -Dpm 644 scripts/bash_completion/usbguard -t "${pkgdir}/usr/share/bash-completion/completions"
62   install -Dpm 644 scripts/usbguard-zsh-completion "${pkgdir}/usr/share/zsh/site-functions/_usbguard"
64   install -Dm 644 CHANGELOG.md README.adoc -t "${pkgdir}/usr/share/doc/${pkgname}"
67 # vim: ts=2 sw=2 et: