File atf.spec of Package atf

#
# spec file for package libdjinterop
#
# Copyright (c) 2024 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/
#

%global _testsbasedir %{_libexecdir}/atf
%global _testsdir %{_testsbasedir}/tests
Name:           atf
Version:        0.23
Release:        0
Summary:        Libraries to write tests in C, C++ and shell
License:        BSD-2-Clause
URL:            https://github.com/xsco/libdjinterop
Source:         atf-%{version}.tar.gz
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  gcc-c++
BuildRequires:  libtool

%description
ATF, or Automated Testing Framework, is a collection of libraries to
write test programs in C, C++ and POSIX shell.

The ATF libraries offer a simple API. The API is orthogonal through the
various bindings, allowing developers to quickly learn how to write test
programs in different languages.

ATF-based test programs offer a consistent end-user command-line interface
to allow both humans and automation to run the tests.

ATF-based test programs rely on an execution engine to be run and this
execution engine is not shipped with ATF. Kyua is the engine of choice.

%package tests
Summary:        Libraries to write tests. Test files for that
Requires:       atf
Requires:       atf-devel
Requires:       kyua
Requires:       libatf-c++2
Requires:       libatf-c1
Requires:       libatf-sh

%description tests
ATF, or Automated Testing Framework, is a collection of libraries to
write test programs in C, C++ and POSIX shell.

The ATF libraries offer a simple API. The API is orthogonal through the
various bindings, allowing developers to quickly learn how to write test
programs in different languages.

ATF-based test programs offer a consistent end-user command-line interface
to allow both humans and automation to run the tests.

ATF-based test programs rely on an execution engine to be run and this
execution engine is not shipped with ATF. Kyua is the engine of choice.

%package -n libatf-c1
Summary:        Libraries to write tests in C, C++ and shell devel files
Requires:       atf

%description -n libatf-c1
ATF, or Automated Testing Framework, is a collection of libraries to
write test programs in C, C++ and POSIX shell.

The ATF libraries offer a simple API. The API is orthogonal through the
various bindings, allowing developers to quickly learn how to write test
programs in different languages.

ATF-based test programs offer a consistent end-user command-line interface
to allow both humans and automation to run the tests.

ATF-based test programs rely on an execution engine to be run and this
execution engine is not shipped with ATF. Kyua is the engine of choice.

C version of library

%package -n libatf-c++2
Summary:        Libraries to write tests in C, C++ and shell devel files
Requires:       atf

%description -n libatf-c++2
ATF, or Automated Testing Framework, is a collection of libraries to
write test programs in C, C++ and POSIX shell.

The ATF libraries offer a simple API. The API is orthogonal through the
various bindings, allowing developers to quickly learn how to write test
programs in different languages.

ATF-based test programs offer a consistent end-user command-line interface
to allow both humans and automation to run the tests.

ATF-based test programs rely on an execution engine to be run and this
execution engine is not shipped with ATF. Kyua is the engine of choice.

C++ version of library

%package -n libatf-sh
Summary:        Automated Testing Framework - POSIX shell bindings
Requires:       atf

%description -n libatf-sh
ATF, or Automated Testing Framework, is a collection of libraries to
write test programs in C, C++ and POSIX shell.

The ATF libraries offer a simple API. The API is orthogonal through the
various bindings, allowing developers to quickly learn how to write test
programs in different languages.

ATF-based test programs offer a consistent end-user command-line interface
to allow both humans and automation to run the tests.

ATF-based test programs rely on an execution engine to be run and this
execution engine is not shipped with ATF. Kyua is the engine of choice.

%package -n atf-devel
Summary:        Libraries to write tests in C, C++ and shell devel files
Requires:       libatf-c++2
Requires:       libatf-c1
Requires:       libatf-sh

%description -n atf-devel
ATF, or Automated Testing Framework, is a collection of libraries to
write test programs in C, C++ and POSIX shell.

The ATF libraries offer a simple API. The API is orthogonal through the
various bindings, allowing developers to quickly learn how to write test
programs in different languages.

ATF-based test programs offer a consistent end-user command-line interface
to allow both humans and automation to run the tests.

ATF-based test programs rely on an execution engine to be run and this
execution engine is not shipped with ATF. Kyua is the engine of choice.

libatf-c and libatf-c++ devel files

%prep
%autosetup -p1 -n atf-%{version}

%build
%configure INSTALL="%{_bindir}/install -p" --disable-static --disable-developer
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%make_build pkgtestsdir=%{_testsdir} testsdir=%{_testsdir}

%install
%make_install doc_DATA= \
	      pkgtestsdir=%{_testsdir} testsdir=%{_pkgtestsdir}

find %{buildroot} -type f -name "*.la" -delete -print

%ldconfig_scriptlets

%check
%make_build check

%post   -n libatf-c++2 -p /sbin/ldconfig
%postun -n libatf-c++2 -p /sbin/ldconfig
%post   -n libatf-c1 -p /sbin/ldconfig
%postun -n libatf-c1 -p /sbin/ldconfig

%files
%license COPYING
%doc README.md
%dir %{_datadir}/atf/

%files tests
%dir %{_testsbasedir}
%dir %{_testsdir}
%{_testsdir}/*

%files -n libatf-sh
%{_datadir}/atf/libatf-sh.subr
%{_bindir}/atf-sh
%{_libexecdir}/atf-check
%{_mandir}/man1/atf-sh.1%{?ext_man}
%{_mandir}/man3/atf-sh.3%{?ext_man}
%{_mandir}/man1/atf-check.1%{?ext_man}

%files -n libatf-c1
%{_libdir}/libatf-c.so.*
%{_mandir}/man3/atf-c.3%{?ext_man}

%files -n libatf-c++2
%{_libdir}/libatf-c++.so.*
%{_mandir}/man3/atf-c++.3%{?ext_man}

%files -n atf-devel
%doc NEWS AUTHORS
%dir %{_includedir}/atf-c
%dir %{_includedir}/atf-c++
%{_includedir}/atf-c.h
%{_includedir}/atf-c++.hpp
%{_includedir}/atf-c/*.h
%{_includedir}/atf-c++/*.hpp
%{_libdir}/libatf-c++.so
%{_libdir}/libatf-c.so
%{_libdir}/pkgconfig/atf-c.pc
%{_libdir}/pkgconfig/atf-c++.pc
%{_libdir}/pkgconfig/atf-sh.pc
%{_datadir}/aclocal/atf-sh.m4
%{_datadir}/aclocal/atf-c++.m4
%{_datadir}/aclocal/atf-c.m4
%{_datadir}/aclocal/atf-common.m4
%{_mandir}/man1/atf-test-program.1%{?ext_man}
%{_mandir}/man4/atf-test-case.4%{?ext_man}
%{_mandir}/man7/atf.7%{?ext_man}

%changelog
openSUSE Build Service is sponsored by