blob: dfae34fcfe3edd3e1c13fb8a3a0c2f38350042b2 (
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
# Maintainer: dreieck (https://aur.archlinux.org/account/dreieck)
# Contributor: slact (https://aur.archlinux.org/account/slact)
# Contributor: Jan de Groot <jgc@archlinux.org>
# Contributor: Star Brilliant (https://aur.archlinux.org/account/m13253)
_pkgname=upower
pkgname="${_pkgname}-nosystemd-git"
pkgver=1.90.7+1.r1765.20250109.08bfb29
pkgrel=2
pkgdesc="Abstraction for enumerating power devices, listening to device events and querying history and statistics. Built without systemd dependencies. Latest Git checkout."
arch=(
'i686'
'x86_64'
)
url="http://upower.freedesktop.org"
license=(
'GPL-2.0-or-later'
)
depends=(
'gcc-libs'
'glibc'
'libgudev'
'libimobiledevice'
'libplist'
'libusb'
'polkit'
)
makedepends=(
'pacman' # for 'vercmp' in "$install"
'docbook-xsl'
'git'
'glib2-devel' # For 'gdbus-codegen'
'gobject-introspection'
'intltool'
'meson'
'python'
)
optdepends=(
'gobject-introspection-runtime: For /usr/lib/upower/integration-test.py.'
'python>=3: For /usr/lib/upower/{integration-test.py,output_checker.py}.'
'python-dbus: For /usr/lib/upower/integration-test.py.'
'python-dbusmock: For /usr/lib/upower/integration-test.py.'
'python-gobject: For For /usr/lib/upower/integration-test.py.'
'python-packaging: For /usr/lib/upower/integration-test.py.'
'umockdev: For /usr/lib/upower/integration-test.py.'
)
# ## 2023-10-14: Checks disabled since it fails on my machine because battery temperature cannot be read out.
# checkdepends=(
# 'python-dbus'
# 'python-dbusmock'
# 'python-gobject'
# 'python-packaging'
# 'umockdev'
# )
provides=(
"${_pkgname}=${pkgver}"
"${_pkgname}-nocritical=${pkgver}"
"${_pkgname}-nosystemd=${pkgver}"
"${_pkgname}-git=${pkgver}"
)
conflicts=(
"${_pkgname}"
"${_pkgname}-nocritical-nosystemd-git<1.90.4+10.r1708"
)
replaces=(
"${_pkgname}-nocritical-nosystemd-git<=1.90.4+10.r1708.20240523.669a1c2"
)
backup=(
'etc/UPower/UPower.conf'
)
install="upower-nocritical.install"
source=(
"${_pkgname}::git+https://gitlab.freedesktop.org/upower/upower.git"
"$install"
)
sha256sums=(
"SKIP" # Upstream source
"a1e260af0dd05ab9c933a8f0f8f8abf83e4faea5caba6b3750554d36422bb0b8" # $install
)
options+=('emptydirs')
prepare() {
cd "${srcdir}/${_pkgname}"
git log > "${srcdir}/git.log"
}
pkgver() {
cd "${srcdir}/${_pkgname}"
_ver="$(git describe --tags | sed -E -e 's|^[vV]||' -e 's|\-g[0-9a-f]*$||' | tr '-' '+')"
_rev="$(git rev-list --count HEAD)"
_date="$(git log -1 --date=format:"%Y%m%d" --format="%ad")"
_hash="$(git rev-parse --short HEAD)"
if [ -z "${_ver}" ]; then
error "Could not determine version."
return 1
else
printf '%s' "${_ver}.r${_rev}.${_date}.${_hash}"
fi
}
build() {
cd "${srcdir}"
arch-meson \
-D man=true \
-D gtk-doc=false \
-D introspection=enabled \
-D systemdsystemunitdir=no \
-D idevice=enabled \
upower build
meson compile -C build
}
# ## 2023-10-14: Checks disabled since it fails on my machine because battery temperature cannot be read out.
# check() {
# cd "${srcdir}"
#
# meson test -C build --print-errorlogs
# }
package() {
depends+=(libg{lib,object,io}-2.0.so)
provides+=(libupower-glib.so)
cd "${srcdir}"
meson install -C build --destdir "${pkgdir}"
cd "${srcdir}/${_pkgname}"
for _docfile in "${srcdir}/git.log" AUTHORS code-of-conduct.md COMMITMENT HACKING.md NEWS README.md RELEASE; do
install -Dvm644 "${_docfile}" "${pkgdir}/usr/share/doc/${_pkgname}/$(basename "${_docfile}")"
done
for _licensefile in COPYING; do
install -Dvm644 "${_licensefile}" "${pkgdir}/usr/share/licenses/${pkgname}/$(basename "${_licensefile}")"
ln -svr "${pkgdir}/usr/share/licenses/${pkgname}/$(basename "${_licensefile}")" "${pkgdir}/usr/share/doc/${_pkgname}/$(basename "${_licensefile}")"
done
}
|