mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Juergen Borleis <jbe@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH 2/2] uPower: add new package for power management
Date: Thu,  8 May 2014 12:05:49 +0200	[thread overview]
Message-ID: <1399543549-30881-3-git-send-email-jbe@pengutronix.de> (raw)
In-Reply-To: <1399543549-30881-1-git-send-email-jbe@pengutronix.de>

UPower is an abstraction for enumerating power devices, listening to
device events and querying history and statistics. Any application or
service on the system can access the org.freedesktop.UPower service
via the system message bus.

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
---
 rules/upower.in   |  20 +++++++++++
 rules/upower.make | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 125 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 0000000..b8283cc
--- /dev/null
+++ b/rules/upower.in
@@ -0,0 +1,20 @@
+## SECTION=shell_and_console
+
+config UPOWER
+	tristate
+	prompt "upower"
+	select SYSTEMD
+	select GLIB
+	select DBUS
+	select LIBUSB
+	select DBUS_GLIB
+	select POLKIT
+	select LIBC_PTHREAD
+	select LIBC_M
+	select UDEV
+	select UDEV_LIBGUDEV
+	help
+	  UPower is an abstraction for enumerating power devices, listening to
+	  device events and querying history and statistics. Any application or
+	  service on the system can access the org.freedesktop.UPower service
+	  via the system message bus.
diff --git a/rules/upower.make b/rules/upower.make
new file mode 100644
index 0000000..2befa89
--- /dev/null
+++ b/rules/upower.make
@@ -0,0 +1,105 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2014 by Juergen Borleis <jbe@pengutronix.de>
+#
+# 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.0
+UPOWER_MD5	:= 14f43bc13353e23e7280863f33ac50d2
+UPOWER		:= upower-$(UPOWER_VERSION)
+UPOWER_SUFFIX	:= tar.xz
+UPOWER_URL	:= http://upower.freedesktop.org/releases/$(UPOWER).$(UPOWER_SUFFIX)
+UPOWER_SOURCE	:= $(SRCDIR)/$(UPOWER).$(UPOWER_SUFFIX)
+UPOWER_DIR	:= $(BUILDDIR)/$(UPOWER)
+UPOWER_LICENSE	:= GPLv2+
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+#
+# autoconf
+#
+UPOWER_CONF_TOOL	:= autoconf
+UPOWER_CONF_OPT	:= $(CROSS_AUTOCONF_USR) \
+	--enable-introspection=no \
+	$(GLOBAL_LARGE_FILE_OPTION) \
+	--disable-static \
+	--disable-deprecated \
+	--disable-man-pages \
+	--disable-gtk-doc \
+	--disable-gtk-doc-html \
+	--disable-gtk-doc-pdf \
+	--disable-tests \
+	--disable-nls \
+	--disable-rpath \
+	--with-backend=linux \
+	--without-idevice
+
+# can we trust the defaults?
+# --with-udevrulesdir
+# --with-historydir
+# --with-systemdutildir
+# --with-systemdsystemunitdir
+#
+
+# ----------------------------------------------------------------------------
+# 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,"Juergen Borleis <jbe@pengutronix.de>")
+	@$(call install_fixup, upower,DESCRIPTION,missing)
+
+# configs
+	@$(call install_alternative, upower, 0, 0, 0755, /etc/UPower/UPower.conf)
+# libs
+	@$(call install_lib, upower, 0, 0, 0644, libupower-glib)
+
+# executables
+	@$(call install_copy, upower, 0, 0, 0755, -, /usr/bin/upower)
+	@$(call install_copy, upower, 0, 0, 0755, -, /usr/libexec/upowerd)
+
+# systemd support
+	@$(call install_alternative, upower, 0, 0, 0644, /lib/systemd/system/upower.service)
+
+# dbus-support
+	@$(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_alternative, upower, 0, 0, 0644, \
+		/usr/share/dbus-1/interfaces/org.freedesktop.UPower.Device.xml)
+	@$(call install_alternative, upower, 0, 0, 0644, \
+		/usr/share/dbus-1/interfaces/org.freedesktop.UPower.KbdBacklight.xml)
+	@$(call install_alternative, upower, 0, 0, 0644, \
+		/usr/share/dbus-1/interfaces/org.freedesktop.UPower.Wakeups.xml)
+	@$(call install_alternative, upower, 0, 0, 0644, \
+		/usr/share/dbus-1/interfaces/org.freedesktop.UPower.xml)
+
+# udev support
+	@$(call install_alternative, upower, 0, 0, 0644, /lib/udev/rules.d/95-upower-csr.rules)
+	@$(call install_alternative, upower, 0, 0, 0644, /lib/udev/rules.d/95-upower-hid.rules)
+	@$(call install_alternative, upower, 0, 0, 0644, /lib/udev/rules.d/95-upower-wup.rules)
+
+	@$(call install_finish, upower)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.0.0.rc0


-- 
ptxdist mailing list
ptxdist@pengutronix.de

  parent reply	other threads:[~2014-05-08 10:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-08 10:05 [ptxdist] Add power management support Juergen Borleis
2014-05-08 10:05 ` [ptxdist] [PATCH 1/2] Polkit: upgrade package Juergen Borleis
2014-05-08 16:14   ` Michael Olbrich
2014-05-08 10:05 ` Juergen Borleis [this message]
2014-05-08 16:22   ` [ptxdist] [PATCH 2/2] uPower: add new package for power management Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1399543549-30881-3-git-send-email-jbe@pengutronix.de \
    --to=jbe@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox