Summary: Fast and small X11 window manager
Summary(ja): 高速で軽量なウィンドウマネージャ
Name: icewm
Version: 1.2.37
Release: 4%{?_dist_release}
Source: http://ftp1.sourceforge.net/icewm/icewm-%{version}.tar.gz
Source1: %{name}.desktop
Source2: %{name}-1.2.32-ja.po

# default menu file for Vine Linux
Source10: %{name}-menu.vine
Source11: %{name}-toolbar.vine

# addtional themes
Source100: truecurve-default-1.0.4.tar.gz
Source101: SilverXP-1.2.17-double-1.tar.bz2
Source102: icecrack-default-2.1.0.tar.gz

Patch0: icewm-1.2.37-gnome2.patch

Patch101: icewm-1.2.37-makefile.patch
Patch102: icewm-1.2.37-session.patch

URL: http://icewm.sourceforge.net/
License: GPL
Group: User Interface/Desktops
Buildroot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: imlib-devel libpng-devel freetype2-devel
BuildRequires: gnome-desktop-devel startup-notification-devel
BuildRequires: gnome-vfs2-devel libgnomeui-devel
BuildRequires: xorg-x11-font-utils
BuildRequires: libSM-devel

Vendor: Project Vine
Distribution: Vine Linu

# default apps
# Prereq: mlterm firefox sylpheed

%description
A lightweight window manager for the X Window System. Optimized for
"feel" and speed, not looks. Features multiple workspaces, opaque
move/resize, task bar, window list, clock, mailbox, CPU, Network, APM
status.

%package menu-gnome2
Summary: GNOME menu support for icewm (using gnome 2.x).
Summary(ja): IceWM における GNOME メニューのサポート
Group:    User Interface/Desktops
Requires: icewm = %{version}
Requires: gnome-desktop-libs

%description menu-gnome2
GNOME menu support for icewm (using gnome 2.x).


%prep
%setup -q -a 100 -a 101 -a 102
%patch0 -p1
%patch101 -p1
%patch102 -p1
cp -p %{SOURCE2} po/ja.po

autoreconf -if

%build
%configure --enable-menus-gnome2
make

%install
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install

mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/X11/dm/Sessions
install -m755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/X11/dm/Sessions

# installs default menu and toobar
install -m644 %{SOURCE10} $RPM_BUILD_ROOT%{_datadir}/icewm/menu
install -m644 %{SOURCE11} $RPM_BUILD_ROOT%{_datadir}/icewm/toolbar

# installs additional themes
cp -pr TrueCurve-1.0.4 $RPM_BUILD_ROOT%{_datadir}/icewm/themes/TrueCurve
cp -pr icewm/themes/SilverXP-1.2.17-double-1 $RPM_BUILD_ROOT%{_datadir}/icewm/themes/SilverXP
cp -pr IceCrack2 $RPM_BUILD_ROOT%{_datadir}/icewm/themes/IceCrack

%find_lang %{name}

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

%files -f %{name}.lang
%defattr(-,root,root)
%doc AUTHORS BUGS CHANGES COPYING INSTALL README TODO
%doc doc/*.html doc/icewm.sgml
%{_sysconfdir}/X11/dm/Sessions/%{name}.desktop
%{_bindir}/icehelp
%{_bindir}/icesh
%{_bindir}/icewm
%{_bindir}/icewm-session
%{_bindir}/icewmbg
%{_bindir}/icewmhint
%{_bindir}/icewmtray
%{_datadir}/icewm

%files menu-gnome2
%defattr(-,root,root)
%{_bindir}/icewm-menu-gnome2

%changelog
* Sat Sep 17 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.2.37-4
- update Source10 (icewm-menu.vine)

* Fri Sep 16 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.2.37-3
- Patch101 (icewm-1.2.37-makefile.patch)
- Patch102 (icewm-1.2.37-session.patch)

* Fri Apr 29 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.2.37-2
- rebuild with rpm-4.8.1
- add BuildRequires: libSM-devel

* Mon Apr 27 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.37-1vl5
- new upstream release
- added Patch0

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

* Thu Aug 16 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.32-0vl2
- rebuilt for VineSeed

* Thu Aug 16 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.32-0vl1
- new upstream release
- updated ja.po

* Sun Jul  8 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.30-0vl1
- new upstream release
- rebuilt with new toolchain

* Mon Sep 04 2006 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.2.26-0vl4
- rebuilt for VineSeed (4.0)

* Mon Sep 04 2006 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.2.26-0vl3
- drop Prereq: mlterm firefox sylpheed <BTS:VineLinux:90>

* Sun Jul 23 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.26-0vl2
- rebuilt for VineSeed (4.0)

* Sun Jul 23 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.26-0vl1
- new upstream release
- added Source10 and 11 for default settings
- added Prereq for default settings
- added Source100, 101 and 102 for additional themes
- added BuildPrereq: libpng-devel

* Sat Aug 20 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.23-0vl2
- rebuild with VineSeed Plus
- removed BuildPrereq: libjpeg-devel, libtiff-devel, libungif-devel 

* Sat Aug 20 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.23-0vl1
- new upstream release
- added BuildPrereq: startup-notification-devel,
- added BuildPrereq: libjpeg-devel, libtiff-devel, libungif-devel
- updated ja.po

* Tue Jun 14 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.21-0vl1
- new upstream release

* Sat Jan 15 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.20-0vl1
- new upstream release
- updated ja.po

* Sun Dec 12 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.17-0vl1
- new upstream release
- updated ja.po

* Mon Aug 16 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.16-0vl1
- new upstream release
- added ice.desktop file for gdm
- added icewm-menu-gnome2 sub-package 
- updated ja.po

* Sat May  3 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.2.7-0vl1
- first release
