File simplomon.spec of Package simplomon

#
# spec file for package simplomon
#
# Copyright (c) 2024, Martin Hauke <mardnh@gmx.de>
#
# 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:           simplomon
Version:        0~git20240322
Release:        0
Summary:        Simple Monitoring Tool
License:        MIT
Group:          System/Monitoring
URL:            https://github.com/berthubert/simplomon
Source:         %{name}-%{version}.tar.xz
Source2:        https://github.com/berthubert/sqlitewrite/archive/main.tar.gz#/sqlitewrite-main.tar.gz
Source3:        https://github.com/ahuPowerDNS/simplesocket/archive/master.tar.gz#/simplesocket-master.tar.gz
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  lua53-devel
BuildRequires:  meson
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(cpp-httplib)
BuildRequires:  pkgconfig(doctest)
BuildRequires:  pkgconfig(fmt)
BuildRequires:  pkgconfig(libcurl)
BuildRequires:  pkgconfig(nlohmann_json)
BuildRequires:  pkgconfig(sqlite3)
# bundled libs
# sqlitewriter is licensed under MIT
Provides:       bundled(sqlitewriter)
# simplesocket is licensed under MIT
Provides:       bundled(simplesocket)

%description
Very simple monitoring system with a single configuration file.

%prep
%setup -q
# fix lua53 pkg-config
sed -i 's|lua53|lua5.3|g' meson.build
# bundled libs
cd ./subprojects/
tar xzvf %{SOURCE2}
mv sqlitewrite-main sqlitewriter
tar xzvf %{SOURCE3}
mv simplesocket-master simplesockets

%build
%meson
%meson_build

%install
install -Dpm 0755 *-suse-linux/simplomon %{buildroot}%{_bindir}/simplomon

%files
%license LICENSE
%doc README.md
%{_bindir}/simplomon

%changelog
openSUSE Build Service is sponsored by