42a2b4
%global _hardened_build 1
42a2b4
42a2b4
Summary:        Power Management Service
42a2b4
Name:           upower
42a2b4
Version:        0.99.7
42a2b4
Release:        1%{?dist}
42a2b4
License:        GPLv2+
42a2b4
Group:          System Environment/Libraries
42a2b4
URL:            http://upower.freedesktop.org/
42a2b4
Source0:        http://upower.freedesktop.org/releases/upower-%{version}.tar.xz
42a2b4
42a2b4
BuildRequires:  sqlite-devel
42a2b4
BuildRequires:  libtool
42a2b4
BuildRequires:  intltool
42a2b4
BuildRequires:  gettext
42a2b4
BuildRequires:  libgudev1-devel
42a2b4
%ifnarch s390 s390x
42a2b4
BuildRequires:  libusbx-devel
42a2b4
BuildRequires:  libimobiledevice-devel
42a2b4
%endif
42a2b4
BuildRequires:  glib2-devel >= 2.6.0
42a2b4
BuildRequires:  gobject-introspection-devel
42a2b4
BuildRequires:  gtk-doc
42a2b4
BuildRequires:  systemd
42a2b4
Requires:       udev
42a2b4
Requires:       gobject-introspection
42a2b4
42a2b4
%if 0%{?fedora}
42a2b4
# From rhughes-f20-gnome-3-12 copr
42a2b4
Obsoletes:      compat-upower09 < 0.99
42a2b4
%endif
42a2b4
42a2b4
%description
42a2b4
UPower (formerly DeviceKit-power) provides a daemon, API and command
42a2b4
line tools for managing power devices attached to the system.
42a2b4
42a2b4
%package devel
42a2b4
Summary: Headers and libraries for UPower
42a2b4
Group: Development/Libraries
42a2b4
Requires: %{name}%{?_isa} = %{version}-%{release}
42a2b4
42a2b4
%description devel
42a2b4
Headers and libraries for UPower.
42a2b4
42a2b4
%package devel-docs
42a2b4
Summary: Developer documentation for for libupower-glib
42a2b4
Requires: %{name} = %{version}-%{release}
42a2b4
BuildArch: noarch
42a2b4
42a2b4
%description devel-docs
42a2b4
Developer documentation for for libupower-glib.
42a2b4
42a2b4
%prep
42a2b4
%autosetup -p1
42a2b4
42a2b4
%build
42a2b4
%configure \
42a2b4
        --enable-gtk-doc \
42a2b4
        --disable-static \
42a2b4
        --enable-introspection \
42a2b4
%ifarch s390 s390x
42a2b4
	--with-backend=dummy
