Name: apr-api-docs
Version: 1.2.8
Release: 4%{?dist}
Summary: Apache Portable Runtime API documentation
Group: Development/Tools
License: Apache Software License
URL: http://apr.apache.org/
Source0: http://svn.apache.org/repos/asf/apr/apr/tags/%{version}/docs/doxygen.conf
Source1: http://svn.apache.org/repos/asf/apr/apr/tags/%{version}/LICENSE
BuildRequires: apr-devel = %{version}, apr-util-devel, doxygen
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
%description
The mission of the Apache Portable Runtime (APR) is to provide a free library
of C data structures and routines, forming a system portability layer to as
many operating systems as possible, including Unices, MS Win32, BeOS and OS/2.
This package provides APR and APR-util API documentation for developers.
%prep
rm -rf %{name}-%{version}
mkdir -p %{name}-%{version}
cd %{name}-%{version}
cp %{SOURCE0} doxygen.conf
%build
cd %{name}-%{version}
%define docheaders %(ls %{_includedir}/apr-1/apr.h %{_includedir}/apr-1/apr-%{_arch}.h %{_includedir}/apr-1/apr_*.h %{_includedir}/apr-1/apu*.h | xargs echo)
sed -e 's,\(INPUT *= *\).*$,\1%{docheaders},' \
-e 's,\(OUTPUT_DIRECTORY *= *\).*$,\1docs,' \
-e 's,\(GENERATE_TAGFILE *= *\).*$,\1docs/apr.tag,' \
doxygen.conf | doxygen -
sed -ie 's,^\[Apache Portability Runtime library\],&'\
'
'\
'WARNING: The actual values of macros and typedefs
'\
'are platform specific and should NOT be relied upon!'\
',' docs/html/group__apr__platform.html
%install
cd %{name}-%{version}
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_docdir}/apr-%{version}/api-docs
install -m 644 docs/apr.tag $RPM_BUILD_ROOT%{_docdir}/apr-%{version}/api-docs
install -m 644 docs/html/* $RPM_BUILD_ROOT%{_docdir}/apr-%{version}/api-docs
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_docdir}/apr-%{version}/api-docs
%clean
rm -rf %{name}-%{version}
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc %dir %{_docdir}/apr-%{version}
%doc %dir %{_docdir}/apr-%{version}/api-docs
%doc %{_docdir}/apr-%{version}/api-docs/*
%changelog
* Thu Jul 19 2007 Bojan Smojver 1.2.8-4
- introduce warning about platform specific macros and typedefs
- pick up APU docs too
* Tue Jun 26 2007 Bojan Smojver 1.2.8-3
- make the package noarch, as suggested by Joe Orton
- pick the docs for the arch we're built on
* Fri Jun 22 2007 Bojan Smojver 1.2.8-2
- fixes for issues noted in package review
* Fri Jun 8 2007 Bojan Smojver 1.2.8-1
- initial package