File libapr1.spec of Package libapr2

#
# spec file for package libapr1 (Version 1.2.9)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild

Name:           libapr1
%if %{?suse_version:1}0
BuildRequires:  doxygen
%endif
URL:            http://apr.apache.org/
License:        Other uncritical OpenSource License, The Apache Software License
Group:          Development/Libraries/Other
Autoreqprov:    on
Version:        1.2.12
Release:        1
Summary:        Apache Portable Runtime (APR) Library
Source:         http://www.apache.org/dist/apr/apr-%{version}.tar.bz2
Patch:          apr-1.2.7.diff
Patch1:         string-compare.diff
Patch2:         apr-1.2.8-pool-cleanups.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%define aprver 1
%define installbuilddir %{_libdir}/apr-%{aprver}/build
%define includedir %{_includedir}/apr-%{aprver}

%description
The mission of the Apache Portable Runtime (APR) project is to create
and maintain software libraries that provide a predictable and
consistent interface to underlying platform-specific implementations.
The primary goal is to provide an API to which software developers may
code and be assured of predictable if not identical behaviour
regardless of the platform on which their software is built, relieving
them of the need to code special-case conditions to work around or take
advantage of platform-specific deficiencies or features.

The APR is used by both Open Source and Commercial projects, prominent
examples being the Apache HTTP server.



Authors:
--------
    Too many to list here -- see /usr/share/doc/packages/apache2/ABOUT_APACHE

%package devel
Summary:        Apache Portable Runtime (APR) Library
Group:          Development/Libraries/Other
Requires:       libapr1 = %{version} glibc-devel
Autoreqprov:    on

%description devel
The mission of the Apache Portable Runtime (APR) project is to create
and maintain software libraries that provide a predictable and
consistent interface to underlying platform-specific implementations.
The primary goal is to provide an API to which software developers may
code and be assured of predictable if not identical behaviour
regardless of the platform on which their software is built, relieving
them of the need to code special-case conditions to work around or take
advantage of platform-specific deficiencies or features.

The APR is used by both Open Source and Commercial projects, prominent
examples being the Apache HTTP server.



Authors:
--------
    Too many to list here -- see /usr/share/doc/packages/apache2/ABOUT_APACHE

%if 0%{?opensuse_bs}
%if 0%{?suse_version}
 %debug_package
%endif
%endif
%prep
%setup -n apr-%{version}
%patch
%patch1
%if %{?build_with_memory_pool_debug:1}0
#patch2 -p1
%endif

%build
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -DLDAP_DEPRECATED -fPIC"
%if 0%{?opensuse_bs}
CFLAGS="$CFLAGS -g"
%endif
#
%if %{?suse_version:1}0
%if 0%{?suse_version} < 1030
rm -rf aclocal.m4 autom4te*.cache
autoheader
autoconf
%else
autoreconf -fi
%endif
%endif
#
# --enable-pool-debug[=yes|no|verbose|verbose-alloc|lifetime|owner|all]
%configure \
	--with-installbuilddir=%{installbuilddir} \
	--includedir=%{includedir} \
%if %{?build_with_memory_pool_debug:1}0
	--enable-debug --enable-pool-debug=verbose \
%endif
%ifarch %ix86
%ifnarch i386
	--enable-nonportable-atomics=yes \
%endif
%endif
	--with-devrandom=/dev/urandom \
    --disable-static \
    --with-pic 

%{__make} %{?jobs:-j%jobs}
%if %{?suse_version:1}0
make dox
%endif

%install
make install DESTDIR=$RPM_BUILD_ROOT
%if %{?suse_version:1}0
# Move docs to more convenient location
mv docs/dox/html html
%endif
# Unpackaged files:
%{__rm} -f $RPM_BUILD_ROOT/%{_libdir}/apr.exp
%{__rm} -f %{buildroot}%{_libdir}/libapr-%{aprver}.la
%check
%ifnarch %arm
make check
%endif

%clean
if ! test -f /.buildenv; then
	rm -rf $RPM_BUILD_ROOT
fi

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc CHANGES
%doc LICENSE
%doc NOTICE
%{_libdir}/libapr-%{aprver}.so.*