42a2b4
%endif
42a2b4
42a2b4
# Disable SMP build, fails to build docs
42a2b4
make
42a2b4
42a2b4
%install
42a2b4
make install DESTDIR=$RPM_BUILD_ROOT
42a2b4
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
42a2b4
42a2b4
%find_lang upower
42a2b4
42a2b4
%post -p /sbin/ldconfig
42a2b4
42a2b4
%postun -p /sbin/ldconfig
42a2b4
42a2b4
%files -f upower.lang
42a2b4
%{!?_licensedir:%global license %%doc}
42a2b4
%license COPYING
42a2b4
%doc NEWS AUTHORS HACKING README
42a2b4
%{_libdir}/libupower-glib.so.*
42a2b4
%{_sysconfdir}/dbus-1/system.d/*.conf
42a2b4
%ifnarch s390 s390x
42a2b4
/usr/lib/udev/rules.d/*.rules
42a2b4
%endif
42a2b4
%dir %{_localstatedir}/lib/upower
42a2b4
%dir %{_sysconfdir}/UPower
42a2b4
%config %{_sysconfdir}/UPower/UPower.conf
42a2b4
%{_bindir}/*
42a2b4
%{_libexecdir}/*
42a2b4
%{_libdir}/girepository-1.0/*.typelib
42a2b4
%{_mandir}/man1/*
42a2b4
%{_mandir}/man7/*
42a2b4
%{_mandir}/man8/*
42a2b4
%{_datadir}/dbus-1/system-services/*.service
42a2b4
/usr/lib/systemd/system/*.service
42a2b4
42a2b4
%files devel
42a2b4
%{_datadir}/dbus-1/interfaces/*.xml
42a2b4
%{_libdir}/libupower-glib.so
42a2b4
%{_libdir}/pkgconfig/*.pc
42a2b4
%{_datadir}/gir-1.0/*.gir
42a2b4
%dir %{_includedir}/libupower-glib
42a2b4
%{_includedir}/libupower-glib/up-*.h
42a2b4
%{_includedir}/libupower-glib/upower.h
42a2b4
42a2b4
%files devel-docs
42a2b4
%{_datadir}/gtk-doc
42a2b4
%dir %{_datadir}/gtk-doc/html/UPower
42a2b4
%{_datadir}/gtk-doc/html/UPower/*
42a2b4
42a2b4
%changelog
42a2b4
* Tue Nov 28 2017 Bastien Nocera <bnocera@redhat.com> - 0.99.7-1
42a2b4
- Update to 0.99.7
42a2b4
- Add Bluetooth LE battery support
42a2b4
- Fix critical action after resume from hibernate
42a2b4
  Resolves: #1584245
42a2b4
42a2b4
* Fri Mar 10 2017 Kalev Lember <klember@redhat.com> - 0.99.4-2
42a2b4
- Rebuilt for libplist 1.2
42a2b4
- Resolves: #1387051
42a2b4
42a2b4
* Wed Oct 19 2016 Kalev Lember <klember@redhat.com> - 0.99.4-1
42a2b4
- New upstream release
42a2b4
- Resolves: #1387051
42a2b4
42a2b4
* Thu Dec 18 2014 Richard Hughes <rhughes@redhat.com> - 0.99.2-1
42a2b4
- New upstream release
42a2b4
- Resolves: #1174421
42a2b4
42a2b4
* Mon Mar 17 2014 Richard Hughes <rhughes@redhat.com> - 0.9.20-7
42a2b4
- Mark the devel-docs subpackage as noarch to silence a rpmdiff false positive.
42a2b4
- Resolves: #1070661
42a2b4
42a2b4
* Mon Mar 17 2014 Richard Hughes <rhughes@redhat.com> - 0.9.20-6
42a2b4
- Split out a new devel-docs subpackage to fix multilib_policy=all installs.
42a2b4
- Resolves: #1070661
42a2b4
42a2b4
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 0.9.20-5
42a2b4
- Mass rebuild 2014-01-24
42a2b4
42a2b4
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 0.9.20-4
42a2b4
- Mass rebuild 2013-12-27
42a2b4
42a2b4
* Wed Oct  9 2013 Matthias Clasen <mclasen@redhat.com> - 0.9.20-3
42a2b4
- Install udev rules in /usr/lib/udev (#884202)
42a2b4
42a2b4
* Tue Oct  8 2013 Matthias Clasen <mclasen@redhat.com> - 0.9.20-2
42a2b4
  Fixes for #884202
42a2b4
- Enabled hardened build
42a2b4
- Don't use /lib/udev in file paths
42a2b4
42a2b4
* Mon Mar 20 2013 Richard Hughes <rhughes@redhat.com> - 0.9.20-1
42a2b4
- New upstream release
42a2b4
- Factor out the Logitech Unifying support to support other devices
42a2b4
- Fix batteries which report current energy but full charge
42a2b4
- Fix several small memory leaks
42a2b4
42a2b4
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.19-2
42a2b4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
42a2b4
42a2b4
* Wed Jan 02 2013 Richard Hughes <rhughes@redhat.com> - 0.9.19-1
42a2b4
- New upstream release
42a2b4
- Add a Documentation tag to the service file
42a2b4
- Add support for Logitech Unifying devices
42a2b4
- Do not continue to poll if /proc/timer_stats is not readable
42a2b4
- Fix device matching for recent kernels
42a2b4
- Resolves: #848521
42a2b4
42a2b4
* Wed Oct 24 2012 Dan HorĂ¡k <dan[at]danny.cz> - 0.9.18-2
42a2b4
- the notify-upower script is not installed with dummy backend on s390(x)
42a2b4
42a2b4
* Wed Aug 08 2012 Richard Hughes <rhughes@redhat.com> - 0.9.18-1
42a2b4
- New upstream release
42a2b4
- Use systemd for suspend and hibernate
42a2b4
42a2b4
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.17-2
42a2b4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
42a2b4
42a2b4
* Mon Jun 25 2012 Richard Hughes <rhughes@redhat.com> - 0.9.17-1
42a2b4
- New upstream release
42a2b4
- Don't allow non-power-supply devices to set the OnBattery property
42a2b4
- Fix the LatencyChanged signal
42a2b4
- Fix wrong PowerSupply property for devices without a scope sysfs attribute
42a2b4
- Treat the battery state 'not charging' as PENDING_CHARGE
42a2b4
42a2b4
* Mon Apr 30 2012 Richard Hughes <rhughes@redhat.com> - 0.9.16-1
42a2b4
- New upstream release
42a2b4
- Install a systemd service file
42a2b4
- Clamp the UPS percentage from 0 to 100 to fix syslog spam
42a2b4
- Correct the cap on the energy rate
42a2b4
- Fix crash in up_device_csr_finalize
42a2b4
- Never detect HID devices with batteries as power supplies
42a2b4
- Re-coldplug dock status when resuming from sleep
42a2b4
42a2b4
* Wed Apr 11 2012 Peter Robinson <pbrobinson@fedoraproject.org> - 0.9.15-3
42a2b4
- Rebuild for new libimobiledevice and usbmuxd
42a2b4
42a2b4
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.15-2
42a2b4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
42a2b4
42a2b4
* Mon Dec 05 2011 Richard Hughes <rhughes@redhat.com> - 0.9.15-1
42a2b4
- Use linear regression to get better predicted battery times.
42a2b4
- Don't spam the log when we're saving history when on low power.
42a2b4
- Don't assert when the power_supply device type is usb.
42a2b4
42a2b4
* Mon Oct 03 2011 Richard Hughes <rhughes@redhat.com> - 0.9.14-1
42a2b4
- New upstream release.
42a2b4
- Fix a bug when detecting if suspend and hibernate are supported.
42a2b4
42a2b4
* Mon Sep 05 2011 Richard Hughes <rhughes@redhat.com> - 0.9.13-1
42a2b4
- New upstream release.
42a2b4
- Blacklist wacom battery devices as not power-supply devices.
42a2b4
42a2b4
* Mon Jul 04 2011 Richard Hughes <rhughes@redhat.com> - 0.9.12-1
42a2b4
- New upstream release.
42a2b4
- Fix how we estimate the device rate for batteries that do not provide
42a2b4
  this data.
42a2b4
42a2b4
* Wed May 25 2011 Richard Hughes <rhughes@redhat.com> - 0.9.11-1
42a2b4
- New upstream release.
42a2b4
- Only include glib-unix.h if the GLib version is >= 2.29.4
42a2b4
42a2b4
* Tue May 03 2011 Richard Hughes <rhughes@redhat.com> - 0.9.10-1
42a2b4
- New upstream release.
42a2b4
- Add a config option 'IgnoreLid' for users with broken lid switches
42a2b4
- Consider a discharging UPS as "on battery"
42a2b4
- Support batteries that report both energy and charge
42a2b4
- Use the new threadsafe signal handling support in GLib
42a2b4
42a2b4
* Tue Mar 23 2011 Colin Walters <walters@verbum.org> - 0.9.9-2
42a2b4
- Move typelib file to main package; it should go along with the .so;
42a2b4
  i.e. gnome-shell shouldn't require upower-devel.
42a2b4
42a2b4
* Mon Mar 21 2011 Richard Hughes <rhughes@redhat.com> - 0.9.9-1
42a2b4
- New upstream release.
42a2b4
42a2b4
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.8-2
42a2b4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
42a2b4
42a2b4
* Fri Jan 07 2011 Richard Hughes <rhughes@redhat.com> - 0.9.8-1
42a2b4
- New upstream release.
42a2b4
42a2b4
* Sun Dec 26 2010 Bastien Nocera <bnocera@redhat.com> 0.9.7-2
42a2b4
- Rebuild for new libimobiledevice
42a2b4
42a2b4
* Mon Nov 01 2010 Richard Hughes <rhughes@redhat.com> - 0.9.7-1
42a2b4
- New upstream release.
42a2b4
- Add support for controlling leds keyboard backlight
42a2b4
- Fix building with gobject-introspection 0.9.10
42a2b4
42a2b4
* Mon Oct 04 2010 Richard Hughes <rhughes@redhat.com> - 0.9.6-1
42a2b4
- New upstream release.
42a2b4
- Fix compile with the latest PolicyKit release.
42a2b4
- Only save by default 7 days data to stop the log files becoming huge.
42a2b4
- Do not continue to poll the serial port if there is no Watts Up Pro adaptor.
42a2b4
- Fix the build with new versions of gobject-introspection.
42a2b4
- Resolves #634228
42a2b4
42a2b4
* Wed Sep 29 2010 jkeating - 0.9.5-10
42a2b4
- Rebuilt for gcc bug 634757
42a2b4
42a2b4
* Tue Sep 21 2010 Matthias Clasen <mclasen@redhat.com> - 0.9.5-9
42a2b4
- Rebuild against newer gobject-introspection
42a2b4
42a2b4
* Mon Aug 23 2010 Matthias Clasen <mclasen@redhat.com> - 0.9.5-8
42a2b4
- Co-own /usr/share/gtk-doc
42a2b4
42a2b4
* Tue Aug 17 2010 Matthias Clasen <mclasen@redhat.com> - 0.9.5-7
42a2b4
- Some fixes for dbus error handling
42a2b4
42a2b4
* Tue Aug 10 2010 Richard Hughes <rhughes@redhat.com> - 0.9.5-5
42a2b4
- Ensure we've initialized errors when calling into PolicyKit.
42a2b4
- Resolves: #622830
42a2b4
42a2b4
* Mon Jul 26 2010 Bastien Nocera <bnocera@redhat.com> 0.9.5-4
42a2b4
- Add support for iDevice battery checking
42a2b4
42a2b4
* Sat Jul 17 2010 Dan HorĂ¡k <dan[at]danny.cz> - 0.9.5-3
42a2b4
- use dummy backend on s390(x) because the Linux backend requires USB
42a2b4
42a2b4
* Mon Jul 12 2010 Colin Walters <walters@verbum.org> - 0.9.5-2
42a2b4
- Rebuild against new gobject-introspection
42a2b4
42a2b4
* Mon Jul 12 2010 Richard Hughes <rhughes@redhat.com> - 0.9.5-1
42a2b4
- New upstream release.
42a2b4
42a2b4
* Mon May 17 2010 Matthias Clasen <mclasen@redhat.com> - 0.9.4-1
42a2b4
- Make my laptop suspend again when I close the lid
42a2b4
42a2b4
* Thu May 06 2010 Richard Hughes <rhughes@redhat.com> - 0.9.3-1
42a2b4
- New upstream release.
42a2b4
42a2b4
* Tue Apr 06 2010 Richard Hughes <rhughes@redhat.com> - 0.9.2-1
42a2b4
- New upstream release.
42a2b4
42a2b4
* Wed Mar 17 2010 Richard Hughes <rhughes@redhat.com> - 0.9.1-4
42a2b4
- It seems people don't like pain.
42a2b4
42a2b4
* Mon Mar 15 2010 Richard Hughes <rhughes@redhat.com> - 0.9.1-3
42a2b4
- Obsolete DeviceKit-power.
42a2b4
42a2b4
* Mon Mar 15 2010 Richard Hughes <rhughes@redhat.com> - 0.9.1-2
42a2b4
- Actually enable the introspection support.
42a2b4
42a2b4
* Wed Mar 03 2010 Richard Hughes <rhughes@redhat.com> - 0.9.1-1
42a2b4
- Initial release of 0.9.1
42a2b4