%define name libcxp
%define version 0.5.6
%define release 2%{?_dist_release}

Name: %{name}
Summary: libcxp is the base library of cxp application family.
Version: %{version}
Release: %{release}
Source: %{name}-%{version}.tar.gz
Group: System Environment/Libraries
URL: http://cxplorer.sourceforge.jp/
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
License: GPL
Requires: gtk2 GConf2 shared-mime-info
BuildRequires: gtk2-devel GConf2-devel shared-mime-info

Summary(ja): libcxp は cxp アプリケーションファミリのベースライブラリです。

%description
libcxp is the base library of cxp application family. But, cxplorer is only
applicaiton which is developped as cxp family yet.

%description -l ja
 libcxpは、cxpアプリケーションファミリのベースライブラリです。しかし、まだ
cxp familyとして開発されているのはcxplorerのみです。

%package devel
Summary:	Libraries and include files for libcxp.
Group:		Development/Libraries
Requires:	%{name} = %{version}
Summary(ja):	libcxpのライブラリとインクルードファイル

%description devel
Libraries and header files if you want to make use of the libcxp library in your
own programs.

%description -l ja devel
libcxpライブラリを利用したプログラムを作成するのに必要なライブラリとヘッダファイル

%prep
rm -rf $RPM_BUILD_ROOT

%setup -q -n %{name}-%{version}
%build
%configure

make

%install
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
%makeinstall
unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL

%{find_lang} %{name}

%post
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/libcxp.schemas > /dev/null
/sbin/ldconfig

%preun
if [ $1 = 0 ]; then
	export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
	gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/libcxp.schemas > /dev/null
fi

%postun
/sbin/ldconfig


%clean
rm -rf $RPM_BUILD_ROOT

%files -f %{name}.lang
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog INSTALL README NEWS
%{_libdir}/libcxp.so.*
%{_datadir}/pixmaps/cxp
%{_sysconfdir}/gconf/schemas/libcxp.schemas

%files devel
%defattr (-, root, root)
/usr/include/cxp
%{_libdir}/libcxp.so
%{_libdir}/libcxp.a
%{_libdir}/pkgconfig/libcxp.pc

%changelog
* Sun Sep 26 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.5.6-2
- rebuild with rpm-4.8.1 for pkg-config file

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

* Sun Sep 10 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 0.5.6-0vl2
- changed Group to System Environment/Libraries
- added /sbin/ldconfig to %post and %postun section

* Fri Dec 30 2005 Yasumichi Akahoshi <yasumichi@vinelinux.org>
- 0.5.6-0vl1
- version update(upstream)
- devide devel sub package.

* Wed Oct 12 2005 Yasumichi Akahoshi <w2linux@lapis.plala.or.jp>
- 0.5.5-0vl1
- version update(upstream)

* Wed Oct 05 2005 Yasumichi Akahoshi <w2linux@lapis.plala.or.jp>
- version update(upstream)

* Thu Sep 08 2005 Yasumichi Akahoshi <w2linux@lapis.plala.or.jp>
- version update(upstream)

* Mon Sep 05 2005 Yasumichi Akahoshi <w2linux@lapis.plala.or.jp>
- 0.5.0-0vl1
- version update(upstream)
- add script related gconf.

* Thu May 19 2005 Yasumichi Akahoshi <w2linux@lapis.plala.or.jp>
- 0.4.2-0vl1
- revision update(upstream)
- 0.4.2-0vl2
- fix GROUP

* Wed May 11 2005 Yasumichi Akahoshi <w2linux@lapis.plala.or.jp>
- 0.4.1-0vl1
- First release