%files devel
%defattr(-,root,root)
%doc docs/APRDesign.html
%doc docs/canonical_filenames.html
%doc docs/incomplete_types
%doc docs/non_apr_programs
%if %{?suse_version:1}0
%doc --parents html
%endif
%doc emacs-mode
%{includedir}
%{_libdir}/libapr-%{aprver}.so
%{_bindir}/apr-%{aprver}-config
%{_libdir}/pkgconfig/apr-%{aprver}.pc
%{_libdir}/apr-%{aprver}

%changelog
* Mon Aug 13 2007 - crrodriguez@suse.de
- apr 1.2.9
  *) Stop invoking the testshm* helpers upon 'make test' invocation.
  *) Register a cleanup only if APR_FILE_NOCLEANUP was not flagged in
  apr_file_mktemp.
  *) Discard file buffers when running cleanups for exec.
  PR 41119.
  *) If apr_proc_create() fails to exec in the fork()ed child, call
  _exit() not exit() to avoid running atexit()-registered functions
  in the child.
  *) Improve thread safety of assorted file_io functions.
  *) Fix file pointer position calculation in apr_file_writev() on
  buffered file.
  *) Fix formatting of unsigned integers larger than 2^63 in the
  vformatter/apr_*printf.
  *) Fix possible EFAULT failures in apr_socket_sendfile() on 32-bit
  Solaris with LFS enabled
  *) Fix deadlock in apr_file_gets() for a file opened with both the
  APR_BUFFERED and APR_XTHREAD flags.
- run make ceck in the rpm check section
- add missing glibc-devel dependency to -devel package
* Wed Jul 18 2007 - poeml@suse.de
- if the rpm macro build_with_memory_pool_debug is defined, build
  with --enable-pool-debug=verbose-alloc. (This is the case in the
  Apache-Pool-Debug buildservice project.)
- add apr-1.2.8-pool-cleanups.patch: don't run cleanup handlers
  _after_ destroying subpools
- add debug_package macro in buildservice (will soon be obsolete)
* Wed May 02 2007 - dmueller@suse.de
- Fix comparison with string literal
* Mon Dec 11 2006 - poeml@suse.de
- update to 1.2.8
  *) Correctly retrieve 'empty' environment values with apr_env_get
  on Win32 (e.g. "VAR="), and added validation to testall suite.
  *) APR_FIND_APR macro no longer checks /usr/local/apache2/.
  *) Portably check for EEXIST in mktemp code.  PR 40818
  *) Fix apr_snprintf/apr_vsnprintf return value to not count the
  NUL terminator in the overflow case.  PR 39996.
  *) Fix detection of pthread cross-process robust mutexes.
  *) NetBSD: Avoid leaving zombie process when using apr_signal()
  to ignore SIGCHLD.
  *) Fix apr_socket_sendv() for platforms without writev.
  *) Avoid issues using >2Gb of data per call with sendfile() on
  64-bit Linux platforms.
* Fri Oct 27 2006 - poeml@suse.de
- replace wrong configure switch --with-includedir with the correct
  one: --includedir. This fixes installation of the header files to
  /usr/include/apr-1 instead of /usr/include. [#164770]
* Thu Jun 22 2006 - schwab@suse.de
- Don't depend on configure args being preserved.
* Wed May 24 2006 - poeml@suse.de
- update to 1.2.7
  * fixes for netware and win32
- update to 1.2.6
  * bugfixes for libuuid, mutex, kqueue, ...
- use %%suse_version to build doxygen documentation only on SUSE
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Jan 09 2006 - poeml@suse.de
- don't use pthread_mutexattr_setrobust_np() unless
  pthread_mutexattr_setprotocol() is available as well (the former
  is in glibc since 2005-12-26, but the latter not)
* Wed Oct 12 2005 - poeml@suse.de
- update to 1.2.2
* Thu Sep 29 2005 - poeml@suse.de
- update to 1.2.1
- add -fno-strict-aliasing to CFLAGS
- add -DLDAP_DEPRECATED to CFLAGS
* Fri Apr 08 2005 - uli@suse.de
- disabled test suite for ARM (may hang QEMU)
* Thu Mar 24 2005 - poeml@suse.de
- update to 1.1.1
* Fri Feb 25 2005 - poeml@suse.de
- package created (1.1.0)