# Tests by default. No tests: rpm -ba --define 'dotests 0' *.spec %{!?dotests: %define dotests 1} %define _libdir64 %{_prefix}/lib64 %define _testsdir %{_prefix}/tests Summary:Automated Testing Framework Name: atf Version: 0.21 Release: 1 License: BSD License Group: Development/Languages URL: https://github.com/jmmv/atf Source0: https://github.com/jmmv/atf/releases/download/atf-0.21/atf-0.21.tar.gz Patch0: atf-0.21_header.patch BuildRequires: gcc BuildRequires: gcc-c++ %description There is no main package being built here. This is unused %package tests Summary: Automated Testing Framework - Test suite Requires: libatf-c = %{version}-%{release} Requires: libatf-c++ = %{version}-%{release} Requires: libatf-sh = %{version}-%{release} Requires: libatf-c-devel = %{version}-%{release} Requires: libatf-c++-devel = %{version}-%{release} Requires: libatf-sh-devel = %{version}-%{release} Requires: libgcc >= 8.3.0, libstdc++ >= 8.3.0 %description tests This package installs the run-time tests for all the components of ATF, which include tests for the C, C++ and POSIX shell libraries and the run-time tools. %package -n libatf-c Summary: Automated Testing Framework - C bindings Requires: libgcc >= 8.3.0 %description -n libatf-c This package provides the run-time libraries to run tests that use the ATF C bindings. %package -n libatf-c-devel Summary: Automated Testing Framework - C bindings (headers) Requires: libatf-c = %{version}-%{release} %description -n libatf-c-devel This package provides the libraries, header files and documentation to develop tests that use the ATF C bindings. %package -n libatf-c++ Summary: Automated Testing Framework - C++ bindings Requires: libatf-c = %{version}-%{release} Requires: libgcc >= 8.3.0, libstdc++ >= 8.3.0 %description -n libatf-c++ This package provides the run-time libraries to run tests that use the ATF C++ bindings. %package -n libatf-c++-devel Summary: Automated Testing Framework - C++ bindings (headers) Requires: libatf-c = %{version}-%{release} Requires: libatf-c-devel = %{version}-%{release} Requires: libatf-c++ = %{version}-%{release} %description -n libatf-c++-devel This package provides the libraries, header files and documentation to develop applications that use the ATF C++ bindings. %package -n libatf-sh Summary: Automated Testing Framework - POSIX shell bindings Requires: libatf-c++ = %{version}-%{release} Requires: libatf-c = %{version}-%{release} Requires: libgcc >= 8.3.0, libstdc++ >= 8.3.0 %description -n libatf-sh This package provides the run-time libraries to run tests that use the ATF POSIX shell bindings. %package -n libatf-sh-devel Summary: Automated Testing Framework - POSIX shell bindings (headers) Requires: libatf-sh = %{version}-%{release} %description -n libatf-sh-devel This package provides the supporting files and documentation to develop applications that use the ATF POSIX shell bindings. %prep %setup -q -n %{name}-%{version} %patch0 %build export CC="/opt/freeware/bin/gcc" export CXX__="/opt/freeware/bin/g++" export OBJECT_MODE=64 export CFLAGS="-O2 -maix64" export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib" export CXXFLAGS="$CFLAGS" ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir64} \ --mandir=%{_mandir} gmake %{?_smp_mflags} VERBOSE=1 %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} export OBJECT_MODE=64 gmake DESTDIR=${RPM_BUILD_ROOT} install #remove .la file rm %{buildroot}%{_libdir64}/libatf*.la %check if [ "%{dotests}" == 1 ] then (gmake -k check || true) /usr/sbin/slibclean fi %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files tests %{_datadir}/doc/atf/* %{_testsdir} %files -n libatf-c %{_libdir64}/libatf-c.a %{_mandir}/man1/atf-test-program.1 %{_mandir}/man4/atf-test-case.4 %files -n libatf-c-devel %{_datadir}/aclocal/atf-c.m4 %{_datadir}/aclocal/atf-common.m4 %{_includedir}/atf-c.h %{_includedir}/atf-c %{_libdir64}/pkgconfig/atf-c.pc %{_mandir}/man3/atf-c-api.3 %files -n libatf-c++ %{_libdir64}/libatf-c++.a %files -n libatf-c++-devel %{_datadir}/aclocal/atf-c++.m4 %{_includedir}/atf-c++.hpp %{_includedir}/atf-c++ %{_libdir64}/pkgconfig/atf-c++.pc %{_mandir}/man3/atf-c++-api.3 %files -n libatf-sh %{_bindir}/atf-sh %{_datadir}/atf %{_libexecdir}/atf-check %{_mandir}/man1/atf-sh.1 %files -n libatf-sh-devel %{_datadir}/aclocal/atf-sh.m4 %{_libdir64}/pkgconfig/atf-sh.pc %{_mandir}/man1/atf-check.1 %{_mandir}/man3/atf-sh-api.3 %changelog * Fri Apr 24 2020 Ashwini Chandrappa - 0.21-1 - Initial build