From 2b30a724439e37db65ac5c3af6d3af2b86dff1128e8edf03d3d6d1a647b18947 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= Date: Wed, 10 Jan 2018 13:06:55 +0000 Subject: [PATCH 1/2] Accepting request 561016 from home:avindra - Split files into appropriate sub-packages - Pass optflags to gcc via CPPFLAGS instead of CXXFLAGS - Patches for fixing build errors and warnings * add herbstluftwm-shebangs.patch * add herbstluftwm-shebangs-2.patch * add examples-remove-executable-bits.patch - Source download * update all urls to use https * track .sig file - General tidiness * cleanup with spec-cleaner * use %make_install macro * renumber sources OBS-URL: https://build.opensuse.org/request/show/561016 OBS-URL: https://build.opensuse.org/package/show/X11:windowmanagers/herbstluftwm?expand=0&rev=9 --- examples-remove-executable-bits.patch | 13 ++ herbstluftwm-0.7.0.tar.gz.sig | Bin 0 -> 96 bytes herbstluftwm-shebangs-2.patch | 43 +++++ herbstluftwm-shebangs.patch | 244 ++++++++++++++++++++++++++ herbstluftwm.changes | 17 ++ herbstluftwm.spec | 116 ++++++++---- 6 files changed, 399 insertions(+), 34 deletions(-) create mode 100644 examples-remove-executable-bits.patch create mode 100644 herbstluftwm-0.7.0.tar.gz.sig create mode 100644 herbstluftwm-shebangs-2.patch create mode 100644 herbstluftwm-shebangs.patch diff --git a/examples-remove-executable-bits.patch b/examples-remove-executable-bits.patch new file mode 100644 index 0000000..68a5b73 --- /dev/null +++ b/examples-remove-executable-bits.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile b/Makefile +index 7849896..ad9096d 100644 +--- a/Makefile ++++ b/Makefile +@@ -138,7 +138,7 @@ install-nodoc: all-nodoc + $(INSTALL) -m 644 share/herbstluftwm.desktop '$(DESTDIR)$(XSESSIONSDIR)/' + $(INSTALL) -m 755 share/dmenu_run_hlwm '$(DESTDIR)$(BINDIR)/' + $(INSTALL) -m 644 scripts/README '$(DESTDIR)$(EXAMPLESDIR)/' +- $(INSTALL) -m 755 scripts/*.sh '$(DESTDIR)$(EXAMPLESDIR)/' ++ $(INSTALL) -m 644 scripts/*.sh '$(DESTDIR)$(EXAMPLESDIR)/' + + + diff --git a/herbstluftwm-0.7.0.tar.gz.sig b/herbstluftwm-0.7.0.tar.gz.sig new file mode 100644 index 0000000000000000000000000000000000000000000000000000000000000000..1a5fb0e0591cf3d20810a64be453e69f1a6a8fa321a0a8a9f55531a83a681aec GIT binary patch literal 96 zcmV-m0H6PeUIYLU2ml5J0#>twv;YbT5G;O#uc9c}x&l#<|!Z5bwoFWQnYdc19#YN;IqnxeQ@*M?pa5 +Date: Mon, 12 Oct 2015 14:27:56 +0200 +Subject: [PATCH] Unhardcode /bin/bash + +--- + scripts/maximize.sh | 3 ++- + scripts/toggledualhead.sh | 2 +- + scripts/windowmenu.sh | 3 ++- + 3 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/scripts/maximize.sh b/scripts/maximize.sh +index 24c146c..02be5af 100755 +--- a/scripts/maximize.sh ++++ b/scripts/maximize.sh +@@ -1,4 +1,5 @@ +-#!/bin/bash -e ++#!/usr/bin/env bash ++set -e + # A simple script for window maximization and window switching. + # Running this the first time script will: + # +diff --git a/scripts/toggledualhead.sh b/scripts/toggledualhead.sh +index 55ea29c..fddb82d 100755 +--- a/scripts/toggledualhead.sh ++++ b/scripts/toggledualhead.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/usr/bin/env bash + + # Splits the currently focused monitor into two monitors displayed side by side + # Running this on a splitted monitor joins the two monitor halfs again. +diff --git a/scripts/windowmenu.sh b/scripts/windowmenu.sh +index 26808b8..f22c72e 100755 +--- a/scripts/windowmenu.sh ++++ b/scripts/windowmenu.sh +@@ -1,4 +1,5 @@ +-#!/bin/bash -e ++#!/usr/bin/env bash ++set -e + # + # dependencies: + # diff --git a/herbstluftwm-shebangs.patch b/herbstluftwm-shebangs.patch new file mode 100644 index 0000000..505d4e8 --- /dev/null +++ b/herbstluftwm-shebangs.patch @@ -0,0 +1,244 @@ +From b1fe1380419e1bc11ee017b59a9d58c238c66f91 Mon Sep 17 00:00:00 2001 +From: Brian Callahan +Date: Tue, 12 Aug 2014 07:42:54 -0400 +Subject: [PATCH] Unhardcode /bin/bash + +Eases packaging for systems that do not put bash in /bin, such as the BSDs +(who put bash in /usr/local/bin). +--- + release.sh | 2 +- + scripts/dmenu.sh | 2 +- + scripts/dumpbeautify.sh | 2 +- + scripts/exec_on_tag.sh | 2 +- + scripts/execwith.sh | 2 +- + scripts/floatmon.sh | 2 +- + scripts/herbstcommander.sh | 2 +- + scripts/keychain.sh | 2 +- + scripts/lasttag.sh | 2 +- + scripts/layout.sh | 2 +- + scripts/loadstate.sh | 2 +- + scripts/q3terminal.sh | 2 +- + scripts/savestate.sh | 2 +- + scripts/scratchpad.sh | 2 +- + scripts/wselect.sh | 2 +- + share/autostart | 2 +- + share/dmenu_run_hlwm | 2 +- + share/panel.sh | 2 +- + share/restartpanels.sh | 2 +- + www/faq.txt | 2 +- + www/gentoc.sh | 2 +- + 21 files changed, 21 insertions(+), 21 deletions(-) + +diff --git a/release.sh b/release.sh +index 6108bb1..6af1c65 100755 +--- a/release.sh ++++ b/release.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/usr/bin/env bash + + version="$1" + +diff --git a/scripts/dmenu.sh b/scripts/dmenu.sh +index 053b45d..b3b4ebf 100755 +--- a/scripts/dmenu.sh ++++ b/scripts/dmenu.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/usr/bin/env bash + + dm() { "${dmenu_command[@]:-dmenu}" "$@" ;} + hc() { "${herbstclient_command[@]:-herbstclient}" "$@" ;} +diff --git a/scripts/dumpbeautify.sh b/scripts/dumpbeautify.sh +index 423d167..0a1a790 100755 +--- a/scripts/dumpbeautify.sh ++++ b/scripts/dumpbeautify.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/usr/bin/env bash + + # aligns the output of dump command as a nice tree + # usage: +diff --git a/scripts/exec_on_tag.sh b/scripts/exec_on_tag.sh +index f2758ed..f2f64d9 100755 +--- a/scripts/exec_on_tag.sh ++++ b/scripts/exec_on_tag.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/usr/bin/env bash + + hc() { "${herbstclient_command[@]:-herbstclient}" "$@" ;} + +diff --git a/scripts/execwith.sh b/scripts/execwith.sh +index 775197d..34f188d 100755 +--- a/scripts/execwith.sh ++++ b/scripts/execwith.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/usr/bin/env bash + + # exec a script $2... with settings from rc-file $1 + # useful for various dmenu scripts, e.g.: +diff --git a/scripts/floatmon.sh b/scripts/floatmon.sh +index 48cad41..0d93be3 100755 +--- a/scripts/floatmon.sh ++++ b/scripts/floatmon.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/usr/bin/env bash + + monitor=floatmon + tag=fl +diff --git a/scripts/herbstcommander.sh b/scripts/herbstcommander.sh +index 4698bb2..efe5f20 100755 +--- a/scripts/herbstcommander.sh ++++ b/scripts/herbstcommander.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/usr/bin/env bash + + # herbstcommander.sh - launch herbstluftwm-commands via dmenu + # Written by Florian Bruhin +diff --git a/scripts/keychain.sh b/scripts/keychain.sh +index 1ac1c0f..764cdb4 100755 +--- a/scripts/keychain.sh ++++ b/scripts/keychain.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/usr/bin/env bash + + # Execute this (e.g. from your autostart) to obtain basic key chaining like it + # is known from other applications like screen. +diff --git a/scripts/lasttag.sh b/scripts/lasttag.sh +index a6f951d..dd89314 100755 +--- a/scripts/lasttag.sh ++++ b/scripts/lasttag.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/usr/bin/env bash + + # usage: start this script in anywhere your autostart (but *after* the + # emit_hook reload line) +diff --git a/scripts/layout.sh b/scripts/layout.sh +index fbac24f..5253c26 100755 +--- a/scripts/layout.sh ++++ b/scripts/layout.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/usr/bin/env bash + + # print layout of all tags, and colorizes all window ids + # it's useful to get a overview over the list of all windows +diff --git a/scripts/loadstate.sh b/scripts/loadstate.sh +index 5a781f8..5954276 100755 +--- a/scripts/loadstate.sh ++++ b/scripts/loadstate.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/usr/bin/env bash + + hc() { "${herbstclient_command[@]:-herbstclient}" "$@" ;} + +diff --git a/scripts/q3terminal.sh b/scripts/q3terminal.sh +index bae9e89..2ca9fd3 100755 +--- a/scripts/q3terminal.sh ++++ b/scripts/q3terminal.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/usr/bin/env bash + + # a q3-like (or yakuake-like) terminal for arbitrary applications. + # +diff --git a/scripts/savestate.sh b/scripts/savestate.sh +index 74e597b..00e102d 100755 +--- a/scripts/savestate.sh ++++ b/scripts/savestate.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/usr/bin/env bash + + hc() { "${herbstclient_command[@]:-herbstclient}" "$@" ;} + +diff --git a/scripts/scratchpad.sh b/scripts/scratchpad.sh +index 06ba00a..b3a9177 100755 +--- a/scripts/scratchpad.sh ++++ b/scripts/scratchpad.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/usr/bin/env bash + + # a i3-like scratchpad for arbitrary applications. + # +diff --git a/scripts/wselect.sh b/scripts/wselect.sh +index de45d4c..c967e05 100755 +--- a/scripts/wselect.sh ++++ b/scripts/wselect.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/usr/bin/env bash + + # a window selection utility + # dependencies: wmctrl, awk, +diff --git a/share/autostart b/share/autostart +index 252db1d..1808205 100755 +--- a/share/autostart ++++ b/share/autostart +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/usr/bin/env bash + + # this is a simple config for herbstluftwm + +diff --git a/share/dmenu_run_hlwm b/share/dmenu_run_hlwm +index ec20972..d8cb36c 100755 +--- a/share/dmenu_run_hlwm ++++ b/share/dmenu_run_hlwm +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/usr/bin/env bash + + if ! command -v dmenu > /dev/null 2>/dev/null ; then + echo "Error: Requirement dmenu not found in your PATH." >&2 +diff --git a/share/panel.sh b/share/panel.sh +index 1cab57e..e40ab9d 100755 +--- a/share/panel.sh ++++ b/share/panel.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/usr/bin/env bash + + hc() { "${herbstclient_command[@]:-herbstclient}" "$@" ;} + monitor=${1:-0} +diff --git a/share/restartpanels.sh b/share/restartpanels.sh +index 9d9110c..774208d 100755 +--- a/share/restartpanels.sh ++++ b/share/restartpanels.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/usr/bin/env bash + + installdir=/ + +diff --git a/www/faq.txt b/www/faq.txt +index f8ca223..131b4be 100644 +--- a/www/faq.txt ++++ b/www/faq.txt +@@ -154,7 +154,7 @@ Add a rule for the clients pid, before the client appears. This script + creates two xterms with different behaviours: + + ---- +-#!/bin/bash ++#!/usr/bin/env bash + + # Requirement: bash >= 4.0 (because of the usage of $BASHPID) + +diff --git a/www/gentoc.sh b/www/gentoc.sh +index 3f8bfe7..dc44e67 100755 +--- a/www/gentoc.sh ++++ b/www/gentoc.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/usr/bin/env bash + + # if you know a cleaner version then grepping everything out of html + # then you are very welcome to improve this script! diff --git a/herbstluftwm.changes b/herbstluftwm.changes index 98c0e0e..91643d4 100644 --- a/herbstluftwm.changes +++ b/herbstluftwm.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Mon Jan 1 00:41:19 UTC 2018 - avindra@opensuse.org + +- Split files into appropriate sub-packages +- Pass optflags to gcc via CPPFLAGS instead of CXXFLAGS +- Patches for fixing build errors and warnings + * add herbstluftwm-shebangs.patch + * add herbstluftwm-shebangs-2.patch + * add examples-remove-executable-bits.patch +- Source download + * update all urls to use https + * track .sig file +- General tidiness + * cleanup with spec-cleaner + * use %make_install macro + * renumber sources + ------------------------------------------------------------------- Tue Dec 5 21:35:10 UTC 2017 - crrodriguez@opensuse.org diff --git a/herbstluftwm.spec b/herbstluftwm.spec index 1972116..aa54772 100644 --- a/herbstluftwm.spec +++ b/herbstluftwm.spec @@ -1,7 +1,7 @@ # # spec file for package herbstluftwm # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -22,14 +22,22 @@ Release: 0 Summary: A manual tiling window manager License: BSD-2-Clause Group: System/GUI/Other -Url: http://herbstluftwm.org -Source0: http://herbstluftwm.org/tarballs/%{name}-%{version}.tar.gz -Source1: %{name}.desktop +Url: https://herbstluftwm.org +Source0: https://herbstluftwm.org/tarballs/%{name}-%{version}.tar.gz +Source1: https://herbstluftwm.org/tarballs/%{name}-%{version}.tar.gz.sig +Source2: %{name}.desktop +# PATCH-FIX-SUSE Applied in reverse to replace "env" in shebangs with /bin/bash +Patch0: https://github.com/%{name}/%{name}/commit/b1fe1380419e1bc11ee017b59a9d58c238c66f91.patch#/%{name}-shebangs.patch +# PATCH-FIX-SUSE Applied in reverse to replace "env" in shebangs with /bin/bash +Patch1: https://github.com/%{name}/%{name}/commit/edc8c1656ec67b73f92f25d9cf322cea0df5d0a6.patch#/%{name}-shebangs-2.patch +# PATCH-FIX-SUSE Remove executable bits from the documentation +Patch2: examples-remove-executable-bits.patch BuildRequires: asciidoc BuildRequires: gcc-c++ >= 4.9 BuildRequires: glib2-devel BuildRequires: libxslt-devel BuildRequires: ncurses-utils +BuildRequires: pkgconfig BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xext) BuildRequires: pkgconfig(xinerama) @@ -37,35 +45,81 @@ BuildRequires: pkgconfig(xinerama) %description herbstluftwm is a manual tiling window manager for X11 using Xlib and Glib. +%package bash-completion +Summary: Bash Completion for %{name} +Group: System/GUI/Other +Requires: %{name} = %{version} +Requires: bash-completion +Supplements: packageand(%{name}:bash) +BuildArch: noarch + +%description bash-completion +Bash completion for herbstclient + +%package zsh-completion +Summary: ZSH Completion for %{name} +Group: System/GUI/Other +Requires: %{name} = %{version} +Supplements: packageand(%{name}:zsh) +BuildArch: noarch + +%description zsh-completion +ZSH completion for herbstclient + +%package examples +Summary: Example scripts for %{name} +Group: System/GUI/Other +Requires: %{name} = %{version} +Requires: bash +BuildArch: noarch + +%description examples +Sample bash scripts for herbstluftwm and herbstclient, which give the user +an idea of what is possible. + %prep %setup -q +# fix errors about improper shebangs due to /usr/bin/env +%patch0 -R -p1 +%patch1 -R -p1 +%patch2 -p1 %build -export CXXFLAGS="%optflags" -export CFLAGS="%optflags" +export CPPFLAGS="%{optflags}" +export CFLAGS="%{optflags}" make VERBOSE= COLOR=0 %{?_smp_mflags} %install -make install \ +%make_install \ INSTALL="install -p" \ - DESTDIR=%{buildroot} \ - PREFIX="%{_prefix}" \ - DATADIR="%{_datadir}" - DOCDIR="%{_docdir}/%{name}" + PREFIX="%{_prefix}" -install -D -m0644 %{SOURCE1} %{buildroot}%{_datadir}/xsessions/%{name}.desktop +install -D -m0644 %{SOURCE2} %{buildroot}%{_datadir}/xsessions/%{name}.desktop + +# We use the normal doc convention for this instead. +# INSTALL is not shipped. +rm -f %{buildroot}%{_datadir}/doc/%{name}/{INSTALL,NEWS,LICENSE,BUGS} %files -%dir %{_datadir}/zsh/functions -%dir %{_datadir}/zsh/functions/Completion -%dir %{_datadir}/zsh/functions/Completion/X +%doc BUGS LICENSE NEWS %dir %{_datadir}/doc/%{name}/ -%dir %{_datadir}/doc/%{name}/examples +%{_datadir}/doc/%{name}/herbstclient.html +%{_datadir}/doc/%{name}/%{name}-tutorial.html +%{_datadir}/doc/%{name}/%{name}.html %dir %{_sysconfdir}/xdg/%{name} -%{_datadir}/doc/%{name}/BUGS -%{_datadir}/doc/%{name}/INSTALL -%{_datadir}/doc/%{name}/LICENSE -%{_datadir}/doc/%{name}/NEWS +%{_sysconfdir}/xdg/%{name}/autostart +%{_sysconfdir}/xdg/%{name}/panel.sh +%{_sysconfdir}/xdg/%{name}/restartpanels.sh +%{_bindir}/herbstclient +%{_bindir}/%{name} +%{_bindir}/dmenu_run_hlwm +%{_mandir}/man1/herbstclient.1%{ext_man} +%{_mandir}/man1/%{name}.1%{ext_man} +%{_mandir}/man7/%{name}-tutorial.7%{ext_man} +%{_datadir}/xsessions/%{name}.desktop + +%files examples +%dir %{_datadir}/doc/%{name}/examples %{_datadir}/doc/%{name}/examples/README %{_datadir}/doc/%{name}/examples/dmenu.sh %{_datadir}/doc/%{name}/examples/dumpbeautify.sh @@ -84,20 +138,14 @@ install -D -m0644 %{SOURCE1} %{buildroot}%{_datadir}/xsessions/%{name}.desktop %{_datadir}/doc/%{name}/examples/toggledualhead.sh %{_datadir}/doc/%{name}/examples/windowmenu.sh %{_datadir}/doc/%{name}/examples/wselect.sh -%{_datadir}/doc/%{name}/herbstclient.html -%{_datadir}/doc/%{name}/%{name}-tutorial.html -%{_datadir}/doc/%{name}/%{name}.html -%config %{_sysconfdir}/bash_completion.d/herbstclient-completion + +%files zsh-completion +%dir %{_datadir}/zsh/functions +%dir %{_datadir}/zsh/functions/Completion +%dir %{_datadir}/zsh/functions/Completion/X %{_datadir}/zsh/functions/Completion/X/_herbstclient -%{_sysconfdir}/xdg/%{name}/autostart -%{_sysconfdir}/xdg/%{name}/panel.sh -%{_sysconfdir}/xdg/%{name}/restartpanels.sh -%{_bindir}/herbstclient -%{_bindir}/%{name} -%{_bindir}/dmenu_run_hlwm -%{_mandir}/man1/herbstclient.1%{ext_man} -%{_mandir}/man1/%{name}.1%{ext_man} -%{_mandir}/man7/%{name}-tutorial.7%{ext_man} -%{_datadir}/xsessions/%{name}.desktop + +%files bash-completion +%config %{_sysconfdir}/bash_completion.d/herbstclient-completion %changelog From 006b679c1cc622c7b9ec266b9893c01f48cc95dfbfb3455da9c114241c3c9832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= Date: Wed, 10 Jan 2018 14:58:19 +0000 Subject: [PATCH 2/2] Accepting request 563332 from home:jengelh:branches:X11:windowmanagers - Update RPM groups and summaries. OBS-URL: https://build.opensuse.org/request/show/563332 OBS-URL: https://build.opensuse.org/package/show/X11:windowmanagers/herbstluftwm?expand=0&rev=10 --- herbstluftwm.changes | 5 +++++ herbstluftwm.spec | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/herbstluftwm.changes b/herbstluftwm.changes index 91643d4..18acfd3 100644 --- a/herbstluftwm.changes +++ b/herbstluftwm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jan 10 14:22:05 UTC 2018 - jengelh@inai.de + +- Update RPM groups and summaries. + ------------------------------------------------------------------- Mon Jan 1 00:41:19 UTC 2018 - avindra@opensuse.org diff --git a/herbstluftwm.spec b/herbstluftwm.spec index aa54772..353bec7 100644 --- a/herbstluftwm.spec +++ b/herbstluftwm.spec @@ -46,8 +46,8 @@ BuildRequires: pkgconfig(xinerama) herbstluftwm is a manual tiling window manager for X11 using Xlib and Glib. %package bash-completion -Summary: Bash Completion for %{name} -Group: System/GUI/Other +Summary: Bash completion for %{name} +Group: System/Shells Requires: %{name} = %{version} Requires: bash-completion Supplements: packageand(%{name}:bash) @@ -57,8 +57,8 @@ BuildArch: noarch Bash completion for herbstclient %package zsh-completion -Summary: ZSH Completion for %{name} -Group: System/GUI/Other +Summary: Zsh completion for %{name} +Group: System/Shells Requires: %{name} = %{version} Supplements: packageand(%{name}:zsh) BuildArch: noarch