#
# this spec file is based on Momonga Project
# see http://www.momonga-linux.org/
#
Summary:   golem - an X11 Window Manager
Name:      golem
Version:   0.0.5
Release:   0vl1
License:   BSD
Group:     User Interface/Desktops
Source0:   http://telia.dl.sourceforge.net/golem/%{name}-%{version}.tar.gz
Source1:   session.golem
Source2:   http://www.rit.edu/~ads4260/golem004-taskbar-plugin.tar.gz
Source3:   golem-tasklist.tar.gz
#Source4:   http://poincare.ikezoe.net/sources/golem-0.0.5-tasklist-plugin.tar.gz
Source100:startgolem
Source101:xinitrc
Source102:golemrc
Source103:golemkeyrc
Source104:simple_menus.rc
#
Patch0:   %{name}-0.0.5-plugin.patch
Patch1:   %{name}-0.0.4-util.patch
Patch2:   %{name}-0.0.4-taskbar-ja.patch
Patch3:   %{name}-0.0.5-tasklist-ja.patch
Patch4:   %{name}-0.0.5-golem.install.in.patch
Patch5:   %{name}-0.0.5-simple_menus.patch
Patch6:   %{name}-0.0.5-screenshot_icons-0.02.patch
Patch7:   %{name}-0.0.5-pier.patch

Patch100: %{name}-0.0.5-sample.golem-themes.patch
Patch101: %{name}-0.0.5-pierrc.patch

URL:       http://golem.sourceforge.net/
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Requires: ImageMagick
PreReq: /sbin/install-info

%description
Golem is an X11 Window Manager.  Design goals are that it be fast
and lightweight, as well as customizable in any way that will not
prevent the first goal from being realized.

%prep
%setup -q
%patch0 -p1 -b .plugin
%patch1 -p1 -b .util
tar zxf %{SOURCE2} -C plugins
tar zxf %{SOURCE3} -C plugins
#tar zxf %{SOURCE4} -C plugins
%patch2 -p1 -b .taskbar-ja
%patch3 -p1 -b .tasklist
%patch4 -p1 -b .golem.install.in
%patch5 -p1 -b .simple_menus
%patch6 -p1 -b .screenshot_icons-0.02
%patch7 -p1 -b .pier
%patch100 -p1 -b .sample.golem-themes
%patch101 -p1 -b .pierrc
%build

%configure --enable-i18n --enable-sound
make host_type=%{_target_platform}

%install
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/share
mkdir -p $RPM_BUILD_ROOT/usr/lib
#make install prefix=$RPM_BUILD_ROOT datadir=$RPM_BUILD_ROOT/usr/share
make install \
    prefix=$RPM_BUILD_ROOT \
    bindir=$RPM_BUILD_ROOT/usr/bin \
    libdir=$RPM_BUILD_ROOT/usr/lib \
    datadir=$RPM_BUILD_ROOT/usr/share \
    mandir=$RPM_BUILD_ROOT/usr/share/man \
    host_type=%{_target_platform} 
#mkdir -p $RPM_BUILD_ROOT/etc/X11/xinit/session.d
#install -m 644 %{SOURCE1} $RPM_BUILD_ROOT/etc/X11/xinit/session.d/golem
install -m 755 util/menu-ssh-hosts $RPM_BUILD_ROOT%{_datadir}/golem/
install -m 755 %{SOURCE100} $RPM_BUILD_ROOT/usr/bin
install -m 755 %{SOURCE101} $RPM_BUILD_ROOT%{_datadir}/golem
install -m 644 %{SOURCE102} $RPM_BUILD_ROOT%{_datadir}/golem
install -m 644 %{SOURCE103} $RPM_BUILD_ROOT%{_datadir}/golem
install -m 644 %{SOURCE104} $RPM_BUILD_ROOT%{_datadir}/golem/plugins/simple_menus/rc

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

