%{!?make_build:   %global make_build   make %{?_smp_mflags}}
%{!?make_install: %global make_install make install DESTDIR=%{buildroot} INSTALL="/usr/bin/install -p"}

Name: bcpp
Version: 20240917
Release: 0%{dist}.1sunshine
Summary: C(++) source beautifier
Source0: https://invisible-island.net/archives/%{name}/%{name}-%{version}.tgz
URL: https://invisible-island.net/bcpp/bcpp.html
BuildRequires: gcc-c++
License: MIT

%description
bcpp indents C/C++ source programs, replacing tabs with spaces or the
reverse. Unlike indent, it does (by design) not attempt to wrap long
statements.

%prep
%setup -q

%build
%configure
%make_build

%check
make check

%install
%make_install

%files
%{!?_licensedir:%global license %%doc}
%doc README VERSION CHANGES txtdocs/manual.txt txtdocs/hirachy.txt
%license COPYING
%{_bindir}/%{name}
%{_bindir}/cb++
%{_mandir}/man1/%{name}.*
%{_mandir}/man1/cb++.*

%changelog
* Sat Oct 12 2024 Moritz Barsnick <moritz+rpm@barsnick.net> 20240917-0.1sunshine
- update to 20240917

* Mon Apr 01 2024 Moritz Barsnick <moritz+rpm@barsnick.net> 20240111-0.1sunshine
- update to 20240111
- switch to HTTP Source URL
- drop BuildRoot and Group tags and %%clean section

* Tue Apr 25 2023 Moritz Barsnick <moritz+rpm@barsnick.net> 20230130-0.1sunshine
- update to 20230130

* Wed Aug 18 2021 Moritz Barsnick <moritz+rpm@barsnick.net> 20210108-0.1sunshine
- update to 20210108

* Thu Sep 24 2020 Moritz Barsnick <moritz+rpm@barsnick.net> 20200922-0.1sunshine
- initial RPM