Blob Blame History Raw

%define hal_version             0.5.10
%define dbus_version            0.90
%define dbus_glib_version       0.70
%define gtk2_version            2.8
%define libgnome_version        2.14
%define libgnomeui_version      2.14

Summary: Graphical Device Manager Application
Name: gnome-device-manager
Version: 0.2
Release: 2%{?dist}
License: LGPLv2+ and GPLv2+
Group: System Environment/Libraries
URL: http://www.freedesktop.org/Software/hal
Source0: http://hal.freedesktop.org/releases/%{name}-%{version}.tar.bz2
Patch0: note-theming.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: scrollkeeper
BuildRequires: gnome-doc-utils
BuildRequires: desktop-file-utils
BuildRequires: hal-devel >= %{hal_version}
BuildRequires: gtk2-devel >= %{gtk2_version}
BuildRequires: dbus-devel >= %{dbus_version}
BuildRequires: dbus-glib-devel >= %{dbus_glib_version}
BuildRequires: libgnomeui-devel >= %{libgnomeui_version}
BuildRequires: libgnome-devel >= %{libgnome_version}
BuildRequires: perl(XML::Parser)
Requires: gnome-device-manager-libs = %{version}-%{release}
Requires(post): scrollkeeper
Requires(postun): scrollkeeper

%description
GNOME Device Manager is an application that provides a view of the
various devices connected to the system. 

%package libs
Summary: Libraries for gnome-device-manager
Group: Development/Libraries
Requires: hal >= %{hal_version}
Requires: gtk2 >= %{gtk2_version}
Requires: dbus >= %{dbus_version}
Requires: dbus-glib >= %{dbus_glib_version}
Requires: libgnomeui >= %{libgnomeui_version}
Requires: libgnome >= %{libgnome_version}

# TODO: we most probably requires icons from a host of various other
# applications. This needs to be fixed upstream so we don't fix it
# right here, right now

%description libs
Libraries for gnome-device-manager.

%package devel
Summary: Development files for gnome-device-manager
Group: Development/Libraries
Requires: hal-devel >= %{hal_version}
Requires: gtk2-devel >= %{gtk2_version}
Requires: dbus-devel >= %{dbus_version}
Requires: dbus-glib-devel >= %{dbus_glib_version}
Requires: libgnomeui-devel >= %{libgnomeui_version}
Requires: libgnome-devel >= %{libgnome_version}
Requires: gnome-device-manager = %{version}-%{release}
Requires: pkgconfig

%description devel
Development files for gnome-device-manager.

%prep
%setup -q
%patch0 -p1 -b .note-theming

%build
%configure
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT

make install DESTDIR=$RPM_BUILD_ROOT

desktop-file-install --vendor gnome --delete-original                        \
                     --dir $RPM_BUILD_ROOT%{_datadir}/applications           \
                     $RPM_BUILD_ROOT%{_datadir}/gnome-device-manager.desktop


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

%find_lang %name --with-gnome

%post
scrollkeeper-update -q
touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
    gtk-update-icon-cache -q %{_datadir}/icons/hicolor
fi

%postun
scrollkeeper-update -q
touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
    gtk-update-icon-cache -q %{_datadir}/icons/hicolor
fi

%post -p /sbin/ldconfig libs

%postun -p /sbin/ldconfig libs

%post -p /sbin/ldconfig devel

%postun -p /sbin/ldconfig devel

%clean
rm -rf $RPM_BUILD_ROOT

%files  -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING NEWS README

%{_bindir}/gnome-device-manager
%{_datadir}/applications/gnome-device-manager.desktop
%{_datadir}/icons/hicolor/*/apps/*.png

%files devel
%defattr(-,root,root,-)
%{_libdir}/pkgconfig/*.pc
%{_libdir}/*.so
%{_includedir}/*

%files libs
%defattr(-,root,root,-)
%{_libdir}/*.so.*

%changelog
* Thu Nov 29 2007 Matthias Clasen <mclasen@redhat.com> - 0.2-2
- Improve the theming of notes/warnings

* Wed Oct 17 2007 David Zeuthen <davidz@redhat.com> - 0.2-1%{?dist}
- Initial build