Summary: Light and configurable window manager
Summary(ja): 軽量かつ柔軟なウィンドウマネージャ
Name: icewm
Version: 1.3.8
Release: 1%{?_dist_release}

License: LGPLv2+
Group: User Interface/Desktops
URL: http://www.icewm.org

Source: http://downloads.sourceforge.net/icewm/%{name}-%{version}.tar.gz
Source1: http://lostclus.linux.kiev.ua/scripts/icewm-xdg-menu
Source2: icewm.desktop
Source3: icewm-startup
# Source4: clearlooks-v3.tgz

# 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

Patch1: icewm-1.3.8-menu.patch
Patch2:	icewm-toolbar.patch
Patch3:	icewm-keys.patch
Patch4:	icewm-1.3.8-fribidi.patch
Patch5:	icewm-1.3.7-dso.patch
Patch6:	icewm-defaults.patch
Patch7:	icewm-1.3.7-menuiconsize.patch
Patch8:	icewm-1.3.8-deprecated.patch

Buildroot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: fribidi-devel
BuildRequires: gdk-pixbuf2-devel
BuildRequires: giflib-devel
BuildRequires: libICE-devel
BuildRequires: libXinerama-devel
BuildRequires: libXft-devel
BuildRequires: libXt-devel
BuildRequires: libgnomeui-devel
BuildRequires: gettext
BuildRequires: gnome-desktop-devel
BuildRequires: gnome-vfs2-devel
BuildRequires: popt-devel
BuildRequires: xorg-x11-proto-devel

Requires: gnome-icon-theme
Requires: alsa-utils
Requires: xdg-utils
Requires: xterm
Requires: pyxdg

Vendor: Project Vine
Distribution: Vine Linux

# 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 window manager 
Summary(ja): IceWM における GNOME メニューのサポート
Group:    User Interface/Desktops
Requires: icewm = %{version}-%{release}
Requires: gnome-menus

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


%prep
%setup -q 
%patch1 -p0 -b .menu
%patch2 -p1 -b .toolbar
%patch3 -p1 -b .keys
%patch4 -p0 -b .fribidi
%patch5 -p0 -b .dso
%patch6 -p0 -b .defaults
%patch7 -p1 -b .menuiconsize
%patch8 -p0 -b .deprecated


%build
autoreconf -vif
%configure \
    --enable-gradients \
    --enable-i18n \
    --enable-menus-gnome2 \
    --with-cfgdir=%{_sysconfdir}/icewm
make %{?_smp_mflags}

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

mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1
install -p -m 644 doc/icewm.1.man $RPM_BUILD_ROOT/%{_mandir}/man1/icewm.1

mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{_bindir}
install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT/%{_bindir}

mkdir -p $RPM_BUILD_ROOT%{_datadir}/icewm/
install -p -m 755 %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/icewm/startup

mkdir -p $RPM_BUILD_ROOT/%{_datadir}/xsessions/
install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/xsessions/

# 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 README.wm-session TODO
%doc doc/*.html
%{_bindir}/icehelp
%{_bindir}/icesh
%{_bindir}/icewm
%{_bindir}/icewm-session
%{_bindir}/icewm-set-gnomewm
%{_bindir}/icewm-xdg-menu*
%{_bindir}/icewmbg
%{_bindir}/icewmhint
%{_bindir}/icewmtray
%{_datadir}/icewm
%{_datadir}/xsessions/icewm.desktop
%{_mandir}/man1/icewm.1*

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


%changelog
* Wed Dec 17 2014 Ryoichi INAAGKI <ryo1@toki.waseda.jp> 1.3.8-1
- updated to 1.3.8
- added patches from Fedora Core

* 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
