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] upower: new package
Date: Thu, 1 Mar 2018 15:01:36 +0100	[thread overview]
Message-ID: <20180301140136.wfetm3jebkmeg5lu@pengutronix.de> (raw)
In-Reply-To: <20180301115302.GA25540@lenoch>

On Thu, Mar 01, 2018 at 12:53:02PM +0100, Ladislav Michl wrote:
> Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
> ---
>  rules/upower.in   | 23 +++++++++++++++
>  rules/upower.make | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 110 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..282662cc4
> --- /dev/null
> +++ b/rules/upower.in
> @@ -0,0 +1,23 @@
> +## SECTION=system_libraries
> +menuconfig UPOWER
> +	tristate
> +	select GLIB
> +	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"
> +
> +endif
> diff --git a/rules/upower.make b/rules/upower.make
> new file mode 100644
> index 000000000..f3c1cb0b0
> --- /dev/null
> +++ b/rules/upower.make
> @@ -0,0 +1,87 @@
> +# -*-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) \
> +	--disable-static \
> +	--enable-shared \
> +	--enable-fast-install \
> +	--disable-libtool-lock \
> +	$(GLOBAL_LARGE_FILE_OPTION) \
> +	--disable-deprecated \
> +	--disable-man-pages \
> +	--disable-gtk-doc \
> +	--disable-gtk-doc-html \
> +	--disable-gtk-doc-pdf \
> +	--disable-tests \
> +	--disable-nls \
> +	--disable-rpath \
> +	--with-udevrulesdir=/lib/udev/rules.d \
> +	--with-systemdutildir=/lib/systemd/scripts \
> +	--with-systemdsystemunitdir=/lib/systemd/system

These paths should be /usr/lib...

Also, use the order from "./configure --help".

<ptxdist>/scripts/configure_helper.py --pkg upower

This will show what you need to change.

And add an option for gobject introspection. Take a look at the libgudev
rule. This will show you what to do. If you don't want to compile all this:
The file that needs to be installed is
/usr/lib/girepository-1.0/UPowerGlib-1.0.typelib

> +
> +# ----------------------------------------------------------------------------
> +# 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)

Break like this.

> +	@$(call install_tree, upower, 0, 0, -, /lib/udev/rules.d)
> +
> +ifdef PTXCONF_UPOWER_SYSTEMD_UNIT
> +	@$(call install_alternative, upower, 0, 0, 0644, \
		/lib/systemd/system/upower.service)

Here too. And this should be /usr/lib/....

Michael

> +endif
> +
> +	@$(call install_finish, upower)
> +
> +	@$(call touch)
> +
> +# vim: syntax=make
> -- 
> 2.16.2
> 
> 
> _______________________________________________
> 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:[~2018-03-01 14:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-01 11:53 Ladislav Michl
2018-03-01 14:01 ` 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=20180301140136.wfetm3jebkmeg5lu@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