File upower.spec of Package upower.openSUSE_12.1_Update
#
# spec file for package upower
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: upower
Summary: Power Device Enumeration Framework
License: GPL-2.0+
Group: System/Daemons
Version: 0.9.14
Release: 0
Url: http://upower.freedesktop.org/
Source: http://upower.freedesktop.org/releases/%{name}-%{version}.tar.xz
# PATCH-FIX-UPSTREAM upower-energy-rate-cap.patch bnc#753327 glin@suse.com -- Correct the cap on the energy rate
Patch0: upower-energy-rate-cap.patch
BuildRequires: dbus-1-glib-devel
BuildRequires: gobject-introspection-devel >= 0.9.9
BuildRequires: gtk-doc >= 1.11
BuildRequires: intltool
BuildRequires: libgudev-1_0-devel
BuildRequires: libimobiledevice-devel
BuildRequires: libusb-devel
BuildRequires: polkit-devel
BuildRequires: udev
# Only needed because we don't (and won't) support building xz tarballs by default... See bnc#697467
BuildRequires: xz
Recommends: %{name}-lang
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Obsoletes: DeviceKit-power < 0.9.9
%description
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. Some operations (such as suspending the
system) are restricted using PolicyKit.
%package -n libupower-glib1
Summary: Power Device Enumeration Framework - Library
Group: System/Daemons
Recommends: %{name}
%description -n libupower-glib1
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. Some operations (such as suspending the
system) are restricted using PolicyKit.
%package -n libupower-glib-devel
Summary: Power Device Enumeration Framework - Development Files
Group: Development/Libraries/Other
Requires: glib2-devel
Requires: libupower-glib1 = %{version}
Provides: %{name}-devel = %{version}
%description -n libupower-glib-devel
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. Some operations (such as suspending the
system) are restricted using PolicyKit.
%lang_package
%prep
%setup -q
%patch0 -p1
%build
export V=1
%configure\
--disable-static \
--libexecdir=%{_libexecdir}/upower \
--enable-gtk-doc
make %{?_smp_mflags}
%install
%makeinstall
rm -f %{buildroot}%{_libdir}/*.la
%find_lang %{name}
%clean
rm -rf %{buildroot}
%post -n libupower-glib1 -p /sbin/ldconfig
%postun -n libupower-glib1 -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING NEWS README
%config %{_sysconfdir}/UPower/
%{_bindir}/upower
%dir %{_libexecdir}/upower
%{_libexecdir}/upower/upowerd
/lib/udev/rules.d/*.rules
%config %{_sysconfdir}/dbus-1/system.d/*.conf
%{_datadir}/dbus-1/system-services/*.service
%{_datadir}/polkit-1/actions/org.freedesktop.upower*.policy
%doc %{_mandir}/man?/*.*
%dir %{_localstatedir}/lib/upower
%files -n libupower-glib1
%defattr(-,root,root,-)
%{_libdir}/libupower-glib.so.*
%{_libdir}/girepository-1.0/UPowerGlib-1.0.typelib
%files -n libupower-glib-devel
%defattr(-,root,root,-)
%{_datadir}/dbus-1/interfaces/*.xml
%doc %{_datadir}/gtk-doc/html/UPower/
%{_includedir}/libupower-glib/
%{_libdir}/pkgconfig/upower-glib.pc
%{_libdir}/libupower-glib.so
%{_datadir}/gir-1.0/UPowerGlib-1.0.gir
%files lang -f %{name}.lang
%changelog