Blob Blame History Raw
Summary: Automated Testing Framework
Name: atf
Version: 0.16
Release: 2%{?dist}
License: BSD
Group: Development/Tools
URL: http://code.google.com/p/kyua/wiki/ATF
Source0: http://kyua.googlecode.com/files/%{name}-%{version}.tar.gz
Source1: README.Fedora
Requires: libatf-c = %{version}-%{release}
Requires: libatf-c++ = %{version}-%{release}
Requires: libatf-sh = %{version}-%{release}

%define _egdir %{_datadir}/atf/examples
%define _testsdir %{_libexecdir}/atf/tests
%define _xsldir %{_datadir}/atf/xsl

%define common_description The Automated Testing Framework (ATF) is a collection of libraries and \
utilities designed to ease unattended application testing in the hands of \
developers and end users of a specific piece of software. \
\
As regards developers, ATF provides the necessary means to easily create \
test suites composed of multiple test programs, which in turn are a \
collection of test cases.  It also attempts to simplify the debugging of \
problems when these test cases detect an error by providing as much \
information as possible about the failure. \
\
As regards users, it simplifies the process of running the test suites and, \
in special, encourages end users to run them often: they do not need to \
have source trees around nor any other development tools installed to be \
able to certify that a given piece of software works on their machine as \
advertised. \

%description
%{common_description}

This package provides the end-user tools (atf-run and atf-report being the
most relevant ones) that implement the run-time system for tests, and also
provides a "meta-package" to install all the components of ATF at once.
Please note that the end-user tools (not the libraries) are deprecated and
that Kyua should be used instead.

%prep
%setup -q

# Put the README.Fedora file in the top-level directory of the source tree so
# that the %doc call below can pick it up.
cp -p %{SOURCE1} README.Fedora

%build
%configure INSTALL="/usr/bin/install -p" \
           --disable-static \
           --enable-tools
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 %{?_smp_mflags} cssdir=%{_egdir} egdir=%{_egdir} \
     pkgtestsdir=%{_testsdir} testsdir=%{_testsdir} xsldir=%{_xsldir}

%check
make check

%install
make install DESTDIR=%{buildroot} doc_DATA= cssdir=%{_egdir} egdir=%{_egdir} \
             pkgtestsdir=%{_testsdir} testsdir=%{_pkgtestsdir} xsldir=%{_xsldir}
rm %{buildroot}%{_libdir}/libatf*.la

%files
%doc AUTHORS COPYING NEWS README
%{_bindir}/atf-config
%{_bindir}/atf-report
%{_bindir}/atf-run
%{_bindir}/atf-version
%{_datadir}/atf/atf-run.hooks
%{_datadir}/man/man1/atf-config.1.gz
%{_datadir}/man/man1/atf-report.1.gz
%{_datadir}/man/man1/atf-run.1.gz
%{_datadir}/man/man1/atf-test-program.1.gz
%{_datadir}/man/man1/atf-version.1.gz
%{_datadir}/man/man4/atf-test-case.4.gz
%{_datadir}/man/man5/atf-formats.5.gz
%{_datadir}/man/man7/atf.7.gz
%{_datadir}/xml/atf
%{_egdir}
%{_xsldir}

%changelog
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.16-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Tue Jul 10 2012 Julio Merino <julio@meroh.net> 0.16-1
- Updated to new upstream version 0.16.

* Mon Jun 18 2012 Julio Merino <jmmv@julipedia.org> 0.15-2
- Added the atf-tests package, which provides the run-time tests of ATF
  readily runnable by the end users.
- Made the installation of the package preserve the build times of the files.
- Fixed URL to the project's page.

* Thu May 3 2012 Julio Merino <jmmv@julipedia.org> 0.15-1
- Initial release for Fedora.


# Ideally, we would ship one tests package for every component, namely
# atf-tests, libatf-c-tests, libatf-c++-tests and libatf-sh-tests.  However, the
# test suite of ATF has not been written with this in mind, and the tests of one
# component often have dependencies on the rest of the components.  It is much
# easier to ship a single package with the whole test suite rather than
# attempting to fight this fact.
%package tests
Summary: Automated Testing Framework - Test suite
Requires: atf = %{version}-%{release}
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}

%description tests
%{common_description}

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.
Please see the README.Fedora file in the documentation directory for further
details on how to run the installed tests.

%files tests
%doc README.Fedora
%{_testsdir}


%package -n libatf-c
Summary: Automated Testing Framework - C bindings

%description -n libatf-c
%{common_description}

This package provides the run-time libraries to run tests that use the
ATF C bindings.

%files -n libatf-c
%doc AUTHORS COPYING NEWS
%{_libdir}/libatf-c.so.0
%{_libdir}/libatf-c.so.0.0.0

%post -n libatf-c -p /sbin/ldconfig
%postun -n libatf-c -p /sbin/ldconfig


%package -n libatf-c-devel
Summary: Automated Testing Framework - C bindings (headers)
Requires: libatf-c = %{version}-%{release}

%description -n libatf-c-devel
%{common_description}

This package provides the libraries, header files and documentation to
develop tests that use the ATF C bindings.

%files -n libatf-c-devel
%{_datadir}/aclocal/atf-c.m4
%{_datadir}/aclocal/atf-common.m4
%{_includedir}/atf-c.h
%{_includedir}/atf-c
%{_libdir}/libatf-c.so
%{_libdir}/pkgconfig/atf-c.pc
%{_mandir}/man3/atf-c-api.3.gz


%package -n libatf-c++
Summary: Automated Testing Framework - C++ bindings

%description -n libatf-c++
%{common_description}

This package provides the run-time libraries to run tests that use the
ATF C++ bindings.

%files -n libatf-c++
%doc AUTHORS COPYING NEWS
%{_libdir}/libatf-c++.so.0
%{_libdir}/libatf-c++.so.0.0.0

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


%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
%{common_description}

This package provides the libraries, header files and documentation to
develop applications that use the ATF C++ bindings.

%files -n libatf-c++-devel
%{_datadir}/aclocal/atf-c++.m4
%{_includedir}/atf-c++.hpp
%{_includedir}/atf-c++
%{_libdir}/libatf-c++.so
%{_libdir}/pkgconfig/atf-c++.pc
%{_mandir}/man3/atf-c++-api.3.gz


%package -n libatf-sh
Summary: Automated Testing Framework - POSIX shell bindings
Requires: libatf-c++ = %{version}-%{release}

%description -n libatf-sh
%{common_description}

This package provides the run-time libraries to run tests that use the
ATF POSIX shell bindings.

%files -n libatf-sh
%doc AUTHORS COPYING NEWS
%{_bindir}/atf-sh
# Cheat a bit: While this directory should be supposedly owned by the main
# 'atf' package, 'atf' depends on libatf-sh.  Therefore, it's easier to handle
# ownership here.
%{_datadir}/atf
%{_libexecdir}/atf-check
%{_mandir}/man1/atf-sh.1.gz


%package -n libatf-sh-devel
Summary: Automated Testing Framework - POSIX shell bindings (headers)
Requires: libatf-sh = %{version}-%{release}

%description -n libatf-sh-devel
%{common_description}

This package provides the supporting files and documentation to develop
applications that use the ATF POSIX shell bindings.

%files -n libatf-sh-devel
%{_datadir}/aclocal/atf-sh.m4
%{_libdir}/pkgconfig/atf-sh.pc
%{_mandir}/man1/atf-check.1.gz
%{_mandir}/man3/atf-sh-api.3.gz