Name: rep-gtk
Version:     0.18
Release:     1%{?_dist_release}
Summary:     GTK+ binding for librep Lisp environment
Summary(ja): librep Lisp 環境用 GTK+ バインディング
Requires:    librep >= 0.13, gtk+ >= 1.2
License:   GPL
Group:       Development/Languages
URL:         http://rep-gtk.sourceforge.net/
Source:      http://download.sourceforge.net/rep-gtk/rep-gtk-%{version}.tar.gz
Patch0:      rep-gtk-0.18-compat.patch
Buildroot:   %{_tmppath}/%{name}-%{version}-root
BuildPrereq: librep-devel libglade-devel gnome-libs-devel gdk-pixbuf-devel
BuildRequires: db4-devel alsa-lib-devel


%description
This is a binding of GTK+ for the librep Lisp interpreter. It is based
on Marius Vollmer's guile-gtk package (initially version 0.15, updated
to 0.17), with a new glue-code generator.

%description -l ja
rep-gtk は librep Lisp インタプリタ向け GTK+ バインディングです．
Marius Vollmer さんの guile-gtk パッケージ (当初 0.15 で，現在バージョンは
0.17) をベースとして，新しく glue-code ジェネレータを追加しています．


%package libglade
Summary:     librep binding for the libglade library for loading user interfaces.
Summary(ja): librep 用 libglade バインディング
Group:       Development/Languages
Requires:    %{name} = %{version}, libglade


%description libglade
This is a binding of libglade for the librep Lisp interpreter. libglade
allows applications to dynamically load XML descriptions of GTK+ widget
hierarchies. These hierarchies may be created by the GLADE GUI builder.

%description libglade -l ja
rep-gtk-libglade は librep Lisp インタプリタ向け libglade バインディングです．
libglade を使うと，アプリケーションから GTK+ ウィジェット階層を記述した
XML を直接読みこむことが出来ます．その XML ファイルは GLADE GUI ビルダによって
作成することが出来ます．


%package gnome
Summary:     GNOME binding for librep
Summary(ja): librep 用 GNOME バインディング
Group:       Development/Languages
Requires:    %{name} = %{version}, gnome-libs, libglade


%description gnome
This is a binding of the various GNOME libraries for the librep Lisp
interpreter. It include support for the basic GNOME functions, the
GNOME user interface widgets, the GNOME Canvas architecture, and the
GNOME version of libglade.

%description gnome -l ja
rep-gtk-gnome は librep Lisp インタプリタから様々な GNOME ライブラリに
アクセスする為のバインディングです．基本的な GNOME の機能から，GNOME
ユーザインタフェースウィジェット，GNOME Canvas アーキテクチャ，更には
GNOME 版 libglade 迄様々な種類をサポートしています．


%prep
%setup
%patch0 -p0 -b .compat

%build
LC_ALL=""
LINGUAS=""
LANG=""
export LC_ALL LINGUAS LANG

%configure --with-libglade --with-gnome
make host_type=%{_target_platform}


%install
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
make install \
    host_type=%{_target_platform} \
    installdir=$RPM_BUILD_ROOT%{_libexecdir}/rep/%{_target_platform}

## remove unuse files
rm -f $RPM_BUILD_ROOT%{_libexecdir}/rep/%{_target_platform}/gui/gtk-2/*.la


%clean
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root)
%doc README README.guile-gtk BUGS ChangeLog gtk.defs gdk.defs
%{_libexecdir}/rep/%{_target_platform}/gui/gtk-2/gtk.so
%{_libexecdir}/rep/%{_target_platform}/gui/gtk-2/types.so
#%{_libexecdir}/rep/%{_target_platform}/gui/gtk
#%{_libexecdir}/rep/%{_target_platform}/gui/gtk.so
#%{_libexecdir}/rep/%{_target_platform}/sgtk-types.so
#%{_libexecdir}/rep/%{_target_platform}/gtk.so


%files libglade
%defattr(-,root,root)
%doc libglade.defs examples/test-libglade examples/simple.glade
%doc examples/rep-ui examples/rep-ui.glade
%{_libexecdir}/rep/%{_target_platform}/gui/gtk-2/libglade.so
#%{_libexecdir}/rep/%{_target_platform}/libglade.so*


%files gnome
%defattr(-,root,root)
%doc gnome*.defs gdk-pixbuf.defs libglade.defs
%doc examples/gnome-test examples/canvas-test
%{_libexecdir}/rep/%{_target_platform}/gui/gtk-2/gnome-canvas.so
%{_libexecdir}/rep/%{_target_platform}/gui/gtk-2/gnome-lib.so
%{_libexecdir}/rep/%{_target_platform}/gui/gtk-2/gnome-ui.so
#%{_libexecdir}/rep/%{_target_platform}/gui/gnome
#%{_libexecdir}/rep/%{_target_platform}/gui/gnome.so
#%{_libexecdir}/rep/%{_target_platform}/gnome*.so
#%{_libexecdir}/rep/%{_target_platform}/libglade-gnome.so
#%{_libexecdir}/rep/%{_target_platform}/gdk-pixbuf.so


%changelog
* Sun Sep 28 2008 Shu KONNO <owa@bg.wakwak.com> 0.18-1vl5
- applied new versioning policy, spec in utf-8
- new upstream release
- added rep-gtk-0.18-compat.patch
- removed *.la

* Thu Nov 29 2007 Shu KONNO <owa@bg.wakwak.com> 0.15-1vl7
- s/Copyright/License/

* Sun Jul 17 2005 KANEKO Seiji <giragge@m2.pbc.ne.jp> 0.15-1vl6
- rebuilt with db4-4.2.52 again (db4-devel)
- add BuildRequires: db4-devel, alsa-lib-devel
- commented Packager

* Sat Nov  6 2004 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 0.15-1vl5
- rebuilt with db4-4.2.52

* Mon Jan 20 2003 Satoshi MACHINO <machino@vinelinux.org> 0.15-1vl4
- rebuild to remove old librep depandancy, it depended on gmp-2

* Wed Feb 20 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 0.15-1vl3
- rebuild to remove rpmlib dependancy

* Sun May 20 2001 MATSUBAYASHI 'Shaolin' Kohji <shaolin@vinelinux.org>
- 0.15-1vl2
- rebuilt with librep = 0.13.6
- added Japanese summary and description

* Wed Dec 20 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
- 0.15-1vl1
- rebuilt under rpm-3.0.6-0vl8

* Tue Jun 13 2000 John Harper <john@dcs.warwick.ac.uk>
- use better macros

* Fri Sep 17 1999 John Harper <john@dcs.warwick.ac.uk>
- specify installdir when installing

* Tue Sep 14 1999 Aron Griffis <agriffis@bigfoot.com>
- 0.4 spec file update: added buildroot
