%define glib2_version             2.36.0
%define gtk3_version              3.8.0
%define gnome_doc_utils_version   0.3.2
%define udisks2_version           2.0.0

Summary: Disk management application
Summary(ja): ディスク管理アプリケーション
Name: gnome-disk-utility
Version: 3.8.0
Release: 1%{?_dist_release}
License: LGPLv2+
Group: System Environment/Libraries
URL: http://git.gnome.org/cgit/gnome-disk-utility

Source0: %{name}-%{version}.tar.xz

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

Requires(post,postun): desktop-file-utils
Requires(postun,posttrans): glib2

BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: gtk3-devel >= %{gtk3_version}
BuildRequires: gettext
BuildRequires: desktop-file-utils
BuildRequires: gnome-settings-daemon-devel
BuildRequires: udisks2-devel >= %{udisks2_version}
BuildRequires: libsecret-devel >= 0.7
BuildRequires: libpwquality-devel >= 1.0.0
BuildRequires: libcanberra-gtk3-devel
BuildRequires: libdvdread-devel
BuildRequires: libnotify-devel
BuildRequires: intltool
BuildRequires: docbook-style-xsl
BuildRequires: autoconf
BuildRequires: gnome-common
BuildRequires: yelp-tools

Obsoletes: gnome-disk-utility-format
Obsoletes: nautilus-gdu

Obsoletes: %{name}-libs < 3.4.0
Provides: %{name}-libs = %{version}
Obsoletes: %{name}-ui-libs < 3.4.0
Provides: %{name}-ui-libs = %{version}

Obsoletes: %{name}-devel < 3.4.0
Obsoletes: %{name}-ui-devel < 3.4.0

Vendor: Project Vine
Distribution: Vine Linux
Packager: Takemikaduchi

%description
This package contains the Palimpsest disk management application.
Palimpsest supports partitioning, file system creation, encryption,
RAID, SMART monitoring, etc.


%prep
%setup -q

%build
autoreconf -if
%configure --disable-static
make

%install
rm -rf $RPM_BUILD_ROOT

make install DESTDIR=$RPM_BUILD_ROOT

find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} \;

%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT


%post 
touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
  gtk-update-icon-cache -q %{_datadir}/icons/hicolor
fi
update-desktop-database %{_datadir}/applications &> /dev/null

%postun
touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
  gtk-update-icon-cache -q %{_datadir}/icons/hicolor
fi
update-desktop-database %{_datadir}/applications &> /dev/null
glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:

