Skip to content

Commit

Permalink
Add UPower 0.99.7
Browse files Browse the repository at this point in the history
  • Loading branch information
pyhalov committed Jan 22, 2018
1 parent e462d78 commit 9bf8314
Show file tree
Hide file tree
Showing 8 changed files with 1,600 additions and 0 deletions.
75 changes: 75 additions & 0 deletions components/sysutils/upower/Makefile
@@ -0,0 +1,75 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#

#
# Copyright 2017 Alexander Pyhalov
#

include ../../../make-rules/shared-macros.mk

COMPONENT_NAME= upower
COMPONENT_VERSION= 0.99.7
COMPONENT_PROJECT_URL = http://upower.freedesktop.org/
COMPONENT_CLASSIFICATION=System/Libraries
COMPONENT_FMRI=system/upower
COMPONENT_SUMMARY= A service for enumerating and querying data related to power devices
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz
COMPONENT_ARCHIVE_HASH= \
sha256:24bcc2f6ab25a2533bac70b587bcb019e591293076920f5b5e04bdedc140a401
COMPONENT_ARCHIVE_URL= \
http://upower.freedesktop.org/releases/$(COMPONENT_ARCHIVE)
COMPONENT_LICENSE= GPLv2
COMPONENT_LICENSE_FILE= COPYING

include $(WS_MAKE_RULES)/prep.mk
include $(WS_MAKE_RULES)/configure.mk
include $(WS_MAKE_RULES)/ips.mk

PATH=$(PATH.gnu)

CPPFLAGS += $(CPP_LARGEFILES)

COMPONENT_PREP_ACTION = (cd $(@D) && \
libtoolize --copy --force &&\
glib-gettextize -f &&\
intltoolize --force --copy &&\
aclocal -I . &&\
autoheader &&\
automake -c -f -a &&\
autoconf )

CONFIGURE_BINDIR.64 = /usr/bin

CONFIGURE_OPTIONS += --libexecdir=/usr/lib
CONFIGURE_OPTIONS += --sysconfdir=/etc
CONFIGURE_OPTIONS += --localstatedir=/var
CONFIGURE_OPTIONS += --disable-static
CONFIGURE_OPTIONS += --enable-gtk-doc
CONFIGURE_OPTIONS += --enable-man-pages
CONFIGURE_OPTIONS += --enable-shared
CONFIGURE_OPTIONS += --with-pic

CONFIGURE_ENV += CPPFLAGS="$(CPPFLAGS)"

# gobject-introspection
COMPONENT_BUILD_ENV += CC="$(CC)"
COMPONENT_BUILD_ENV += CFLAGS="$(CFLAGS)"

build: $(BUILD_32_and_64)

install: $(INSTALL_32_and_64)

test: $(NO_TESTS)

REQUIRED_PACKAGES += library/glib2
REQUIRED_PACKAGES += system/library
REQUIRED_PACKAGES += system/library/math
99 changes: 99 additions & 0 deletions components/sysutils/upower/files/upower.xml
@@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<!--
CDDL HEADER START
The contents of this file are subject to the terms of the
Common Development and Distribution License (the "License").
You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
or http://www.opensolaris.org/os/licensing.
See the License for the specific language governing permissions
and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each
file and include the License file at usr/src/OPENSOLARIS.LICENSE.
If applicable, add the following below this CDDL HEADER, with the
fields enclosed by brackets "[]" replaced with your own identifying
information: Portions Copyright [yyyy] [name of copyright owner]
CDDL HEADER END
NOTE: This service manifest is not editable; its contents will
be overwritten by package or patch operations, including
operating system upgrade. Make customizations in a different
file.
Service manifest for the DNSCrypt proxy service.
-->
<!--
Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
Copyright 2018 Alexander Pyhalov
-->
<service_bundle type='manifest' name='upower'>

<service name='system/upower' type='service' version='1'>

<create_default_instance enabled='true' />

<single_instance />

<dependency name='usr'
type='service'
grouping='require_all'
restart_on='none'>
<service_fmri value='svc:/system/filesystem/minimal' />
</dependency>

<dependency
name='devices'
grouping='require_all'
restart_on='none'
type='service'>
<service_fmri value='svc:/system/device/local' />
</dependency>

<dependency name='dbus'
type='service'
grouping='require_all'
restart_on='none'>
<service_fmri value='svc:/system/dbus' />
</dependency>

<dependency name='sysevent'
type='service'
grouping='require_all'
restart_on='none'>
<service_fmri value='svc:/system/sysevent' />
</dependency>

<exec_method type='method' name='start'
exec='/usr/lib/upowerd &amp;' timeout_seconds='60'>
<method_context>
<method_credential
user='root' group='root'
/>
</method_context>
</exec_method>

<exec_method type='method' name='stop' exec=':kill'
timeout_seconds='60'/>

<exec_method type='method' name='refresh' exec=':kill -HUP'
timeout_seconds='30'/>

<template>
<common_name>
<loctext xml:lang='C'>
UPower Daemon
</loctext>
</common_name>
<documentation>
<manpage title='upowerd' section='8'
manpath='/usr/share/man'/>
</documentation>
</template>
</service>

</service_bundle>
89 changes: 89 additions & 0 deletions components/sysutils/upower/manifests/sample-manifest.p5m
@@ -0,0 +1,89 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#

#
# Copyright 2017 <contributor>
#

set name=pkg.fmri value=pkg:/$(COMPONENT_FMRI)@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
set name=pkg.summary value="$(COMPONENT_SUMMARY)"
set name=info.classification value="$(COMPONENT_CLASSIFICATION)"
set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
set name=org.opensolaris.consolidation value=$(CONSOLIDATION)

license $(COMPONENT_LICENSE_FILE) license='$(COMPONENT_LICENSE)'

