From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from dude.hi.pengutronix.de ([2001:6f8:1178:2:a236:9fff:fe00:814]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1WiLD1-0002A5-HK for ptxdist@pengutronix.de; Thu, 08 May 2014 12:05:47 +0200 Received: from jbe by dude.hi.pengutronix.de with local (Exim 4.82) (envelope-from ) id 1WiLD6-000343-0z for ptxdist@pengutronix.de; Thu, 08 May 2014 12:05:52 +0200 From: Juergen Borleis Date: Thu, 8 May 2014 12:05:49 +0200 Message-Id: <1399543549-30881-3-git-send-email-jbe@pengutronix.de> In-Reply-To: <1399543549-30881-1-git-send-email-jbe@pengutronix.de> References: <1399543549-30881-1-git-send-email-jbe@pengutronix.de> Subject: [ptxdist] [PATCH 2/2] uPower: add new package for power management Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@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 --- 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 +# +# 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 ") + @$(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