%define srcname exo

Summary: Extension library to Xfce
Summary(ja): Xfce の拡張ライブラリ
Name: libexo
Version: 0.10.6
Release: 1%{?_dist_release}

Group: System Environment/Libraries
License: LGPLv2+ and GPLv2+
URL: http://www.xfce.org/

Source0: http://archive.xfce.org/src/xfce/exo/0.10/%{srcname}-%{version}.tar.bz2

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: glib2-devel >= 2.30.0
BuildRequires: gtk2-devel >= 2.24.0
BuildRequires: libSM-devel
BuildRequires: intltool
BuildRequires: libxfce4util-devel >= 4.10.0
BuildRequires: libxfce4ui-devel >= 4.10.0
BuildRequires: perl-URI
BuildRequires: chrpath
Requires(post): gtk2
Requires(postun): gtk2

Provides: %{srcname} = %{version}-%{release}

Vendor: Project Vine
Distribution: Vine Linux

%description
libexo is the extension library to Xfce developed by os-cillation.
While Xfce ships with quite a few libraries that are primarly targeted
at desktop development, libexo is targeted at application development,
with a focus on applications for Xfce.

%description -l ja
libexo は os-cillation により開発された Xfce の拡張ライブラリです．
Xfce はデスクトップ環境の開発を第一の目的としたごくわずかのライブラリ
と共に作成されていますが，libexo はアプリケーションの開発，それも
Xfce 用のアプリケーション開発に焦点を定めています．

%package -n %{name}-devel
Summary: Header files and libraries for developing apps which will use %{name}
Summary(ja): libexo の開発用ヘッダファイル及びライブラリ
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: gtk2-devel >= 2.24.0
Requires: libxfce4util-devel >= 4.10.0
Requires: libxfce4ui-devel >= 4.10.0
Provides: %{srcname}-devel = %{version}-%{release}

%description -n %{name}-devel
The libexo-devel package contains the header files and libraries needed
to develop programs that use the libexo library.

%description -n %{name}-devel -l ja
libexo-devel は libexo ライブラリを用いるプログラムの開発に
必要なヘッダファイル及びライブラリを含むパッケージです。

%prep
%setup -q -n %{srcname}-%{version}

%build
%configure --disable-static

make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'

rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.la
rm -f $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/icon-theme.cache

chrpath --delete $RPM_BUILD_ROOT%{_bindir}/exo-desktop-item-edit
chrpath --delete $RPM_BUILD_ROOT%{_bindir}/exo-open
chrpath --delete $RPM_BUILD_ROOT%{_libdir}/xfce4/exo-*/exo-helper-*

%find_lang exo-1

%clean
rm -rf $RPM_BUILD_ROOT

%post 
/sbin/ldconfig
touch --no-create %{_datadir}/icons/hicolor

%postun 
/sbin/ldconfig
if [ $1 -eq 0 ]; then
    touch --no-create %{_datadir}/icons/hicolor
    /usr/bin/gtk-update-icon-cache -qf %{_datadir}/icons/hicolor;
fi

%posttrans
gtk-update-icon-cache %{_iconsdir}/icons/hicolor &> /dev/null || :


%files -f exo-1.lang
%defattr(-,root,root)
%doc AUTHORS COPYING COPYING.LIB ChangeLog README THANKS TODO
%config(noreplace) %{_sysconfdir}/xdg/xfce4/helpers.rc
%{_bindir}/*
%{_libdir}/lib*.so.*
%{_libdir}/xfce4/*
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/*/*/*.png
%{_datadir}/pixmaps/exo-1
%{_datadir}/xfce4/helpers
%{_mandir}/man1/*

%files -n %{name}-devel
%defattr(-,root,root)
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*.pc
%{_includedir}/exo-1
%{_datadir}/gtk-doc/html/exo-1

%changelog
* Thu Jun  4 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 0.10.6-1
- new upstream release
- fixed License (some binaries are licensed under GPLv2+)

* Thu Mar 19 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 0.10.4-1
- new upstream release

* Sat Feb 28 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 0.10.3-1
- new upstrem release
- removed BR: libnotify-devel, python-devel and pygtk2-devel

* Thu Aug 28 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 0.10.2-1
- new upstrem release

* Sun Dec 29 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.8.0-2
- rebuild with VineSeed environment

* Wed Jun 06 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.8.0-1
- new upstrem release
- remove Patch0
- add BuildRequires: libxfce4ui-devel

* Mon May 23 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.6.1-1
- new upstrem release

* Sun Apr 03 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.6.0-2
- add BuildRequires: libSM-devel

* Mon Mar 28 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.6.0-1
- new upstrem release

* Thu Sep 23 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.3.107-2
- rebuilt with rpm-4.8.1 for pkg-config

* Sun May 23 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.3.107-1
- new upstrem release
- built with new toolchain

* Mon Feb  8 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.3.106-1
- new upstrem release
- added BR: perl-URI

* Wed Feb 03 2010 Shu KONNO <owa@bg.wakwak.com> 0.3.105-2
- rebuilt with python-2.6.4

* Sun Nov  1 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.3.105-1
- new upstrem release

* Fri May 22 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.3.101-1
- new upstrem release
- removed lib*.a from devel package

* Sun Aug 17 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.3.4-1
- applied with new versioning policy
- spec in UTF-8

* Fri Jan 25 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 0.3.4-0vl3
- add BuildRequires: libnotify >= 0.4.0, xfce-mcs-plugins >= 4.2.2

* Sun Dec 23 2007 UECHI Yasumasa <uechi@potaway.net> 0.3.4-0vl2
- new upstream release.

* Sun Jul 29 2007 UECHI Yasumasa <uechi@potaway.net> 0.3.2-0vl2
- build for VineSeed

* Sat Jul 28 2007 UECHI Yasumasa <uechi@potaway.net> 0.3.2-0vl1
- new upstream version
- add %{_sysconfdir}/xdg/xfce4/helpers.rc in files section.
- add %{_bindir}/* in files section.
- add %{_libdir}/xfce4 in files section.
- add %{_libexecdir}/* in files section.
- add %{_datadir}/icons/hicolor/*/apps/*.png in files section.
- add %{_mandir}/man1/* in files section.
- add %{_datadir}/xfce4/doc/*/* in files section.
- add %{_datadir}/xfce4/helpers in files section.
- remove %{_datadir}/gtk-doc/html/exo in files section.
- update icon-cache in %post and %postun.

* Fri Aug 25 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.3.0-0vl3
- changed Group to System Environment/Libraires
- changed devel Group to Development/Libraries
- added %post and %postun section

* Fri Apr 22 2005 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 0.3.0-0vl2
- rebuild for VineSeed

* Sun Apr 17 2005 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 0.3.0-0vl1
- initial build for Vine Linux