%posttrans
glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc COPYING NEWS README
%{_bindir}/gnome-disk-image-mounter
%{_bindir}/gnome-disks
%{_libdir}/gnome-settings-daemon-3.0/gdu-sd-plugin.gnome-settings-plugin
%{_libdir}/gnome-settings-daemon-3.0/libgdu-sd.so
%{_datadir}/applications/gnome-disk-image-mounter.desktop
%{_datadir}/applications/gnome-disks.desktop
%{_datadir}/%{name}
%{_datadir}/glib-2.0/schemas/org.gnome.Disks.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.gdu-sd.gschema.xml
%{_datadir}/icons/hicolor/*/apps/*
%{_datadir}/icons/HighContrast/*/apps/*
%{_mandir}/man1/gnome-disk-image-mounter.1.gz
%{_mandir}/man1/gnome-disks.1.gz


%changelog
* Sun Apr 21 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.8.0-1
- new upstream release
- add BuildRequires: gnome-settings-daemon-devel, libcanberra-gtk3-devel, libdvdread-devel, libnotify-devel

* Fri Oct 12 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.1-1
- new upstream release

* Sat Sep 29 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.0-1
- new upstream release
- add BuildRequires: libsecret-devel, libpwquality-devel, docbook-style-xsl
- add BuildRequires: autoconf, gnome-common
- change BuildRequires: yelp-tools instead of gnome-doc-utils

* Mon Apr 30 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.1-1
- new upstream release

* Sun Apr 22 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.0-1
- new upstream release
- change BuildRequires: udisks2-devel instead of udisks-devel
- remove -libs, -ui-libs, -devel, -ui-devel sub packages

* Tue Aug 16 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.0.2-1
- new upstream release
- change BuildRequires: gtk3-devel instead of gtk2-devel
- change BuildRequires: unique3-devel instead of unique-devel

* Tue Oct 05 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.32.0-1
- new upstream release
- fix %files

* Thu Apr 08 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.30.1-1
- new upstream release
- change BuildRequires: DeviceKit-disks-devel -> udisks-devel
- change Requires: DeviceKit-disks -> udisks
- add BuildRequires: avahi-ui-devel

* Wed Nov 04 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.28.1-1
- initial build for Vine Linux

* Mon Nov  2 2009 David Zeuthen <davidz@redhat.com> - 2.28.1-1%{?dist}
- Update to 2.28.1

* Tue Oct 13 2009 Tomas Bzatek <tbzatek@redhat.com> - 2.28.0-5%{?dist}
- Fix nautilus crashes by proper object referencing

* Mon Oct  5 2009 Matthias Clasen <mclasen@redhat.com> - 2.28.0-4%{?dist}
- Incorporate fixes for translation issues from the stable upstream branch

* Fri Sep 18 2009 David Zeuthen <davidz@redhat.com> - 2.28.0-2%{?dist}
- BR libatasmart-devel

* Fri Sep 18 2009 David Zeuthen <davidz@redhat.com> - 2.28.0-1%{?dist}
- Update to upstream release 2.28.0
- Compared to previous releases, this release should whine less about SMART

* Mon Aug 17 2009 David Zeuthen <davidz@redhat.com> - 0.5-3%{?dist}
- Drop upstreamed patch

* Mon Aug 17 2009 David Zeuthen <davidz@redhat.com> - 0.5-2%{?dist}
- Rebuild

* Mon Aug 17 2009 David Zeuthen <davidz@redhat.com> - 0.5-1%{?dist}
- Update to release 0.5

* Mon Jul 27 2009 Matthias Clasen <mclasen@redhat.com> - 0.4-3%{?dist}
- Drop PolicyKit from .pc files, too

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Fri Jun 19 2009 David Zeuthen <davidz@redhat.com> - 0.4-1%{?dist}
- Update to release 0.4

* Fri May 01 2009 David Zeuthen <davidz@redhat.com> - 0.3-1%{?dist}
- Upstream release 0.3

* Wed Apr 15 2009 David Zeuthen <davidz@redhat.com> - 0.3-0.5.20090415git%{?dist}
- New snapshot

* Sun Apr 12 2009 David Zeuthen <davidz@redhat.com> - 0.3-0.4.20090412git%{?dist}
- New snapshot

* Fri Apr 10 2009 Matthias Clasen <mclasen@redhat.com> - 0.3-0.3.20090406git%{?dist}
- Don't own directories that belong to hicolor-icon-theme

* Wed Apr 08 2009 David Zeuthen <davidz@redhat.com> - 0.3-0.2.20090406git%{?dist}
- Fix bug in detecting when a PolicyKit error is returned (#494787)

* Mon Apr 06 2009 David Zeuthen <davidz@redhat.com> - 0.3-0.1.20090406git%{?dist}
- New snapshot

* Wed Mar 04 2009 David Zeuthen <davidz@redhat.com> - 0.2-2%{?dist}
- Don't crash when changing the LUKS passphrase on a device

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

* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-0.git20080720.2.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Tue Jan 27 2009 Matthias Clasen <mclasen@redhat.com> 0.1-0.git20080720.2%{?dist}
- Rebuild for pkgconfig provides

* Sun Nov 23 2008 Matthias Clasen <mclasen@redhat.com> 0.1-0.git20080720.1%{?dist}
- Improve %%summary and %%description

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