From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from ptx.hi.pengutronix.de ([2001:6f8:1178:2:5054:ff:fec0:8e10] ident=Debian-exim) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1WiR5f-0006Do-Mz for ptxdist@pengutronix.de; Thu, 08 May 2014 18:22:35 +0200 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.80) (envelope-from ) id 1WiR5k-0006HK-9B for ptxdist@pengutronix.de; Thu, 08 May 2014 18:22:40 +0200 Date: Thu, 8 May 2014 18:22:40 +0200 From: Michael Olbrich Message-ID: <20140508162240.GB24276@pengutronix.de> References: <1399543549-30881-1-git-send-email-jbe@pengutronix.de> <1399543549-30881-3-git-send-email-jbe@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1399543549-30881-3-git-send-email-jbe@pengutronix.de> Subject: Re: [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: , 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 On Thu, May 08, 2014 at 12:05:49PM +0200, Juergen Borleis wrote: > 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 Same here. Make systemd optional if possible. > + 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 \ --disable-introspection should work to, right? > + $(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 Leave historydir as is. You could set the others explicitly, but that is only useful to make the systemd dependency a runtime dependency only. You need libgudev, so that doesn't work anyways, so I think just leave it as is and remove the comment. The defaults come via pkg-config and are always correct. > +# > + > +# ---------------------------------------------------------------------------- > +# 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 > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- ptxdist mailing list ptxdist@pengutronix.de