%define name	baobab
%define version	3.18.1
%define release	1%{?_dist_release}

Summary:	A graphical disk usage analyzer
Summary(ja): 	グラフィカルなハードディスク使用量の分析ツール
Name:		%{name}
Version:	%{version}
Release: 	%{release}
Source0:	http://ftp.gnome.org/pub/GNOME/sources/%{name}/3.18/%{name}-%{version}.tar.xz
License:	GPLv2+
Group:		User Interface/Desktops
URL:		http://www.gnome.org

BuildRequires:	gtk3-devel
BuildRequires:	itstool
BuildRequires:	vala-tools

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

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

Vendor:		Project Vine
Distribution:	Vine Linux
Packager:	Takemikaduchi

%description
A graphical tool to analyse disk usage in local and remote filesystems.

Baobab is able to scan either specific directories (local or remote) or
the whole filesystem, in order to give the user a graphical tree repre-
sentation including each directory size or percentage in the branch.
It also includes a complete file-search functionality and auto-detects
in real-time any changes made to your home directory as far as any 
mounted/unmounted device.

%description -l ja
ローカル及びリモートファイルシステムの、ハードディスク使用量をグラフィ
カルに分析するツールです。

Baobab は、各ディレクトリのサイズと使用量をグラフィカルに表示する為に、
指定したディレクトリ（ローカルまたはリモート）やファイルシステム全体を
スキャンできます。また完全なファイル検索機能や、ホームディレクトリへの
変更をリアルタイムに自動で検出する機能も含んでいます。


%prep

%setup -q

%build
%configure
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT

make install DESTDIR=$RPM_BUILD_ROOT

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

%find_lang %{name} --all-name --with-gnome


%clean
rm -rf ${RPM_BUILD_ROOT}


%post
touch --no-create %{_datadir}/icons/hicolor &> /dev/null || :

%postun
touch --no-create %{_datadir}/icons/hicolor &> /dev/null || :
gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:
update-desktop-database -q &> /dev/null ||:

%posttrans
glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:
gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
update-desktop-database -q &> /dev/null ||:


%files -f %{name}.lang
%defattr(-,root,root,-)
%{_bindir}/%{name}
%{_datadir}/appdata/org.gnome.baobab.appdata.xml
%{_datadir}/applications/org.gnome.baobab.desktop
%{_datadir}/dbus-1/services/org.gnome.baobab.service
%{_datadir}/glib-2.0/schemas/org.gnome.baobab.gschema.xml
%{_datadir}/icons/hicolor/*/*/*
%{_mandir}/man1/%{name}.1.gz

%changelog
* Sun Nov 01 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.18.1-1
- new upstream release

* Sun Apr 19 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.16.1-1
- new upstream release

* Sun Mar 29 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.16.0-1
- new upstream release

* Sun Oct 26 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.14.1-1
- new upstream release

* Sun Apr 20 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.12.1-1
- new upstream release

* Sun Mar 30 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.12.0-1
- new upstream release

* Sat Jan 04 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.10.1-2
- rebuild with VineSeed environment

* Sat Oct 26 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.10.1-1
- new upstream release

* Sun May 19 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.8.2-1
- new upstream release

* Sun Apr 21 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.8.1-1
- new upstream release

* Sun Jan 13 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.4-1
- new upstream release

* Fri Nov 16 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.3-1
- new upstream release

* Wed Oct 17 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.2-1
- new upstream release
- add BuildRequires: vala-tools

* Sun Sep 30 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.0-1
- new upstream release
- remove old patches and required packages

* Sat Sep 06 2008 Shu KONNO <owa@bg.wakwak.com> 2.4.2-1vl5
- applied new versioning policy, spec in utf-8

* Fri Jan 26 2007 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 2.4.2-0vl2
- add patch1; workaround to fix non utf-8 character encoding.
- add patch2 to update ja.po.
- coorrectly handle gconf scheme at post & preun.

* Sun Sep 24 2006 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 2.4.2-0vl1
- initial build for Vine Linux
