%global pkg rainbow-delimiters %global commit f40ece58df8b2f0fb6c8576b527755a552a5e763 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: emacs-%{pkg} Version: 2.1.5^20230830git.%{shortcommit} Release: %{autorelease} Summary: Minor mode to highlight parenthesis for Emacs License: GPL-3.0-or-later URL: https://github.com/Fanael/%{pkg} Source0: https://github.com/Fanael/%{pkg}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz Source1: %{pkg}-init.el BuildArch: noarch %if 0%{?rhel} < 10 BuildRequires: emacs-nox %else BuildRequires: emacs-nw %endif Requires: emacs(bin) >= %{?_emacs_version}%{!?_emacs_version:0} %description Minor mode for Emacs to add color-coded highlighting for parenthesis/bracket pairs %prep %setup -q -n %{pkg}-%{commit} %build %{_emacs_bytecompile} %{pkg}.el %check emacs -Q -batch -l rainbow-delimiters-test.el -f ert-run-tests-batch-and-exit %install mkdir -p %{buildroot}/%{_emacs_sitelispdir}/%{pkg} cp -p %{pkg}.el %{buildroot}%{_emacs_sitelispdir}/%{pkg} mkdir -p %{buildroot}/%{_emacs_sitestartdir} install -pm 644 %SOURCE1 %{buildroot}%{_emacs_sitestartdir} %files %doc README.md %license COPYING %{_emacs_sitelispdir}/%{pkg}/ %{_emacs_sitestartdir}/*.el %changelog %autochangelog