mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH v2] upower: new package
@ 2018-03-01 15:08 Ladislav Michl
  0 siblings, 0 replies; only message in thread
From: Ladislav Michl @ 2018-03-01 15:08 UTC (permalink / raw)
  To: ptxdist

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 Changes:
 -v2: Address mol's comments (hopefully)

 rules/upower.in   |  28 +++++++++++++++
 rules/upower.make | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 129 insertions(+)
 create mode 100644 rules/upower.in
 create mode 100644 rules/upower.make

diff --git a/rules/upower.in b/rules/upower.in
new file mode 100644
index 000000000..d845b73d2
--- /dev/null
+++ b/rules/upower.in
@@ -0,0 +1,28 @@
+## SECTION=system_libraries
+menuconfig UPOWER
+	tristate
+	select GLIB
+	select GOBJECT_INTROSPECTION	if UPOWER_INTROSPECTION
+	select UDEV
+	select LIBGUDEV
+	select LIBUSB
+	prompt "upower                        "
+	help
+	  UPower is an abstraction for enumerating power devices, listening to
+	  device events and querying history and statistics.
+
+	  https://upower.freedesktop.org/
+
+if UPOWER
+
+config UPOWER_SYSTEMD_UNIT
+	bool
+	default y
+	depends on INITMETHOD_SYSTEMD
+	prompt "install systemd unit files for UPower"
+
+config UPOWER_INTROSPECTION
+	bool
+	default GOBJECT_INTROSPECTION_HELPER
+
+endif
diff --git a/rules/upower.make b/rules/upower.make
new file mode 100644
index 000000000..4493eaa89
--- /dev/null
+++ b/rules/upower.make
@@ -0,0 +1,101 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2018 by Ladislav Michl <ladis@linux-mips.org>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_UPOWER) += upower
+
+#
+# Paths and names
+#
+UPOWER_VERSION	:= 0.99.7
+UPOWER_MD5	:= 236bb439d9ff1151450b3d8582399532
+UPOWER		:= upower-$(UPOWER_VERSION)
+UPOWER_SUFFIX	:= tar.xz
+UPOWER_URL	:= https://upower.freedesktop.org/releases/$(UPOWER).$(UPOWER_SUFFIX)
+UPOWER_SOURCE	:= $(SRCDIR)/$(UPOWER).$(UPOWER_SUFFIX)
+UPOWER_DIR	:= $(BUILDDIR)/$(UPOWER)
+UPOWER_LICENSE	:= GPL-2.0+
+UPOWER_LICENSE_FILES := file://COPYING;md5=0de8fbf1d97a140d1d93b9f14dcfbf08
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# autoconf
+#
+UPOWER_CONF_TOOL := autoconf
+UPOWER_CONF_OPT = \
+	$(CROSS_AUTOCONF_USR) \
+	--$(call ptx/endis, PTXCONF_UPOWER_INTROSPECTION)-introspection \
+	$(GLOBAL_LARGE_FILE_OPTION) \
+	--enable-shared \
+	--disable-static \
+	--enable-fast-install \
+	--disable-libtool-lock \
+	--disable-deprecated \
+	--disable-man-pages \
+	--disable-gtk-doc \
+	--disable-gtk-doc-html \
+	--disable-gtk-doc-pdf \
+	--disable-tests \
+	--disable-nls \
+	--disable-rpath \
+	--with-udevrulesdir=/usr/lib/udev/rules.d \
+	--with-historydir=/var/lib/upower \
+	--with-systemdutildir=/usr/lib/systemd/scripts \
+	--with-systemdsystemunitdir=/usr/lib/systemd/system \
+	--with-backend=linux \
+	--without-idevice
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/upower.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, upower)
+	@$(call install_fixup, upower,PRIORITY,optional)
+	@$(call install_fixup, upower,SECTION,base)
+	@$(call install_fixup, upower,AUTHOR,"Ladislav Michl <ladis@linux-mips.org>")
+	@$(call install_fixup, upower,DESCRIPTION, "upower")
+
+	@$(call install_lib, upower, 0, 0, 0644, libupower-glib)
+
+	@$(call install_copy, upower, 0, 0, 0755, -, /usr/bin/upower)
+	@$(call install_copy, upower, 0, 0, 0755, -, /usr/libexec/upowerd)
+
+	@$(call install_alternative, upower, 0, 0, 0644, \
+		/etc/UPower/UPower.conf)
+	@$(call install_alternative, upower, 0, 0, 0644, \
+		/etc/dbus-1/system.d/org.freedesktop.UPower.conf)
+	@$(call install_alternative, upower, 0, 0, 0644, \
+		/usr/share/dbus-1/system-services/org.freedesktop.UPower.service)
+	@$(call install_tree, upower, 0, 0, -, /usr/lib/udev/rules.d)
+
+ifdef PTXCONF_UPOWER_SYSTEMD_UNIT
+	@$(call install_alternative, upower, 0, 0, 0644, \
+		/usr/lib/systemd/system/upower.service)
+endif
+ifdef PTXCONF_UPOWER_INTROSPECTION
+	@$(call install_copy, upower, 0, 0, 0644, -, \
+		/usr/lib/girepository-1.0/UPowerGlib-1.0.typelib)
+endif
+
+	@$(call install_copy, upower, 0, 0, 0755, /var/lib/upower)
+
+	@$(call install_finish, upower)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.16.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-03-01 15:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-01 15:08 [ptxdist] [PATCH v2] upower: new package Ladislav Michl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox