[arch-commits] Commit in upower/repos (4 files)
Jan Steffens
heftig at gemini.archlinux.org
Sat Feb 5 02:41:08 UTC 2022
Date: Saturday, February 5, 2022 @ 02:41:07
Author: heftig
Revision: 436229
archrelease: copy trunk to testing-x86_64
Added:
upower/repos/testing-x86_64/
upower/repos/testing-x86_64/0001-build-Fix-default-udevrulesdir.patch
(from rev 436228, upower/trunk/0001-build-Fix-default-udevrulesdir.patch)
upower/repos/testing-x86_64/0002-build-Fix-version-macros.patch
(from rev 436228, upower/trunk/0002-build-Fix-version-macros.patch)
upower/repos/testing-x86_64/PKGBUILD
(from rev 436228, upower/trunk/PKGBUILD)
-------------------------------------------+
0001-build-Fix-default-udevrulesdir.patch | 23 ++++++++++++
0002-build-Fix-version-macros.patch | 31 +++++++++++++++++
PKGBUILD | 50 ++++++++++++++++++++++++++++
3 files changed, 104 insertions(+)
Copied: upower/repos/testing-x86_64/0001-build-Fix-default-udevrulesdir.patch (from rev 436228, upower/trunk/0001-build-Fix-default-udevrulesdir.patch)
===================================================================
--- testing-x86_64/0001-build-Fix-default-udevrulesdir.patch (rev 0)
+++ testing-x86_64/0001-build-Fix-default-udevrulesdir.patch 2022-02-05 02:41:07 UTC (rev 436229)
@@ -0,0 +1,23 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <heftig at archlinux.org>
+Date: Sat, 5 Feb 2022 02:26:48 +0000
+Subject: [PATCH] build: Fix default udevrulesdir
+
+We need to append 'rules.d' to the udev_dir.
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index f87de19b98cf..3858cbe0afdf 100644
+--- a/meson.build
++++ b/meson.build
+@@ -90,7 +90,7 @@ endif
+ udevrulesdir = get_option('udevrulesdir')
+ if udevrulesdir == 'auto'
+ udev_dep = dependency('udev', required: true)
+- udevrulesdir = udev_dep.get_pkgconfig_variable('udev_dir')
++ udevrulesdir = udev_dep.get_pkgconfig_variable('udev_dir') / 'rules.d'
+ endif
+
+ dbusdir = get_option('datadir') / 'dbus-1'
Copied: upower/repos/testing-x86_64/0002-build-Fix-version-macros.patch (from rev 436228, upower/trunk/0002-build-Fix-version-macros.patch)
===================================================================
--- testing-x86_64/0002-build-Fix-version-macros.patch (rev 0)
+++ testing-x86_64/0002-build-Fix-version-macros.patch 2022-02-05 02:41:07 UTC (rev 436229)
@@ -0,0 +1,31 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <heftig at archlinux.org>
+Date: Sat, 5 Feb 2022 02:30:52 +0000
+Subject: [PATCH] build: Fix version macros
+
+The project version is a string. We need to split it into an array of
+version components.
+---
+ libupower-glib/meson.build | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/libupower-glib/meson.build b/libupower-glib/meson.build
+index 1bab59b80390..2ff7baf51e85 100644
+--- a/libupower-glib/meson.build
++++ b/libupower-glib/meson.build
+@@ -1,7 +1,12 @@
++version_arr = meson.project_version().split('.')
++major_version = version_arr[0].to_int()
++minor_version = version_arr[1].to_int()
++micro_version = version_arr[2].to_int()
++
+ cdata = configuration_data()
+-cdata.set('UP_MAJOR_VERSION', meson.project_version()[0])
+-cdata.set('UP_MINOR_VERSION', meson.project_version()[1])
+-cdata.set('UP_MICRO_VERSION', meson.project_version()[2])
++cdata.set('UP_MAJOR_VERSION', major_version)
++cdata.set('UP_MINOR_VERSION', minor_version)
++cdata.set('UP_MICRO_VERSION', micro_version)
+
+ up_version_h = configure_file(
+ output: 'up-version.h',
Copied: upower/repos/testing-x86_64/PKGBUILD (from rev 436228, upower/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2022-02-05 02:41:07 UTC (rev 436229)
@@ -0,0 +1,50 @@
+# Maintainer: Jan Alexander Steffens (heftig) <heftig at archlinux.org>
+# Maintainer: Jan de Groot <jgc at archlinux.org>
+
+pkgname=upower
+pkgver=0.99.14
+pkgrel=1
+pkgdesc="Abstraction for enumerating power devices, listening to device events and querying history and statistics"
+url="https://upower.freedesktop.org"
+arch=(x86_64)
+license=(GPL)
+depends=(systemd libimobiledevice libgudev)
+makedepends=(docbook-xsl gobject-introspection python git gtk-doc meson)
+checkdepends=(python-{dbus,dbusmock,gobject} umockdev)
+backup=(etc/UPower/UPower.conf)
+_commit=ab9520a7aad3795be7975e021577093a6e85946c # tags/v0.99.14^0
+source=("git+https://gitlab.freedesktop.org/upower/upower.git#commit=$_commit"
+ 0001-build-Fix-default-udevrulesdir.patch
+ 0002-build-Fix-version-macros.patch)
+sha256sums=('SKIP'
+ '8891e9baddca739f41a9323da94fd38c61f42e9267b0b42597f69fb3f4d8bf69'
+ '68a916b1058dcc7b21e8e7568e6998bf929bb586b94500124739c1059107e256')
+
+pkgver() {
+ cd upower
+ git describe --tags | sed -e 's/^v\|^UPOWER_//;s/_/\./g;s/[^-]*-g/r&/;s/-/+/g'
+}
+
+prepare() {
+ cd upower
+
+ # meson fixes
+ git apply -3 ../0001-build-Fix-default-udevrulesdir.patch
+ git apply -3 ../0002-build-Fix-version-macros.patch
+}
+
+build() {
+ arch-meson upower build
+ meson compile -C build
+}
+
+check() {
+ meson test -C build --print-errorlogs
+}
+
+package() {
+ depends+=(libg{lib,object,io}-2.0.so)
+ provides+=(libupower-glib.so)
+
+ meson install -C build --destdir "$pkgdir"
+}
More information about the arch-commits
mailing list