%global commit 442d2833f48590122e5ce54a2bca3a327ffa0311
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global checkout_date 20190819
%global snapshot %{checkout_date}git%{shortcommit}
Name: bemenu
Version: 0.1.0
Release: 3.%{snapshot}%{?dist}
Summary: Dynamic menu library and client program inspired by dmenu
# Library and bindings are LGPLv3+, other files are GPLv3+
License: GPLv3+ and LGPLv3+
URL: https://github.com/Cloudef/bemenu
Source0: %{url}/archive/%{shortcommit}/%{name}-%{shortcommit}.tar.gz
BuildRequires: cmake
BuildRequires: gcc
BuildRequires: pkgconfig(cairo)
BuildRequires: pkgconfig(ncursesw)
BuildRequires: pkgconfig(pango)
BuildRequires: pkgconfig(pangocairo)
BuildRequires: pkgconfig(wayland-client)
BuildRequires: pkgconfig(wayland-egl)
BuildRequires: pkgconfig(wayland-server)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xinerama)
BuildRequires: pkgconfig(xkbcommon)
%description
%{summary}.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
Development files for extending %{name}.
%prep
%autosetup -n %{name}-%{commit}
%build
%cmake \
-DCURSES_NEED_WIDE=ON \
-DBEMENU_WAYLAND_RENDERER=ON \
"$PWD"
%make_build
%install
%make_install
%files
%doc README.md
%license LICENSE-CLIENT LICENSE-LIB
%{_bindir}/%{name}
%{_bindir}/%{name}-run
%{_mandir}/man1/%{name}*.1*
%{_libdir}/lib%{name}.so.0
%{_libdir}/lib%{name}.so.0.1.0
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/%{name}-renderer-curses.so
%{_libdir}/%{name}/%{name}-renderer-wayland.so
%{_libdir}/%{name}/%{name}-renderer-x11.so
%files devel
%doc README.md
%{_includedir}/%{name}.h
%{_libdir}/lib%{name}.so
%changelog
* Mon Aug 19 2019 Jan Staněk <jstanek@redhat.com> - 0.1.0-3.20190819git442d283
- Upgrade to snapshot 442d2833f48590122e5ce54a2bca3a327ffa0311
* Mon Jun 10 2019 Jan Staněk <jstanek@redhat.com> - 0.1.0-2.f464f0e
- Upgrade to snapshot f464f0e30a34c27babc9d533a52fbe260f134034
* Mon May 13 2019 Jan Staněk <jstanek@redhat.com> - 0.1.0.121367b
- Initial package import