File jwm.spec of Package jwm

#
# spec file for package jwm
#
# Copyright (c) 2022 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/
#


Name:           jwm
Version:        @SERVICE@
Release:        0
Summary:        A light-weight window manager for the X11 Window System
License:        MIT
Group:          System/GUI/Other
URL:            https://github.com/joewing/jwm
Source0:        %{name}-%{version}.tar.xz
Source1:        contrib.tar.xz
# https://github.com/Enlik/misc
Source2:        %{name}xdgmenu.pl
Patch1:         example-jwmrc-2.4.2.patch
Patch2:         contrib-Makefile-in.patch
BuildRequires:  automake
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(cairo)
BuildRequires:  pkgconfig(freetype2)
BuildRequires:  pkgconfig(fribidi)
BuildRequires:  pkgconfig(libjpeg)
BuildRequires:  pkgconfig(libpng)
BuildRequires:  pkgconfig(librsvg-2.0)
BuildRequires:  pkgconfig(pangoxft)
BuildRequires:  pkgconfig(xft)
BuildRequires:  pkgconfig(xinerama)
BuildRequires:  pkgconfig(xmu)
BuildRequires:  pkgconfig(xpm)
BuildRequires:  pkgconfig(xrender)
Recommends:     %{name}-lang

%description
JWM is a light-weight window manager for the X11 Window System. JWM is written
in C and uses only Xlib at a minimum. Because of its small footprint, JWM
makes a good window manager for older computers and less powerful systems,
such as the Raspberry Pi, though it is perfectly capable of running on modern
systems.

%lang_package

%package doc
Summary:        Documentation for %{name}
Group:          Documentation/Other
BuildRequires:  doxygen
BuildRequires:  fdupes
Requires:       %{name} = %{version}-%{release}
BuildArch:      noarch

%description doc
Doxygen generated documentations for %{name}.

%prep
%autosetup -p1 -a1
sed -i '/locale/s/pl/en/' %{SOURCE2}

%build
NOCONFIGURE=1 ./autogen.sh
%configure
%make_build
doxygen -g Doxyfile
doxygen Doxyfile

%install
%make_install
install -dm 0755 %{buildroot}%{_datadir}/xsessions
cat > %{buildroot}%{_datadir}/xsessions/%{name}.desktop <<-EOF
[Desktop Entry]
Name=jwm
Comment=Log in using jwm
Exec=%{_bindir}/%{name}
TryExec=%{_bindir}/%{name}
Type=XSession
EOF
install -Dm 0755 %{SOURCE2} %{buildroot}%{_bindir}/%{name}xdgmenu
install -dm 0755 %{buildroot}%{_docdir}/%{name}-doxygen/
cp -a html %{buildroot}%{_docdir}/%{name}-doxygen/
%fdupes -s %{buildroot}%{_docdir}/%{name}-doxygen/

%find_lang %{name}

%files
%doc CONTRIBUTING.md README.*
%license LICENSE
%config %{_sysconfdir}/system.%{name}rc
%{_bindir}/%{name}
%{_bindir}/%{name}xdgmenu
%{_datadir}/%{name}
%{_datadir}/xsessions/%{name}.desktop
%{_mandir}/man?/%{name}.?%{?ext_man}

%files lang -f %{name}.lang

%files doc
%{_docdir}/%{name}-doxygen/

%changelog
openSUSE Build Service is sponsored by