%define __cmake_in_source_build 1 %global commit c9be0cd1dbc95ff828340af8ebd0f50a6838d5de %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: herbstluftwm Version: 0.9.5 Release: 7.git20240803%{shortcommit}%{?dist} Summary: A manual tiling window manager License: BSD URL: https://herbstluftwm.org Source0: https://github.com/%{name}/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz BuildRequires: asciidoc BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: make BuildRequires: pkgconfig(freetype2) BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xft) BuildRequires: pkgconfig(xinerama) BuildRequires: pkgconfig(xrandr) BuildRequires: pkgconfig(xfixes) %description herbstluftwm is a manual tiling window manager for the X window system. %package bash-completion Summary: Bash completion for %{name} Group: System/Shells Requires: %{name} = %{version}-%{release} Requires: bash-completion Supplements: (%{name} and bash) BuildArch: noarch %description bash-completion Bash completion for herbstclient %package fish-completion Summary: Fish completion for %{name} Group: System/Shells Requires: %{name} = %{version}-%{release} Supplements: (%{name} and fish) BuildArch: noarch %description fish-completion Fish completion for herbstclient %package zsh-completion Summary: Zsh completion for %{name} Group: System/Shells Requires: %{name} = %{version}-%{release} Supplements: (%{name} and zsh) BuildArch: noarch %description zsh-completion ZSH completion for herbstclient %prep %autosetup -p1 -n %{name}-%{commit} %build # Set the proper build flags %cmake %cmake_build %install %cmake_install # Fix errors about improper shebangs due to /usr/bin/env for f in "%{buildroot}%{_pkgdocdir}/examples/*.sh" do sed -i -e "s|#!/usr/bin/env bash|#!/usr/bin/bash|" $f done for f in "%{buildroot}%{_sysconfdir}/xdg/%{name}/*" do sed -i -e "s|#!/usr/bin/env bash|#!/usr/bin/bash|" $f done # Remove unnecessary and/or redundant files rm %{buildroot}%{_pkgdocdir}/LICENSE %files %license LICENSE %doc AUTHORS MIGRATION NEWS %doc doc/*.{html,txt} %{_sysconfdir}/xdg/%{name} %{_bindir}/* %{_datadir}/xsessions/%{name}.desktop %{_mandir}/man1/* %{_mandir}/man7/* %{_pkgdocdir}/examples/ %{_pkgdocdir}/html/ %{_pkgdocdir}/hlwm-doc.json %files bash-completion %{_datadir}/bash-completion/completions/herbstclient %files fish-completion %{_datadir}/fish/vendor_completions.d/herbstclient.fish %files zsh-completion %{_datadir}/zsh/site-functions/_herbstclient %changelog