icewm/icewm.spec

281 lines
8.6 KiB
RPMSpec
Raw Normal View History

#
# spec file for package icewm
#
# Copyright (c) 2014 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/
#
# default to gnome support
%bcond_without gnome
Name: icewm
BuildRequires: autoconf
BuildRequires: gcc-c++
BuildRequires: update-alternatives
BuildRequires: update-desktop-files
BuildRequires: xorg-x11-devel
%if %{with gnome}
BuildRequires: gnome-desktop-devel
BuildRequires: libgnomeui-devel
BuildRequires: pkgconfig(gnome-desktop-2.0)
BuildRequires: pkgconfig(libgnomeui-2.0)
%endif
BuildRequires: pkgconfig(gdk-pixbuf-xlib-2.0)
%if 0%{?suse_version} >= 1030
BuildRequires: fdupes
%endif
Provides: windowmanager
Requires: desktop-data
Requires: icewm-bin
Requires: xdg-menu
# if you have the choice, prefer the big one
Recommends: icewm-default
Version: 1.3.8
Release: 0
Source: http://downloads.sourceforge.net/project/%{name}/%{name}-1.3/%{version}/%{name}-%{version}.tar.gz
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-1.3.8-enable-guievents.patch
Patch10: icewm-susemenu.patch
Patch11: icewm-fix-themes.patch
Patch12: icewm-bg-default-at-error.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.
%package default
Summary: Window Manager with a Taskbar--Default Version
Group: System/GUI/Other
Provides: icewm-bin
Requires: icewm
Requires: update-alternatives
%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.
%package lite
Summary: Window Manager with a Taskbar -- lite version
Group: System/GUI/Other
Provides: icewm-bin
Requires: icewm
Requires: update-alternatives
%description lite
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.
%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.
%prep
%setup -q
%patch1
%patch2
%patch3
%patch4
%patch5
%patch6
%patch7 -p1
%patch8
%patch9
%patch10 -p1
%patch11 -p1
%patch12 -p1
%define lites icewm icewmhint icewmbg icesh icewm-session
%build
autoconf
export CFLAGS="$RPM_OPT_FLAGS"
export CXXFLAGS="$RPM_OPT_FLAGS"
./configure --without-debug \
--sysconfdir=/etc \
--with-cfgdir=/etc/icewm \
--prefix=/usr \
--with-docdir=%{_docdir} \
--enable-i18n \
--disable-nls \
--disable-guievents \
--disable-winmenu \
--enable-lite \
--disable-gnome-menus
make %{?jobs:-j%jobs} V=1
mkdir lite
for i in %lites; do mv src/$i lite/$i-lite; done
make clean
./configure --disable-silent-rules --without-debug \
--sysconfdir=/etc \
--with-cfgdir=/etc/icewm \
--prefix=/usr \
--with-docdir=%{_docdir} \
--enable-nls \
--enable-corefonts \
--enable-guievents \
--enable-antialiasing \
--enable-gradients \
--enable-shaped-decorations \
%if %{with gnome}
--with-icesound=oss,esd \
--with-imlib \
--enable-menus-gnome2 \
%endif
--enable-i18n
make %{?jobs:-j%jobs} V=1
# patch generated lib/preferences file
patch -p0 -i %{P:99}
%install
make DESTDIR=%{buildroot} install install-docs
mkdir -p %{buildroot}/etc/icewm
for cfgfile in keys menu preferences toolbar winoptions ; do
mv %{buildroot}/usr/share/icewm/$cfgfile \
%{buildroot}/etc/icewm
done
%{find_lang} icewm
ln -s icewm.html %{buildroot}/%{_docdir}/icewm/index.html
# install the xsession desktop file
mkdir -p %{buildroot}/usr/share/xsessions
cp -f %{SOURCE1} %{buildroot}/usr/share/xsessions
%suse_update_desktop_file %{buildroot}/usr/share/xsessions/icewm.desktop
# link duplicate theme icons to save some space
%{?fdupes:%fdupes %buildroot/usr/share/icewm/themes/}
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
for i in %lites; do
mv lite/$i-lite %{buildroot}/usr/bin
mv %{buildroot}/usr/bin/$i %{buildroot}/usr/bin/$i-default
# dummy
touch %{buildroot}%{_sysconfdir}/alternatives/$i
ln -s %{_sysconfdir}/alternatives/$i %{buildroot}%_bindir/$i
done
%post lite
/usr/sbin/update-alternatives \
--install %{_bindir}/icewm icewm %{_bindir}/icewm-lite 0 \
--slave %{_bindir}/icewmhint icewmhint %{_bindir}/icewmhint-lite \
--slave %{_bindir}/icewmbg icewmbg %{_bindir}/icewmbg-lite \
--slave %{_bindir}/icesh icesh %{_bindir}/icesh-lite \
--slave %{_bindir}/icewm-session icewm-session %{_bindir}/icewm-session-lite
%preun lite
if [ "$1" = 0 ] ; then
/usr/sbin/update-alternatives --remove icewm %{_bindir}/icewm-lite
fi
%post default
/usr/sbin/update-alternatives \
--install %{_bindir}/icewm icewm %{_bindir}/icewm-default 100 \
--slave %{_bindir}/icewmhint icewmhint %{_bindir}/icewmhint-default \
--slave %{_bindir}/icewmbg icewmbg %{_bindir}/icewmbg-default \
--slave %{_bindir}/icesh icesh %{_bindir}/icesh-default \
--slave %{_bindir}/icewm-session icewm-session %{_bindir}/icewm-session-default
%preun default
if [ "$1" = 0 ] ; then
/usr/sbin/update-alternatives --remove icewm %{_bindir}/icewm-default
fi
%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-default
/usr/bin/icewmhint-default
/usr/bin/icewmbg-default
/usr/bin/icehelp
/usr/bin/icesh-default
/usr/bin/icewmtray
/usr/bin/icewm-session-default
%ghost %_sysconfdir/alternatives/icewm
%ghost %_sysconfdir/alternatives/icewmhint
%ghost %_sysconfdir/alternatives/icewmbg
%ghost %_sysconfdir/alternatives/icesh
%ghost %_sysconfdir/alternatives/icewm-session
/usr/bin/icewm
/usr/bin/icewmhint
/usr/bin/icewmbg
/usr/bin/icesh
/usr/bin/icewm-session
%if %{with gnome}
%files gnome
%defattr(-,root,root)
/usr/bin/icewm-menu-gnome2
%endif
# make those two part of -default without gnome
/usr/bin/icesound
/usr/bin/icewm-set-gnomewm
%files lite
%defattr(-,root,root)
/usr/bin/icewm-lite
/usr/bin/icewmhint-lite
/usr/bin/icewmbg-lite
/usr/bin/icesh-lite
/usr/bin/icewm-session-lite
%ghost %_sysconfdir/alternatives/icewm
%ghost %_sysconfdir/alternatives/icewmhint
%ghost %_sysconfdir/alternatives/icewmbg
%ghost %_sysconfdir/alternatives/icesh
%ghost %_sysconfdir/alternatives/icewm-session
/usr/bin/icewm
/usr/bin/icewmhint
/usr/bin/icewmbg
/usr/bin/icesh
/usr/bin/icewm-session
%changelog