File rofi.spec of Package rofi
#
# spec file for package rofi
#
# Copyright (c) 2025 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 https://bugs.opensuse.org/
#
Name:           rofi
Version:        2.0.0+git20251002.5d3a087d
Release:        0
Summary:        A window switcher, Application launcher and dmenu replacement
License:        MIT
URL:            https://github.com/davatorium/%{name}
Source:         %{name}-%{version}.tar.gz
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  bison
BuildRequires:  cppcheck
BuildRequires:  flex >= 2.5.39
BuildRequires:  gcc-c++
BuildRequires:  make
BuildRequires:  meson
BuildRequires:  pandoc-cli
BuildRequires:  pkgconfig(cairo)
BuildRequires:  pkgconfig(libjpeg)
BuildRequires:  pkgconfig(librsvg-2.0)
BuildRequires:  pkgconfig(libstartup-notification-1.0)
BuildRequires:  pkgconfig(pango)
BuildRequires:  pkgconfig(xcb-cursor)
BuildRequires:  pkgconfig(xcb-ewmh)
BuildRequires:  pkgconfig(xcb-keysyms)
BuildRequires:  pkgconfig(xcb-util)
BuildRequires:  pkgconfig(xcb-xrm)
BuildRequires:  pkgconfig(xkbcommon)
BuildRequires:  pkgconfig(xkbcommon-x11)
Requires:       xdg-utils
#
Conflicts:      rofi-wayland
Provides:       rofi-launcher
%description
Rofi started as a clone of simpleswitcher, written by Sean Pringle - a popup window switcher roughly based on superswitcher. Simpleswitcher laid the foundations, and therefore Sean Pringle deserves most of the credit for this tool. Rofi (renamed, as it lost the simple property) has been extended with extra features, like an application launcher and ssh-launcher, and can act as a drop-in dmenu replacement, making it a very versatile tool. Rofi, like dmenu, will provide the user with a textual list of options where one or more can be selected. This can either be running an application, selecting a window, or options provided by an external script.
%package devel
Summary:        Development files for rofi
Group:          Development/Libraries/C and C++
%description devel
Development files and headers for rofi
%prep
%setup -q
find script -type f -exec sed -i 's@#!%{_bindir}/env bash$@#!%{_bindir}/bash@' {} +
%build
meson setup build --prefix /usr
ninja -C build
%install
%if 0%{?suse_version} > 1500
meson install -C build --destdir "%{buildroot}"
%else
DESTDIR="%{buildroot}" meson install -C build
%endif
%files
%license COPYING
%doc Changelog
%{_bindir}/rofi
%{_bindir}/rofi-sensible-terminal
%{_bindir}/rofi-theme-selector
%dir %{_datadir}/rofi
%{_datadir}/applications/rofi-theme-selector.desktop
%{_datadir}/applications/rofi.desktop
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/scalable
%dir %{_datadir}/icons/hicolor/scalable/apps
%{_datadir}/icons/hicolor/scalable/apps/rofi.svg
%{_datadir}/rofi/themes/
%{_mandir}/man1/rofi-sensible-terminal.1%{?ext_man}
%{_mandir}/man1/rofi-theme-selector.1%{?ext_man}
%{_mandir}/man1/rofi.1%{?ext_man}
%{_mandir}/man5/rofi-actions.5%{?ext_man}
%{_mandir}/man5/rofi-debugging.5%{?ext_man}
%{_mandir}/man5/rofi-dmenu.5%{?ext_man}
%{_mandir}/man5/rofi-keys.5%{?ext_man}
%{_mandir}/man5/rofi-script.5%{?ext_man}
%{_mandir}/man5/rofi-theme.5%{?ext_man}
%{_mandir}/man5/rofi-thumbnails.5%{?ext_man}
%files devel
%{_includedir}/rofi/
%{_libdir}/pkgconfig/rofi.pc
%changelog