+# TODO:
+# - make a PLD-theme - default:]
#
# Conditional build:
-%bcond_without gradients # disable gradients (requires antialiasing which requires freetype)
-%bcond_without freetype # disable xfreetype support (implies !with_antialiasing)
-%bcond_without guievents # disable guievents
-#
-# TODO:
-# - make a PLD-theme - default :]
-# - -home_etc.patch needs update
+%bcond_without freetype # xfreetype support (implies no antialiasing)
+%bcond_without alsa # ALSA sound for GUI events
+%bcond_without ao # AO sound for GUI events
Summary: IceWM X11 Window Manager
Summary(de.UTF-8): IceWM ist ein Window Manager für X
Summary(ru.UTF-8): Оконный менеджер для X11
Summary(uk.UTF-8): Віконний менеджер для X11
Name: icewm
-Version: 1.3.6
-#%define _pre pre1
-%define _iceicons_ver 0.6
-%define _netscapeicons_ver 0.2
+Version: 3.3.3
Release: 1
Epoch: 2
-License: LGPL
+License: LGPL v2
Group: X11/Window Managers
-#Source0: http://dl.sourceforge.net/icewm/%{name}-%{version}%{_pre}.tar.gz
-Source0: http://dl.sourceforge.net/icewm/%{name}-%{version}.tar.gz
-# Source0-md5: 65a7ddb0fb3f60abea4af52184382570
-Source1: IceWM.desktop
-Source3: http://dl.sourceforge.net/icewm/iceicons-%{_iceicons_ver}.tar.gz
-# Source3-md5: 53ed111a3c4d1e609bd1604ddccd4701
-Source4: IceWM.RunWM
-Source6: http://dl.sourceforge.net/icewm/netscapeicons-%{_netscapeicons_ver}.tar.gz
-# Source6-md5: 409aa9b02adc11309ed546c5120c01d2
-Source7: %{name}-xsession.desktop
-Patch0: %{name}-broken-xrandr.patch
-#Patch1: %{name}-home_etc.patch
-Patch2: %{name}-helpbrowser.patch
-# exctracted from http://ftp.de.debian.org/debian/pool/main/i/icewm/icewm_1.2.32-2.diff.gz
-Patch3: %{name}-tray_hotfixes.patch
-URL: http://www.icewm.org/
-BuildRequires: autoconf >= 2.50
-BuildRequires: automake
-%{?with_guievents:BuildRequires: esound-devel}
-BuildRequires: gdk-pixbuf-devel
-BuildRequires: gettext-devel
-BuildRequires: gtk+2-devel
-BuildRequires: kde4-kde3support
+#Source0Download: https://github.com/ice-wm/icewm/releases
+Source0: https://github.com/ice-wm/icewm/archive/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 67e72291912f280362402ff46654481d
+Source1: %{name}-startup.sh
+Patch0: desktop-files.patch
+URL: https://ice-wm.org/
+%{?with_alsa:BuildRequires: alsa-lib-devel}
+BuildRequires: cmake
+BuildRequires: discount
+BuildRequires: fontconfig-devel
+BuildRequires: freetype-devel
+BuildRequires: fribidi-devel >= 0.10.4
+BuildRequires: gettext >= 0.19.6
+BuildRequires: gettext-tools >= 0.19.6
+BuildRequires: git-core
+BuildRequires: glib2-devel >= 2.0
+BuildRequires: imlib2-devel
+%{?with_ao:BuildRequires: libao-devel}
+BuildRequires: librsvg-devel
+%{?with_alsa:BuildRequires: libsndfile-devel}
BuildRequires: libstdc++-devel
+BuildRequires: libtool >= 2:2.4.2
BuildRequires: pkgconfig
+BuildRequires: ruby-asciidoctor
+BuildRequires: sed >= 4.0
BuildRequires: xorg-lib-libICE-devel
BuildRequires: xorg-lib-libSM-devel
BuildRequires: xorg-lib-libX11-devel
+BuildRequires: xorg-lib-libXcomposite-devel
+BuildRequires: xorg-lib-libXdamage-devel
+BuildRequires: xorg-lib-libXext-devel
+BuildRequires: xorg-lib-libXfixes-devel
%{?with_freetype:BuildRequires: xorg-lib-libXft-devel >= 2.1}
BuildRequires: xorg-lib-libXinerama-devel
-%{?with_guievents:BuildRequires: yiff-devel}
-Requires(pre): fileutils
-Requires(pre): sh-utils
+BuildRequires: xorg-lib-libXpm-devel
+BuildRequires: xorg-lib-libXrandr-devel
+BuildRequires: xorg-lib-libXrender-devel
+Requires(pre): /bin/rm
+Requires(pre): /usr/bin/test
+Requires: shared-mime-info
Requires: xinitrc-ng
-Suggests: vfmg >= 0.9.95
+Requires: xorg-app-xrandr
Conflicts: filesystem < 3.0-20
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%define _wmstyledir /etc/sysconfig/wmstyle
-%define _wmpropsdir /usr/share/gnome/wm-properties
%define specflags_ia32 -fomit-frame-pointer
%description
Summary: Pack of themes for IceWM
Summary(pl.UTF-8): Zestaw motywów dla IceWM-a
Group: Themes
-Requires: icewm
+Requires: %{name} = %{epoch}:%{version}
+BuildArch: noarch
%description themes-base
-Standard pack of themes delivered with IceWM. All of them made by
-Marko Macek: gtk2, metal2, motif, nice, nice2, warp3, warp4, win95.
+Standard pack of themes delivered with IceWM:
+- CrystalBlue by BlueScorpio
+- Helix by RudeSka and TigerT
+- NanoBlue by lion1810
+- metal2, motif, win32 by Marko Macek
+
+This package contains also old themes, no longer installed by default
+in IceWM 1.4:
+- gtk2, nice, nice2, warp3, warp4 by Marko Macek
+- yellowmotif by Andreas Leitgeb
%description themes-base -l pl.UTF-8
-Standardowy zestaw motywów dla IceWM-a, dostarczany wraz z nim.
-Wszystkie stworzone przez Marko Macka: gtk2, metal2, motif, nice,
-nice2, warp3, warp4, win95.
+Standardowy zestaw motywów dla IceWM-a, dostarczany wraz z nim:
+- CrystalBlue autorstwa BlueScorpio
+- Helix autorstwa RudeSka i TigerT
+- NanoBlue autorstwa lion1810
+- metal2, motif, win32 autorstwa Marko Macka
+
+Pakiet zawiera także stare motywy, nie instalowane domyślnie wraz z
+IceWM-em 1.4:
+- gtk2, nice, nice2, warp3, warp4 autorstwa Marko Macka
+- yellowmotif autorstwa Andreasa Leitgeba
%prep
-#setup -q -n %{name}-%{version}%{_pre}
%setup -q
%patch0 -p1
-#patch1 -p1
-#patch2 -p1
-#patch3 -p1
-
-cd lib/icons
-tar -xzf %{SOURCE3}
-tar -xzf %{SOURCE6}
%build
-cp -f /usr/share/automake/config.sub .
-%{__aclocal}
-%{__autoconf}
-%{__autoheader}
-%configure \
- %{!?with_gradients:--disable-gradients} \
- %{!?with_freetype:--disable-xfreetype --enable-corefonts} \
- %{?with_guievents:--enable-guievents} \
- --enable-shaped-decorations \
- --with-cfgdir=%{_sysconfdir}/X11/%{name} \
- --with-docdir=%{_docdir}
+%cmake -B build \
+ -DCONFIG_LIBRSVG=ON \
+ -DCFGDIR=%{_sysconfdir}/X11/%{name} \
+ -DDOCDIR=%{_docdir}/%{name}-%{version} \
+ %{?with_alsa:-DENABLE_ALSA=ON} \
+ %{?with_ao:-DENABLE_AO=ON} \
+ %{!?with_freetype:-DCONFIG_XFREETYPE=OFF -DCONFIG_COREFONTS=ON}
+
+cd build
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_datadir}/xsessions,%{_pixmapsdir},%{_wmstyledir}} \
- $RPM_BUILD_ROOT{%{_wmpropsdir},%{_sysconfdir}/X11/%{name}}
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/X11/%{name}
+cd build
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
+cd ..
+
+cd build/man
+%{__ln} -s icewm.1.html icewm.html
+cd -
-install %{SOURCE1} $RPM_BUILD_ROOT%{_wmpropsdir}
-install %{SOURCE4} $RPM_BUILD_ROOT%{_wmstyledir}/%{name}-session.sh
-install %{SOURCE7} $RPM_BUILD_ROOT%{_datadir}/xsessions/%{name}.desktop
-install lib/keys $RPM_BUILD_ROOT%{_sysconfdir}/X11/%{name}/keys
-sed 's|^# IconPath=""|IconPath="%{_datadir}/pixmaps:%{_datadir}/icons"|' < lib/preferences > $RPM_BUILD_ROOT%{_sysconfdir}/X11/%{name}/preferences
-install lib/toolbar $RPM_BUILD_ROOT%{_sysconfdir}/X11/%{name}/toolbar
-install lib/winoptions $RPM_BUILD_ROOT%{_sysconfdir}/X11/%{name}/winoptions
-echo %{_bindir}/icewmbg > $RPM_BUILD_ROOT%{_sysconfdir}/X11/%{name}/startup
+%{__sed} -e 's|^# IconPath=.*|IconPath="%{_pixmapsdir}:%{_iconsdir}:"|' -i $RPM_BUILD_ROOT%{_datadir}/icewm/preferences
+
+# packaged as %doc
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
+
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/icewm/startup
+cp -p $RPM_BUILD_ROOT%{_datadir}/icewm/keys $RPM_BUILD_ROOT%{_sysconfdir}/X11/%{name}/keys
+cp -p $RPM_BUILD_ROOT%{_datadir}/icewm/menu $RPM_BUILD_ROOT%{_sysconfdir}/X11/%{name}/menu
+cp -p $RPM_BUILD_ROOT%{_datadir}/icewm/preferences $RPM_BUILD_ROOT%{_sysconfdir}/X11/%{name}/preferences
+cp -p $RPM_BUILD_ROOT%{_datadir}/icewm/programs $RPM_BUILD_ROOT%{_sysconfdir}/X11/%{name}/programs
+cp -p $RPM_BUILD_ROOT%{_datadir}/icewm/startup $RPM_BUILD_ROOT%{_sysconfdir}/X11/%{name}/startup
+cp -p $RPM_BUILD_ROOT%{_datadir}/icewm/toolbar $RPM_BUILD_ROOT%{_sysconfdir}/X11/%{name}/toolbar
+cp -p $RPM_BUILD_ROOT%{_datadir}/icewm/winoptions $RPM_BUILD_ROOT%{_sysconfdir}/X11/%{name}/winoptions
:> $RPM_BUILD_ROOT%{_sysconfdir}/X11/%{name}/restart
-ln -s %{_datadir}/icewm/icons $RPM_BUILD_ROOT%{_pixmapsdir}/icewm
+# old themes, no longer installed
+cp -pr lib/themes/{gtk2,nice,nice2,warp3,warp4,yellowmotif} $RPM_BUILD_ROOT%{_datadir}/icewm/themes
-echo "menuprog \"Programs\" %{_datadir}/icewm/icons/folder_16x16.xpm vfmg -i -f -x -c -s icewm" > $RPM_BUILD_ROOT%{_sysconfdir}/X11/%{name}/menu
+# duplicate locale
+%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/no
+# unsupported locale
+%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ie
%find_lang %{name}
%clean
rm -rf $RPM_BUILD_ROOT
-%pre
-test -h %{_pixmapsdir}/icewm || rm -rf %{_pixmapsdir}/icewm
-
%files -f %{name}.lang
%defattr(644,root,root,755)
-%doc AUTHORS BUGS CHANGES PLATFORMS README* TODO icewm.lsm doc/*.html
-%attr(755,root,root) %{_bindir}/*
+%doc AUTHORS BUGS CHANGES ChangeLog NEWS PLATFORMS README.md THANKS TODO build/man/*.html
+%attr(755,root,root) %{_bindir}/icehelp
+%attr(755,root,root) %{_bindir}/icesh
+%attr(755,root,root) %{_bindir}/icesound
+%attr(755,root,root) %{_bindir}/icewm
+%attr(755,root,root) %{_bindir}/icewm-menu-fdo
+%attr(755,root,root) %{_bindir}/icewm-session
+%attr(755,root,root) %{_bindir}/icewm-set-gnomewm
+%attr(755,root,root) %{_bindir}/icewmbg
+%attr(755,root,root) %{_bindir}/icewmhint
+%attr(755,root,root) %{_bindir}/icewm-menu-xrandr
+%{_mandir}/man1/icehelp.1*
+%{_mandir}/man1/icesh.1*
+%{_mandir}/man1/icesound.1*
+%{_mandir}/man1/icewm-menu-fdo.1*
+%{_mandir}/man1/icewm-menu-xrandr.1*
+%{_mandir}/man1/icewm-session.1*
+%{_mandir}/man1/icewm-set-gnomewm.1*
+%{_mandir}/man1/icewmbg.1*
+%{_mandir}/man1/icewmhint.1*
+%{_mandir}/man5/icewm-env.5*
+%{_mandir}/man5/icewm-focus_mode.5*
+%{_mandir}/man5/icewm-keys.5*
+%{_mandir}/man5/icewm-menu.5*
+%{_mandir}/man5/icewm-preferences.5*
+%{_mandir}/man5/icewm-prefoverride.5*
+%{_mandir}/man5/icewm-programs.5*
+%{_mandir}/man5/icewm-shutdown.5*
+%{_mandir}/man5/icewm-startup.5*
+%{_mandir}/man5/icewm-theme.5*
+%{_mandir}/man5/icewm-toolbar.5*
+%{_mandir}/man5/icewm-winoptions.5*
%dir %{_sysconfdir}/X11/%{name}
-%config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/X11/%{name}/[!rs]*
-%config(noreplace,missingok) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/X11/%{name}/[rs]*
-%{_pixmapsdir}/icewm
+%config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/X11/%{name}/keys
+%config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/X11/%{name}/menu
+%config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/X11/%{name}/preferences
+%config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/X11/%{name}/programs
+%config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/X11/%{name}/toolbar
+%config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/X11/%{name}/winoptions
+%config(noreplace,missingok) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/X11/%{name}/restart
+%config(noreplace,missingok) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/X11/%{name}/startup
%dir %{_datadir}/icewm
+%{_datadir}/icewm/IceWM.jpg
%{_datadir}/icewm/icons
+%{_datadir}/icewm/keys
+%{_datadir}/icewm/menu
%{_datadir}/icewm/ledclock
%{_datadir}/icewm/mailbox
+%{_datadir}/icewm/preferences
+%{_datadir}/icewm/programs
+%attr(755,root,root) %{_datadir}/icewm/startup
+%{_datadir}/icewm/toolbar
%{_datadir}/icewm/taskbar
+%{_datadir}/icewm/winoptions
%dir %{_datadir}/icewm/themes
%{_datadir}/icewm/themes/Infadel2
+%{_datadir}/icewm/themes/default
%{_datadir}/icewm/themes/icedesert
-%{_datadir}/xsessions/%{name}.desktop
-%{_wmpropsdir}/*
-%attr(755,root,root) %{_wmstyledir}/%{name}-session.sh
+%{_datadir}/xsessions/icewm.desktop
+%{_datadir}/xsessions/icewm-session.desktop
+%{_mandir}/man1/icewm.1*
%files themes-base
%defattr(644,root,root,755)
-%{_datadir}/icewm/themes/gtk2
+%{_datadir}/icewm/themes/CrystalBlue
+%{_datadir}/icewm/themes/Helix
+%{_datadir}/icewm/themes/NanoBlue
%{_datadir}/icewm/themes/metal2
%{_datadir}/icewm/themes/motif
+%{_datadir}/icewm/themes/win95
+# old themes, no longer installed in 1.4.x
+%{_datadir}/icewm/themes/gtk2
%{_datadir}/icewm/themes/nice
%{_datadir}/icewm/themes/nice2
%{_datadir}/icewm/themes/warp3
%{_datadir}/icewm/themes/warp4
-%{_datadir}/icewm/themes/win95
%{_datadir}/icewm/themes/yellowmotif