File fvwm3.spec of Package fvwm3
#
# spec file for package fvwm3
#
# Copyright (c) 2024 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%global _hardened_build 1
%global sysrepo 0
%undefine _missing_build_ids_terminate_build
%define _unpackaged_files_terminate_build 0
%global debug_package %{nil}
Name: fvwm3
Version: 1.1.3
Release: 1
Summary: The F Virtual Window Manager Version 3
License: GPL-2.0-or-later
Group: System/GUI/Other
URL: http://www.fvwm.org
Source0: https://github.com/fvwmorg/%{name}/releases/download/%{version}/fvwm3-%{version}.tar.gz
Source1: system.fvwm2rc
Source2: fvwm_icons.tar.bz2
Source3: openSUSE.xpm
Patch0: fvwm3-siebenmann.patch
Patch1: fvwm3-iconbox.patch
BuildRequires: meson >= 1.5.1
BuildRequires: ninja
BuildRequires: golang
BuildRequires: pkgconfig(fribidi)
BuildRequires: pkgconfig(fontconfig)
BuildRequires: freetype2-devel
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(xft)
BuildRequires: libxkbcommon-devel
BuildRequires: pkgconfig(xrandr)
BuildRequires: pkgconfig(xrender)
BuildRequires: libXt-devel
BuildRequires: xtrans
BuildRequires: libpng-devel
BuildRequires: pkgconfig(ncurses)
BuildRequires: readline-devel
BuildRequires: pkgconfig(librsvg-2.0)
BuildRequires: pkgconfig(sm)
BuildRequires: pkgconfig(xcursor)
BuildRequires: libXfixes-devel
BuildRequires: pkgconfig(xinerama)
BuildRequires: libXi-devel
BuildRequires: pkgconfig(xpm)
BuildRequires: sharutils
BuildRequires: python311-base
BuildRequires: pkgconfig(libevent)
# not actually used but includes its headers anyway..
BuildRequires: pkgconfig(xt)
BuildRequires: rubygem(asciidoctor)
Requires: desktop-data
Requires: mktemp
Requires: wallpaper-branding >= 84
Requires: xdg-menu
Requires: xli
Requires: filesystem
Requires(post): update-alternatives
Requires(postun):update-alternatives
Provides: %{name} = %{version}
Provides: fvwmicns
Provides: windowmanager
Conflicts: fvwm
Conflicts: fvwm2
Conflicts: xpmroot
%description
FVWM is a virtual desktop window manager for the X Window System.
FVWM is intended to have a small memory footprint but a rich feature
set, to be extremely customizable and extendible, and to be very
compatible with the Motif Window Manager (mwm).
%prep
%setup -q -n %{name}-%{version}
%patch -P0 -p0
%patch -P1 -p0
mkdir icons
tar -C icons -j -x -v -f %{SOURCE2}
cp %{SOURCE3} icons
%build
%meson -Dmandoc=true --sysconfdir=%{_sysconfdir}/X11/%{name} \
--libexecdir=%{_prefix}/lib/X11/%{name}
%meson_build
%install
export PATH=${PWD}/bin:${PATH}
%meson_install
# missed main manual page
# default config
install -d -m 755 %{buildroot}%{_sysconfdir}/X11/fvwm3
install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/X11/fvwm3/system.fvwm2rc
# documentation for modules
rm -vf sample.fvwmrc/Makefile* sample.fvwmrc/system.fvwm2rc-sample-95
rm -vf docs/Makefile*
install -d -m 755 docu-module
for i in $(find -name "README*" -not -name "*,v" -and -not -name "*.orig")
do
TMPDIR=$(dirname ${i#./})
if [ "x$TMPDIR" = "x." ]; then
install -m 644 $i docu-module/${i#./}
else
install -m 644 $i docu-module/README.$(basename "$TMPDIR")
fi
done
# forbidden links
pushd %{buildroot}/
find . -type l -printf '%%P %%l\n' | while read dst src
do
case "$src" in
%{buildroot}/*)
src=${src#%{buildroot}/}
rm -vf $dst
ln -frsv $src $dst
;;
*)
;;
esac
done
popd
# icons
install -d -m 755 %{buildroot}%{_datadir}/X11/%{name}/pixmaps
install -m 644 icons/* %{buildroot}%{_datadir}/X11/%{name}/pixmaps
# install kdm/gdm entry
install -m 0755 -d %{buildroot}%{_datadir}/xsessions/
%find_lang fvwm3 %{name}.lang
%postun
[ -f %{_datadir}/xsessions/lxqt.desktop ] || %{_sbindir}/update-alternatives \
--remove default-xsession.desktop %{_datadir}/xsessions/fvwm3.desktop
%files -f %{name}.lang
%license COPYING
%doc NEWS CHANGELOG.md README.md docu-module/*
%dir %{_sysconfdir}/X11/fvwm3
%config %{_sysconfdir}/X11/fvwm3/system.fvwm2rc
%{_bindir}/*
%{_prefix}/lib/X11/fvwm3/*
%{_datadir}/X11/fvwm3/pixmaps/*
%dir %{_prefix}/lib/X11/fvwm3
%{_datadir}/fvwm3
%dir %{_datadir}/X11/fvwm3
%dir %{_datadir}/X11/fvwm3/pixmaps
%{_mandir}/man1/*
%{_datadir}/xsessions/*desktop
%changelog