File bemenu.spec of Package bemenu

# spec file for package bemenu
# Copyright (c) 2020 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

%define bcond_with curses
Name:           bemenu
Version:        0.4.1
Release:        0
Summary:        Dynamic menu library and client program inspired by dmenu
License:        MIT
Group:          System/GUI/Other
BuildRequires:  Mesa-devel
BuildRequires:  gcc-c++
BuildRequires:  make
BuildRequires:  pango-devel
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(cairo)
BuildRequires:  pkgconfig(ncurses)
BuildRequires:  pkgconfig(wayland-client)
BuildRequires:  pkgconfig(wayland-protocols)
BuildRequires:  pkgconfig(wayland-server)
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xinerama)
BuildRequires:  pkgconfig(xkbcommon) >= 0.3.2
%if %{with curses}
BuildRequires:  pkgconfig(ncurses)

Dynamic menu library and client program inspired by dmenu with support
for X, Wayland and ncurses.

%package -n libbemenu0
Summary:        Dynamic menu library inspired by dmenu
# you need renderers
Group:          Development/Libraries/C and C++
Requires:       %{name}

%description -n libbemenu0
Library for Bemenu, dynamic menu inspired by dmenu.

%package devel
Summary:        Development files for bemenu
Group:          Development/Libraries/C and C++
Requires:       cmake
Requires:       gcc-c++
Requires:       libbemenu0 = %{version}
Requires:       pkgconfig

%description devel
Files required for development for Bemenu.

%setup -q

%if %{with curses}
# fix colliding name with our ncurses library specifics
sed -i 's@stdscr@std_scr@g' lib/renderers/curses/curses.c

pkg-config --cflags wayland-client
%make_build PREFIX=%{_prefix} libdir=/lib64 clients x11 wayland curses

%make_install PREFIX=%{_prefix} libdir=/%{_lib}

%post -n libbemenu0 -p /sbin/ldconfig
%postun -n libbemenu0 -p /sbin/ldconfig

%files -n libbemenu0

%files devel

%dir %{_libdir}/bemenu/

openSUSE Build Service is sponsored by