summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4c230d4c5511db99a59e22b5b81f4392cce3153f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# Maintainer: Pi-Yueh Chuang <pychuang@pm.me>
# Contributor: Kenneth Endfinger <kaendfinger@gmail.com>

pkgname=fwupd-git
pkgver=1.9.10.r640.g96cc2c6bc
pkgrel=1
pkgdesc="Simple daemon to allow session software to update firmware"
arch=('x86_64')
url="https://github.com/fwupd/fwupd"
license=('LGPL')
depends=(
    'bluez'
    'diffutils'
    'efivar'
    'flashrom'
    'fwupd-efi'
    'hicolor-icon-theme'
    'gcab'
    'glib2'
    'gnutls'
    'gzip'
    'polkit'
    'python'
    'python-gobject'
    'sqlite'
    'libxmlb'
    'libgusb'
    'libjcat'
    'libarchive.so'
    'libjson-glib-1.0.so'
    'libmm-glib'
    'libcurl.so'
    'libcbor.so'
    'libsmbios'
    'libsystemd.so'
    'liblzma.so'
    'libgudev-1.0.so'
    'libprotobuf-c.so'
    'libqmi'
)
optdepends=(
    'udisks2: UEFI firmware upgrade support'
)
makedepends=(
    'bash-completion'
    'git'
    'gobject-introspection'
    'meson'
    'python-cairo'
    'python-jinja'
    'python-markdown'
    'vala'
    'valgrind'
)
checkdepends=(
    'umockdev'
    'python-dbusmock'
)
provides=('libfwupd.so' 'libfwupdplugin.so' "${pkgname%-git}")
conflicts=("${pkgname%-git}")
backup=(
    'etc/fwupd/daemon.conf'
    'etc/fwupd/redfish.conf'
    'etc/fwupd/remotes.d/dell-esrt.conf'
    'etc/fwupd/remotes.d/fwupd-tests.conf'
    'etc/fwupd/remotes.d/lvfs-testing.conf'
    'etc/fwupd/remotes.d/lvfs.conf'
    'etc/fwupd/remotes.d/vendor-directory.conf'
    'etc/fwupd/remotes.d/vendor.conf'
    'etc/fwupd/thunderbolt.conf'
    'etc/fwupd/uefi_capsule.conf'
)
source=("${pkgname}::git+https://github.com/fwupd/fwupd.git")
sha512sums=('SKIP')

pkgver() {
    cd "${srcdir}/${pkgname}"
    git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
    arch-meson "${srcdir}/${pkgname}" "${srcdir}/build" \
        -D passim=disabled \
        -D b_lto=false \
        -D docs=disabled \
        -D man=true \
        -D plugin_powerd=disabled \
        -D supported_build=enabled \
        -D launchd=disabled \
        -D efi_binary=false
}

build() {
    meson compile -C "${srcdir}/build" -j 0
}

check() {
    CACHE_DIRECTORY=/tmp meson test -C "${srcdir}/build"
}

package() {
    DESTDIR="${pkgdir}" meson install -C "${srcdir}/build"

    # Fixup mode to match polkit
    install -d -o root -g 102 -m 750 "${pkgdir}"/usr/share/polkit-1/rules.d

    # Remove the tests
    rm -r "${pkgdir}"/usr/share/installed-tests/
    mv "${pkgdir}"/usr/bin/{,fwupd-}dbxtool
    mv "${pkgdir}"/usr/share/man/man1/{,fwupd-}dbxtool.1

    # Remove msr module-load config as it is built-in
    rm "${pkgdir}"/usr/lib/modules-load.d/fwupd-msr.conf
    rmdir "${pkgdir}"/usr/lib/modules-load.d
}