File skalibs.spec of Package skalibs

#
# spec file for package skalibs
#
# Copyright (c) 2022 SUSE LLC
#
# 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:           skalibs
Version:        2.14.1.0
Release:        0
Summary:        General-purpose low-level C library
License:        ISC
URL:            https://skarnet.org/software/%{name}
Source0:        https://skarnet.org/software/%{name}/%{name}-%{version}.tar.gz
BuildRequires:  gcc
BuildRequires:  make

%description
skalibs is a C library used by all the skarnet.org packages. It provides APIs
more suited to secure and efficient system programming than the libc,
especially where network programming and IPCs are concerned.

%package devel
Summary: Development files for skalibs
Requires: glibc-devel
Requires: skalibs

%description devel
skalibs is a C library used by all the skarnet.org packages. It provides APIs
more suited to secure and efficient system programming than the libc,
especially where network programming and IPCs are concerned.

This subpackage holds the development headers and sysdeps files for the library.

%package devel-static
Summary: Static library for skalibs
Requires: %{name}-devel; = %{version}
Provides: %{name}-devel:%{_libdir}/libskarnet.a

%description devel-static
skalibs is a C library used by all the skarnet.org packages. It provides APIs
more suited to secure and efficient system programming than the libc,
especially where network programming and IPCs are concerned.

This subpackage contains the static version of the library used for development.

%prep
%setup -q

%build
%if 0%{?suse_version}
%global _lto_cflags %{?_lto_cflags} -ffat-lto-objects
%endif
%configure \
    --dynlibdir=%{_libdir} \
    --sysdepdir=%{_libdir}/skalibs/sysdeps
make %{?_smp_mflags}

%install
%if 0%{?fedora}
make install DESTDIR=%{buildroot}
%else
%make_install
%endif

%post
ldconfig

%postun
ldconfig

%files
%license COPYING
%{_libdir}/libskarnet.so.%{version}
%{_libdir}/libskarnet.so.2.14

%files devel
%{_includedir}/skalibs
%dir %{_libdir}/skalibs
%{_libdir}/skalibs/sysdeps
%{_libdir}/libskarnet.so

%files devel-static
%{_libdir}/libskarnet.a

%changelog
openSUSE Build Service is sponsored by