file path=etc/UPower/UPower.conf
file path=etc/dbus-1/system.d/org.freedesktop.UPower.conf
file path=usr/bin/upower
file path=usr/include/libupower-glib/up-autocleanups.h
file path=usr/include/libupower-glib/up-client.h
file path=usr/include/libupower-glib/up-device.h
file path=usr/include/libupower-glib/up-history-item.h
file path=usr/include/libupower-glib/up-stats-item.h
file path=usr/include/libupower-glib/up-types.h
file path=usr/include/libupower-glib/up-version.h
file path=usr/include/libupower-glib/up-wakeup-item.h
file path=usr/include/libupower-glib/up-wakeups.h
file path=usr/include/libupower-glib/upower.h
file path=usr/lib/$(MACH64)/girepository-1.0/UPowerGlib-1.0.typelib
link path=usr/lib/$(MACH64)/libupower-glib.so target=libupower-glib.so.3.0.1
link path=usr/lib/$(MACH64)/libupower-glib.so.3 target=libupower-glib.so.3.0.1
file path=usr/lib/$(MACH64)/libupower-glib.so.3.0.1
file path=usr/lib/$(MACH64)/pkgconfig/upower-glib.pc
file path=usr/lib/girepository-1.0/UPowerGlib-1.0.typelib
link path=usr/lib/libupower-glib.so target=libupower-glib.so.3.0.1
link path=usr/lib/libupower-glib.so.3 target=libupower-glib.so.3.0.1
file path=usr/lib/libupower-glib.so.3.0.1
file path=usr/lib/pkgconfig/upower-glib.pc
file path=usr/lib/upowerd
file path=usr/share/dbus-1/interfaces/org.freedesktop.UPower.Device.xml
file path=usr/share/dbus-1/interfaces/org.freedesktop.UPower.KbdBacklight.xml
file path=usr/share/dbus-1/interfaces/org.freedesktop.UPower.Wakeups.xml
file path=usr/share/dbus-1/interfaces/org.freedesktop.UPower.xml
file path=usr/share/dbus-1/system-services/org.freedesktop.UPower.service
file path=usr/share/gir-1.0/UPowerGlib-1.0.gir
file path=usr/share/gtk-doc/html/UPower/Device.html
file path=usr/share/gtk-doc/html/UPower/KbdBacklight.html
file path=usr/share/gtk-doc/html/UPower/UPower-up-client.html
file path=usr/share/gtk-doc/html/UPower/UPower-up-device.html
file path=usr/share/gtk-doc/html/UPower/UPower-up-history-item.html
file path=usr/share/gtk-doc/html/UPower/UPower-up-stats-item.html
file path=usr/share/gtk-doc/html/UPower/UPower-up-types.html
file path=usr/share/gtk-doc/html/UPower/UPower-up-wakeup-item.html
file path=usr/share/gtk-doc/html/UPower/UPower.7.html
file path=usr/share/gtk-doc/html/UPower/UPower.devhelp2
file path=usr/share/gtk-doc/html/UPower/UPower.html
file path=usr/share/gtk-doc/html/UPower/home.png
file path=usr/share/gtk-doc/html/UPower/index.html
file path=usr/share/gtk-doc/html/UPower/ix01.html
file path=usr/share/gtk-doc/html/UPower/left-insensitive.png
file path=usr/share/gtk-doc/html/UPower/left.png
file path=usr/share/gtk-doc/html/UPower/libupower-glib-helpers.html
file path=usr/share/gtk-doc/html/UPower/libupower-glib.html
file path=usr/share/gtk-doc/html/UPower/license.html
file path=usr/share/gtk-doc/html/UPower/ref-dbus.html
file path=usr/share/gtk-doc/html/UPower/right-insensitive.png
file path=usr/share/gtk-doc/html/UPower/right.png
file path=usr/share/gtk-doc/html/UPower/style.css
file path=usr/share/gtk-doc/html/UPower/tools-fileformats.html
file path=usr/share/gtk-doc/html/UPower/up-insensitive.png
file path=usr/share/gtk-doc/html/UPower/up.png
file path=usr/share/gtk-doc/html/UPower/upower.1.html
file path=usr/share/gtk-doc/html/UPower/upowerd.8.html
file path=usr/share/locale/fr/LC_MESSAGES/upower.mo
file path=usr/share/locale/it/LC_MESSAGES/upower.mo
file path=usr/share/locale/pl/LC_MESSAGES/upower.mo
file path=usr/share/locale/sv/LC_MESSAGES/upower.mo
file path=usr/share/man/man1/upower.1
file path=usr/share/man/man7/UPower.7
file path=usr/share/man/man8/upowerd.8
16 changes: 16 additions & 0 deletions components/sysutils/upower/patches/01-as-needed.patch
@@ -0,0 +1,16 @@
--- upower-0.99.4/configure.ac.1 2017-12-22 13:18:00.954079517 +0000
+++ upower-0.99.4/configure.ac 2017-12-22 13:26:13.332598522 +0000
@@ -225,7 +225,12 @@
AM_CONDITIONAL(UP_BUILD_TESTS, test x$enable_tests = xyes)

if test "x$GCC" = "xyes"; then
- LDFLAGS="-Wl,--as-needed $LDFLAGS"
+ AC_MSG_CHECKING([if linker accepts --as-needed flag])
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="-Wl,--as-needed $LDFLAGS"
+ AC_TRY_LINK([#include <stdio.h>], [int i=0; return i;], [AC_MSG_RESULT(yes)], [
+ AC_MSG_RESULT(no)
+ LDFLAGS="$save_LDFLAGS"])
fi

# i18n support

0 comments on commit 9bf8314

Please sign in to comment.