Name:           s6
Version:        2.9.1.0
Release:        1%{?dist}
Summary:        skarnet.org's small & secure supervision software suite. Comes with an ultra-fast init replacement, process management tools, an asynchronous locking library, and more.

License:        ISC
URL:            https://skarnet.org/software/%{name}/
Source0:        https://skarnet.org/software/%{name}/%{name}-%{version}.tar.gz
Patch0:         %{name}.patch

BuildRequires:  make >= 3.81
BuildRequires:  gcc
BuildRequires:  skalibs-devel >= 2.9.2.0
BuildRequires:  execline-devel >= 2.6.0.0

Requires:       skalibs >= 2.9.2.0
Requires:       execline >= 2.6.0.0

%description
s6 is a small suite of programs for UNIX, designed to allow process
supervision (a.k.a service supervision), in the line of daemontools and runit,
as well as various operations on processes and daemons. It is meant to be
a toolbox for low-level process and service administration, providing
different sets of independent tools that can be used within or without
the framework, and that can be assembled together to achieve powerful
functionality with a very small amount of code.

%package devel
Summary:        %{name} development files
Provides:       %{name}-devel

%description devel
This package contains necessary header files for %{name} development.

%prep
%autosetup -p1

%build
%configure --libexecdir=%{_libexecdir}/%{name}\
 --enable-shared\
 --disable-static\
 --disable-allstatic\
 --with-sysdeps=/usr/lib64/skalibs/sysdeps
%make_build

%install
%make_install

%files
%license COPYING
%doc README
%doc NEWS
%doc AUTHORS
%doc doc
%doc examples
%{_libdir}/libs6.so.2.9*
%{_bindir}/*
%{_libexecdir}/%{name}/*

%files devel
%{_includedir}/%{name}/*
%{_libdir}/libs6.so

%changelog
* Tue Jun 16 2020 Marcin Skarbek <rpm@skarbek.name> 2.9.1.0-1
- Initial package