%files
%defattr(-, root, root)
%doc LICENSE PLUGINS README THEMES TODO
/usr/bin/*
/usr/lib/golem
/usr/share/golem
/usr/share/man/man1/*.gz

%changelog
* Sun Mar 21 2004 HAYASHI Kentarou <linjian@gigo-ice.org> 0.0.5-0vl1
- customized rc files.
- added screenshot_icons patch([golem-devel 2004/03/03] by Florian Forster)
- added pier patch (support ad-hoc PNG format)

* Sat Dec 27 2003 mutecat <mutecat@momonga-linux.org>
- (0.0.5-3m)
- tasklist mojibake kaishou

* Mon May 27 2002 Junichiro Kita <kita@kitaj.no-ip.com>
- (0.0.5-2k)
- pakuri

* Thu May 23 2002 Hiroyuki Ikezoe <zoe@kasumi.sakura.ne.jp>
- (0.0.5-0.1zoe)
- up to 0.0.5 
- remove shade plugin

* Sat Mar 23 2002 Junichiro Kita <kita@kitaj.no-ip.com>
- (0.0.4-4k)
- files: add menu-ssh-hosts
- golem.install installs menu-ssh-hosts and doesn't create .xsession/.xinitrc.

* Thu Mar 21 2002 Yasuhiro Takabayashi <kourin@kondara.org>
- (0.0.4-2k)
- kondaraization

* Sat Feb 2 2002 Hiroyuki Ikezoe <zoe@kasumi.sakura.ne.jp>
- (0.0.4-14zoe)
- added workspace and desktop change in tasklit plugin.

* Tue Jan 29 2002 Hiroyuki Ikezoe <zoe@kasumi.sakura.ne.jp>
- (0.0.4-13zoe)
- changed release tag. k->zoe.
- added shade plugin.

* Mon Jan 28 2002 Hiroyuki Ikezoe <zoe@kasumi.sakura.ne.jp>
- (0.0.4-12k)
- fixed silly bug in tasklist plugin

* Sun Jan 27 2002 Hiroyuki Ikezoe <zoe@kasumi.sakura.ne.jp>
- (0.0.4-11k)
- added tasklist plugin

* Sun Jan 20 2002 Hiroyuki Ikezoe <zoe@kasumi.sakura.ne.jp>
- (0.0.4-10k)
- applied nomask patch

* Wed Jan 16 2002 Hiroyuki Ikezoe <zoe@kasumi.sakura.ne.jp>
- (0.0.4-9k)
- added japanized taskbar

* Tue Jan 15 2002 Hiroyuki Ikezoe <zoe@kasumi.sakura.ne.jp>
- (0.0.4-8k)
- fixed eBlueSteel theme for middle-click event

* Sun Jan 13 2002 Hiroyuki Ikezoe <zoe@kasumi.sakura.ne.jp>
- (0.0.4-7k)
- added middle-click event and shaded window feature

* Sat Jan 12 2002 Hiroyuki Ikezoe <zoe@kasumi.sakura.ne.jp>
- (0.0.4-6k)
- removed taskbar plugin.
- rearranged japanese patch

* Fri Dec 28 2001 Hiroyuki Ikezoe <zoe@kasumi.sakura.ne.jp>
- (0.0.4-5k)
- added taskbar plugin.

* Fri Dec 28 2001 Hiroyuki Ikezoe <zoe@kasumi.sakura.ne.jp>
- (0.0.4-4k)
- japanized and some bug fix.

* Wed Dec 12 2001 Hiroyuki Ikezoe <zoe@kasumi.sakura.ne.jp>
- fixed restart blackbox problem

* Tue Dec 11 2001 Hiroyuki Ikezoe <zoe@kasumi.sakura.ne.jp>
- version 0.0.4
- kondarized.
- fixed golem.install path problem

* Thu Nov 01 2001 HamHam <blend@manabi.gr.jp>
- apply a patch against the unprotected string on restarting window managers.

* Wed Oct 31 2001 HamHam <blend@manabi.gr.jp>
- version 0.0.3

