%define glib2_version           2.22.0
%define dbus_version            1.2
%define dbus_glib_version	0.82
%define gtk_doc_version         1.4
%define udev_version            141

Summary: Device Enumeration Framework
Summary(ja): Device Enumeration Framework
Name: DeviceKit
Version: 003
Release: 1%{?_dist_release}
License: GPLv2+ and LGPLv2+
Group: System Environment/Libraries
URL: http://gitweb.freedesktop.org/?p=users/david/DeviceKit.git;a=summary
Source0: http://hal.freedesktop.org/releases/%{name}-%{version}.tar.gz 
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: dbus-devel  >= %{dbus_version}
BuildRequires: dbus-glib-devel >= %{dbus_glib_version}
BuildRequires: gtk-doc >= %{gtk_doc_version}
BuildRequires: udev >= %{udev_version}
Requires: dbus
Requires: dbus-glib
Requires: glib2
Requires: udev

%description
DeviceKit is a framework for enumerating devices.

%package devel
Summary: Headers and libraries for DeviceKit
Summary(ja): Headers and libraries for DeviceKit
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: glib2-devel
Requires: pkgconfig
# stupid guidelines require this for ownership of /usr/share/gtk-doc
Requires: gtk-doc

%description devel
Headers and libraries for DeviceKit.

%prep
%setup -q

%build
%configure
make

%install
rm -rf $RPM_BUILD_ROOT

make install DESTDIR=$RPM_BUILD_ROOT

rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)

%doc README AUTHORS NEWS COPYING HACKING doc/TODO

%{_bindir}/*
%{_libexecdir}/*

%{_libdir}/lib*.so.*

%{_mandir}/man1/*
%{_mandir}/man7/*
%{_mandir}/man8/*

%{_sysconfdir}/dbus-1/system.d/*
%{_sysconfdir}/udev/rules.d/*

%{_datadir}/dbus-1/system-services/*

%dir %{_localstatedir}/run/devkit

%files devel
%defattr(-,root,root,-)

%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*
%{_includedir}/*
%{_datadir}/dbus-1/interfaces/*

%dir %{_datadir}/gtk-doc/html/devkit
%{_datadir}/gtk-doc/html/devkit/*

%changelog
* Sun Sep 27 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 003-2
- rebuild with new environment

* Sun Apr 26 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 003-1
- initial build for Vine Linux

* Mon Mar 02 2009 David Zeuthen <davidz@redhat.com> - 003-1%{?dist}
- Update to release 003

* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 002-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 002-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 002-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 002-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Fri Dec 12 2008 Colin Walters <walters@verbum.org> - 002-5
- Fix permissions patch

* Thu Dec 11 2008 Colin Walters <walters@verbum.org> - 002-4
- Add dbus permissions patch

* Thu Nov 13 2008 Matthias Clasen <mclasen@redhat.com> - 002-3
- Update to 002

* Sun Jul 20 2008 David Zeuthen <davidz@redhat.com> - 002-0.git20080720%{?dist}
- Initial packaging
