mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH 2/2] uPower: add new package for power management
Date: Thu, 8 May 2014 18:22:40 +0200	[thread overview]
Message-ID: <20140508162240.GB24276@pengutronix.de> (raw)
In-Reply-To: <1399543549-30881-3-git-send-email-jbe@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 <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

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 <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 \

	--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 <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
> 

-- 
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

      reply	other threads:[~2014-05-08 16:22 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 ` [ptxdist] [PATCH 2/2] uPower: add new package for power management Juergen Borleis
2014-05-08 16:22   ` Michael Olbrich [this message]

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=20140508162240.GB24276@pengutronix.de \
    --to=m.olbrich@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