commit 3d06777a39d0d5b3c14d19be4e8b6c1b36a3445a
Author: Jan Palus <[email protected]>
Date:   Tue Apr 7 02:13:05 2020 +0200

    new (version 3.4.2)
    
    - lib/xpp requires python3 but when looking for xcbgen starts with
      python2 which results in incosistent result and "bad magic number"
      error. fix by forcing python3 for xcbgen as well

 polybar-consistent_python.patch |  12 +++++
 polybar.spec                    | 102 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 114 insertions(+)
---
diff --git a/polybar.spec b/polybar.spec
new file mode 100644
index 0000000..82b8074
--- /dev/null
+++ b/polybar.spec
@@ -0,0 +1,102 @@
+Summary:       Fast and easy-to-use status bar
+Name:          polybar
+Version:       3.4.2
+Release:       1
+License:       MIT, BSD
+Group:         X11/Window Managers
+Source0:       
https://github.com/polybar/polybar/releases/download/%{version}/%{name}-%{version}.tar
+# Source0-md5: fe5c215f9e2f2dacae65246d18c97bd5
+Patch0:                %{name}-consistent_python.patch
+URL:           https://polybar.github.io/
+BuildRequires: alsa-lib-devel
+BuildRequires: cairo-devel
+BuildRequires: cmake >= 3.1
+BuildRequires: curl-devel
+BuildRequires: i3-devel
+BuildRequires: jsoncpp-devel >= 1.7.7
+BuildRequires: libmpdclient-devel
+BuildRequires: libnl-devel
+BuildRequires: libstdc++-devel >= 6:5.1
+BuildRequires: libxcb-devel >= 1.12
+BuildRequires: pkgconfig
+BuildRequires: pulseaudio-devel
+BuildRequires: python3 >= 3.5
+BuildRequires: python3-Sphinx
+BuildRequires: python3-xcbgen
+BuildRequires: rpmbuild(macros) >= 1.719
+BuildRequires: sphinx-pdg
+BuildRequires: xcb-proto
+BuildRequires: xcb-util-cursor-devel
+BuildRequires: xcb-util-devel
+BuildRequires: xcb-util-image-devel
+BuildRequires: xcb-util-wm-devel
+BuildRequires: xcb-util-xrm-devel
+Requires:      jsoncpp >= 1.7.7
+Requires:      libxcb >= 1.12
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Polybar aims to help users build beautiful and highly customizable
+status bars for their desktop environment, without the need of having
+a black belt in shell scripting.
+
+%package -n bash-completion-polybar
+Summary:       bash-completion for polybar
+Group:         Applications/Shells
+Requires:      %{name} = %{version}-%{release}
+Requires:      bash-completion >= 2.0
+%if "%{_rpmversion}" >= "5"
+BuildArch:     noarch
+%endif
+
+%description -n bash-completion-polybar
+bash-completion for polybar.
+
+%package -n zsh-completion-polybar
+Summary:       zsh-completion for polybar
+Summary(pl.UTF-8):     Uzupełnianie nazw w zsh dla polybar
+Group:         Applications/Shells
+Requires:      %{name} = %{version}-%{release}
+Requires:      zsh
+%if "%{_rpmversion}" >= "5"
+BuildArch:     noarch
+%endif
+
+%description -n zsh-completion-polybar
+zsh-completion for polybar.
+
+%prep
+%setup -q -n %{name}
+%patch0 -p1
+
+%build
+install -d build
+cd build
+%cmake ..
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -C build install \
+        DESTDIR=$RPM_BUILD_ROOT
+
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc README.md SUPPORT.md
+%attr(755,root,root) %{_bindir}/polybar
+%attr(755,root,root) %{_bindir}/polybar-msg
+%{_mandir}/man1/polybar.1*
+
+%files -n bash-completion-polybar
+%defattr(644,root,root,755)
+%{bash_compdir}/polybar
+
+%files -n zsh-completion-polybar
+%defattr(644,root,root,755)
+%{zsh_compdir}/_polybar
+%{zsh_compdir}/_polybar_msg
diff --git a/polybar-consistent_python.patch b/polybar-consistent_python.patch
new file mode 100644
index 0000000..23c4159
--- /dev/null
+++ b/polybar-consistent_python.patch
@@ -0,0 +1,12 @@
+diff -urN polybar.orig/lib/xpp/CMakeLists.txt polybar/lib/xpp/CMakeLists.txt
+--- polybar.orig/lib/xpp/CMakeLists.txt        2019-12-27 15:16:12.000000000 
+0100
++++ polybar/lib/xpp/CMakeLists.txt     2020-04-07 01:47:29.960140194 +0200
+@@ -48,7 +48,7 @@
+ #
+ # Loop through a hardcoded list of python executables to locate the python 
module "xcbgen"
+ #
+-foreach(CURRENT_EXECUTABLE python python3 python2 python2.7)
++foreach(CURRENT_EXECUTABLE python3)
+   message(STATUS "Searching for xcbgen with " ${CURRENT_EXECUTABLE})
+ 
+   execute_process(COMMAND "${CURRENT_EXECUTABLE}" "-c"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/polybar.git/commitdiff/3d06777a39d0d5b3c14d19be4e8b6c1b36a3445a

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to