File icewm.spec of Package icewm

#
# spec file for package icewm
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           icewm
BuildRequires:  autoconf
BuildRequires:  gcc-c++
BuildRequires:  gnome-desktop-devel
BuildRequires:  libgnomeui-devel
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(gdk-pixbuf-xlib-2.0)
BuildRequires:  pkgconfig(gnome-desktop-2.0)
BuildRequires:  pkgconfig(libgnomeui-2.0)
%if 0%{?suse_version} >= 1030
BuildRequires:  fdupes
%endif
Provides:       windowmanager
Requires:       desktop-data
Requires:       icewm-bin
Requires:       xdg-menu
Version:        1.3.7
Release:        0
Source:         icewm-%version.tar.bz2
Source1:        %{name}.desktop
Patch1:         icewm-multiByte.patch
Patch2:         icewm-menu.patch
Patch3:         icewm-docdir.patch
Patch4:         icewm-1.2.35-override-config.patch
Patch5:         icewm-1.2.35-empty-winmenu.patch
Patch6:         icewm-1.2.35-unaligned-access.patch
Patch7:         icewm-1.3.6-winoptions.patch
Patch8:         icewm-linking.patch
Patch9:         icewm-gcc47.patch
Patch10:        icewm-x11.patch
# applied in %%build
Patch99:        icewm-preferences.patch
Url:            http://www.icewm.org/
Summary:        Window Manager with a Taskbar
License:        LGPL-2.1+
Group:          System/GUI/Other
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
A window manager for the X Window System that can emulate the look of
Windows '95, OS/2 Warp 3, OS/2 Warp 4, and Motif and tries to take the
best features from those systems. IceWM features multiple workspaces,
opaque move and resize, a taskbar, a window list, mailbox status, and a
digital clock. It is fast and small.



Authors:
--------
    Marko Macek <Marko.Macek@gmx.net>

%package default
Summary:        Window Manager with a Taskbar--Default Version
Group:          System/GUI/Other
Provides:       icewm-bin
Requires:       icewm
Conflicts:      icewm-lite

%description default
A window manager for the X Window System that can emulate the look of
Windows '95, OS/2 Warp 3, OS/2 Warp 4, and Motif and tries to take the
best features from those systems. IceWM features multiple workspaces,
opaque move and resize, a taskbar, a window list, mailbox status, and a
digital clock. It is fast and small.



Authors:
--------
    Marko Macek <Marko.Macek@gmx.net>

%package gnome
Summary:        Windowmanager with Taskbar - gnome version
Group:          System/GUI/GNOME
Requires:       icewm-default

%description gnome
Window Manager for X Window System. Can emulate the look of Windows 95,
OS/2 Warp 3,4, Motif. Tries to take the best features of the above
systems. Features multiple workspaces, opaque move and resize, task
bar, window list, mailbox status, digital clock. Fast and small.

This package adds GNOME menu and sound support to icewm.



Authors:
--------
    Marko Macek <Marko.Macek@gmx.net>

%prep
%setup -q
%patch1
%patch2
%patch3
%patch4
%patch5
%patch6
%patch7 -p1
%patch8
%patch9 -p1
%patch10 -p1

%build
autoconf
export CFLAGS="$RPM_OPT_FLAGS"
export CXXFLAGS="$RPM_OPT_FLAGS"
# needed for 10.[12] builds in the bs
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/gnome/%_lib/pkgconfig
./configure --disable-silent-rules --without-debug \
	    --sysconfdir=/etc \
	    --with-cfgdir=/etc/icewm \
	    --prefix=/usr \
	    --with-docdir=%{_docdir} \
	    --enable-i18n \
	    --enable-nls \
	    --enable-corefonts \
	    --enable-guievents \
	    --enable-antialiasing \
	    --enable-gradients \
	    --enable-shaped-decorations \
	    --with-icesound=oss,esd \
	    --with-imlib \
	    --enable-menus-gnome2
make %{?jobs:-j%jobs} V=1
# patch generated lib/preferences file
patch -p0 -i %{P:99}

%install
make DESTDIR=$RPM_BUILD_ROOT install install-docs
mkdir -p $RPM_BUILD_ROOT/etc/icewm
for cfgfile in keys menu preferences toolbar winoptions ; do
	mv $RPM_BUILD_ROOT/usr/share/icewm/$cfgfile \
	$RPM_BUILD_ROOT/etc/icewm
done
%{find_lang} icewm
ln -s icewm.html $RPM_BUILD_ROOT/%{_docdir}/icewm/index.html
# install the xsession desktop file
mkdir -p $RPM_BUILD_ROOT/usr/share/xsessions
cp -f %{SOURCE1} $RPM_BUILD_ROOT/usr/share/xsessions
%suse_update_desktop_file $RPM_BUILD_ROOT/usr/share/xsessions/icewm.desktop
# link duplicate theme icons to save some space
%{?fdupes:%fdupes %buildroot/usr/share/icewm/themes/}

%clean
rm -rf $RPM_BUILD_ROOT;

%files -f icewm.lang
%defattr(-,root,root)
%doc %{_docdir}/icewm
%dir /etc/icewm
%config /etc/icewm/*
/usr/share/icewm/
/usr/share/xsessions/*

%files default
%defattr(-,root,root)
/usr/bin/icewm
/usr/bin/icewmhint
/usr/bin/icewmbg
/usr/bin/icehelp
/usr/bin/icesh
/usr/bin/icewmtray
/usr/bin/icewm-session

%files gnome
%defattr(-,root,root)
/usr/bin/icesound
/usr/bin/icewm-menu-gnome2
/usr/bin/icewm-set-gnomewm

%changelog