Summary:        Power Management Service
Summary(ja):	電源管理サービス
Name:           upower
Version:        0.9.19
Release:        1%{?_dist_release}
License:        GPLv2+
Group:          System Environment/Libraries
URL:            http://upower.freedesktop.org/
Source0:        http://upower.freedesktop.org/releases/upower-%{version}.tar.xz

BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires:  sqlite3-devel
BuildRequires:  libtool
BuildRequires:  intltool
BuildRequires:  gettext
BuildRequires:  libgudev1-devel
BuildRequires:  libusb1-devel
BuildRequires:  glib2-devel >= 2.6.0
BuildRequires:  dbus-devel  >= 1.2
BuildRequires:  dbus-glib-devel >= 0.82
BuildRequires:  polkit-devel >= 0.92
BuildRequires:  gobject-introspection-devel
BuildRequires:	libimobiledevice-devel
BuildRequires:  gtk-doc
BuildRequires:  vim-tiny
BuildRequires:  autoconf
Requires:       polkit >= 0.92
Requires:       udev
Requires:       pm-utils >= 1.4.1
Requires:       gobject-introspection

# Old project name
Obsoletes: DeviceKit-power < 1:0.9.0-2
Provides: DeviceKit-power

Vendor: Project Vine
Distribution: Vine Linux
Packager: daisuke, Takemikaduchi


%description
UPower (formerly DeviceKit-power) provides a daemon, API and command
line tools for managing power devices attached to the system.

%package devel
Summary: Headers and libraries for UPower
Summary(ja): %{name} の開発ファイル
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: gtk-doc
Obsoletes: DeviceKit-power-devel < 1:0.9.0-2
Provides: DeviceKit-power-devel

%description devel
Headers and libraries for UPower.

%prep
%setup -q 

%build
%configure \
	--enable-gtk-doc \
	--disable-static \
	--enable-introspection=yes
make V=1 %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la

%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc NEWS COPYING AUTHORS HACKING README
%{_libdir}/libupower-glib.so.*
%{_libdir}/girepository-1.0/*.typelib
%{_sysconfdir}/dbus-1/system.d/*.conf
%{_sysconfdir}/UPower/UPower.conf
/lib/udev/rules.d/*.rules
%dir %{_localstatedir}/lib/upower
%{_bindir}/*
%{_libexecdir}/*
%{_mandir}/man1/*
%{_mandir}/man7/*
%{_mandir}/man8/*
%{_datadir}/polkit-1/actions/*.policy
%{_datadir}/dbus-1/system-services/*.service

%files devel
%defattr(-,root,root,-)
%{_datadir}/dbus-1/interfaces/*.xml
%dir %{_datadir}/gtk-doc/html/UPower
%{_datadir}/gtk-doc/html/UPower/*
%{_libdir}/libupower-glib.so
%{_libdir}/pkgconfig/*.pc
%{_datadir}/gir-1.0/*.gir
%dir %{_includedir}/libupower-glib
%{_includedir}/libupower-glib/up-*.h
%{_includedir}/libupower-glib/upower.h

%changelog
* Thu Jan 03 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9.19-1
- new upstream release

* Sat Sep 29 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9.18-1
- new upstream release

* Sun Apr 15 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9.15-1
- new upstream release

* Sat Oct 22 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9.14-1
- new upstream release

* Thu Sep 29 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9.13-1
- new upstream release

* Tue Aug 16 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9.12-1
- new upstream release

* Mon Apr 11 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.9.9-1
- new upstream release
- BR: vim-tiny instead of vim

* Tue Oct 12 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9.6-1
- new upstream release
- delete Patch0
- add BuildRequires: libimobiledevice-devel, vim, autoconf
- change BuildRequires: libusb1-devel instead of libusb-devel
- remove BuildRequires: gir-repository-devel
- fix %files

* Thu Sep 30 2010 Shu KONNO <owa@bg.wakwak.com> 0.9.4-2
- rebuilt with rpm-4.8.1 for pkg-config

* Thu May 13 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.9.4-1
- new upstream release
- update URL:

* Sat Apr 10 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 0.9.2-1
- Initial build for Vine Linux
- add BuildRequires: gtk-doc

* Wed Mar 17 2010 Richard Hughes <rhughes@redhat.com> - 0.9.1-4
- It seems people don't like pain.

* Mon Mar 15 2010 Richard Hughes <rhughes@redhat.com> - 0.9.1-3
- Obsolete DeviceKit-power.

* Mon Mar 15 2010 Richard Hughes <rhughes@redhat.com> - 0.9.1-2
- Actually enable the introspection support.

* Wed Mar 03 2010 Richard Hughes <rhughes@redhat.com> - 0.9.1-1
- Initial release of 0.9.1

