File checkheaders.spec of Package checkheaders

#
# spec file for package checkheaders
#
# Copyright (c) 2026 SUSE LLC and contributors
#
# 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/
#


%define gitdate 20210129
%define githash 9508da866d199e8a9e2b42e8ccf95b1d92a3c39b

Name:           checkheaders
Version:        1.0.1+git%{gitdate}
Release:        0
Summary:        Tool to check headers for unnecessary #includes
License:        GPL-3.0-only
Group:          Development/Languages/C and C++
URL:            https://github.com/danmar/checkheaders
Source:         https://github.com/danmar/checkheaders/archive/%{githash}.tar.gz#/%{name}-%{githash}.tar.gz
BuildRequires:  cmake
BuildRequires:  dos2unix
BuildRequires:  gcc-c++

%description
A simple tool that checks headers, to detect unnecessary #includes

%prep
%autosetup -n %{name}-%{githash}
dos2unix CMakeLists.txt COPYING readme.txt

%build
%cmake \
  -DCMAKE_POLICY_VERSION_MINIMUM=3.5
%cmake_build

%install
%cmake_install

%check
%ctest

%files
%license COPYING
%doc readme.txt
%{_bindir}/%{name}

%changelog
openSUSE Build Service is sponsored by