svn commit: r1924452 - /apr/apr/trunk/build/rpm/apr.spec.in

[email protected]
Newsgroups gmane.comp.apache.apr.cvs
Message-ID <[email protected]>
Author: minfrin
Date: Tue Mar 18 17:14:14 2025
New Revision: 1924452

URL: http://svn.apache.org/viewvc?rev=1924452&view=rev
Log:
RPM spec file: modernise build for APR v2.0.

Modified:
    apr/apr/trunk/build/rpm/apr.spec.in

Modified: apr/apr/trunk/build/rpm/apr.spec.in
URL: http://svn.apache.org/viewvc/apr/apr/trunk/build/rpm/apr.spec.in?rev=1924452&r1=1924451&r2=1924452&view=diff
==============================================================================
--- apr/apr/trunk/build/rpm/apr.spec.in (original)
+++ apr/apr/trunk/build/rpm/apr.spec.in Tue Mar 18 17:14:14 2025
@@ -4,13 +4,16 @@
 Summary: Apache Portable Runtime library
 Name: apr
 Version: APR_VERSION
-Release: APR_RELEASE
-License: Apache Software License
-Group: System Environment/Libraries
+Release: APR_RELEASE%{?dist}
+License: Apache-2.0 AND (Beerware AND LicenseRef-Fedora-Public-Domain AND OLDAP-2.7 AND BSD-4.3RENO)
 URL: http://apr.apache.org/
-Source0: http://www.apache.org/dist/apr/%{name}-%{version}.tar.bz2
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
-BuildRequires: autoconf, libtool, doxygen, libuuid-devel, python
+Source0: https://www.apache.org/dist/apr/%{name}-%{version}.tar.bz2
+BuildRequires: gcc
+BuildRequires: autoconf
+BuildRequires: pkgconfig(expat), pkgconfig(uuid)
+BuildRequires: pkgconfig(libxcrypt)
+Recommends: apr-openssl%{_isa} = %{version}-%{release}
+Recommends: apr-lmdb%{_isa} = %{version}-%{release}
 
 %description
 The mission of the Apache Portable Runtime (APR) is to provide a
@@ -19,89 +22,98 @@ portability layer to as many operating s
 including Unices, MS Win32, BeOS and OS/2.
 
 %package devel
-Group: Development/Libraries
 Summary: APR library development kit
-Requires: apr = %{version}
+Requires: apr%{?_isa} = %{version}-%{release}, pkgconfig
 
 %description devel
 This package provides the support files which can be used to 
-build applications using the APR library.  The mission of the
-Apache Portable Runtime (APR) is to provide a free library of 
-C data structures and routines.
-
-%package dbm
-Group: Development/Libraries 
-Summary: APR utility library DBM driver
-BuildRequires: db4-devel
-Requires: apr-util = %{version}-%{release}
-
-%description dbm
-This package provides the DBM driver for the apr-util.
+build applications using the APR library.  The mission 
+of the Apache Portable Runtime (APR) is to provide a free 
+library of C data structures and routines.
+
+%package lmdb
+Summary: APR library LMDB driver
+BuildRequires: pkgconfig(lmdb)
+Requires: apr%{?_isa} = %{version}-%{release}
+Provides: apr-%{aprver}(lmdb) = %{version}-%{release}
+
+%description lmdb
+This package provides the LMDB driver for the apr
+DBM (database abstraction) interface.
 
 %package pgsql
-Group: Development/Libraries
-Summary: APR utility library PostgreSQL DBD driver
-BuildRequires: postgresql-devel
-Requires: apr-util = %{version}-%{release}
+Summary: APR library PostgreSQL DBD driver
+BuildRequires: pkgconfig(libpq)
+Requires: apr%{?_isa} = %{version}-%{release}
+Provides: apr-%{aprver}(pgsql) = %{version}-%{release}
 
 %description pgsql
-This package provides the PostgreSQL driver for the apr-util
+This package provides the PostgreSQL driver for the apr
 DBD (database abstraction) interface.
 
 %package mysql
-Group: Development/Libraries
-Summary: APR utility library MySQL DBD driver
-BuildRequires: mysql-devel
-Requires: apr-util = %{version}-%{release}
+Summary: APR library MySQL DBD driver
+BuildRequires: pkgconfig(mariadb)
+Requires: apr%{?_isa} = %{version}-%{release}
+Provides: apr-%{aprver}(mysql) = %{version}-%{release}
 
 %description mysql
-This package provides the MySQL driver for the apr-util DBD
+This package provides the MySQL driver for the apr DBD
 (database abstraction) interface.
 
 %package sqlite
-Group: Development/Libraries
-Summary: APR utility library SQLite DBD driver
-BuildRequires: sqlite-devel >= 3.0.0
-Requires: apr-util = %{version}-%{release}
+Summary: APR library SQLite DBD driver
+BuildRequires: pkgconfig(sqlite3)
+Requires: apr%{?_isa} = %{version}-%{release}
+Provides: apr-%{aprver}(sqlite) = %{version}-%{release}
 
 %description sqlite
-This package provides the SQLite driver for the apr-util DBD
+This package provides the SQLite driver for the apr DBD
 (database abstraction) interface.
 
 %package odbc
-Group: Development/Libraries
-Summary: APR utility library ODBC DBD driver
-BuildRequires: unixODBC-devel
-Requires: apr-util = %{version}-%{release}
+Summary: APR library ODBC DBD driver
+BuildRequires: pkgconfig(odbc)
+Requires: apr%{?_isa} = %{version}-%{release}
+Provides: apr-%{aprver}(odbc) = %{version}-%{release}
 
 %description odbc
-This package provides the ODBC driver for the apr-util DBD
+This package provides the ODBC driver for the apr DBD
 (database abstraction) interface.
 
+%package ldap
+Summary: APR library LDAP support
+BuildRequires: pkgconfig(ldap)
+Requires: apr%{?_isa} = %{version}-%{release}
+Provides: apr-%{aprver}(ldap) = %{version}-%{release}
+
+%description ldap
+This package provides the LDAP support for the apr.
+
 %package openssl
-Group: Development/Libraries
-Summary: APR utility library OpenSSL crypto support
-BuildRequires: openssl-devel
-Requires: apr-util = %{version}-%{release}
+Summary: APR library OpenSSL crypto support
+BuildRequires: pkgconfig(libcrypto)
+Requires: apr%{?_isa} = %{version}-%{release}
+Provides: apr-%{aprver}(openssl) = %{version}-%{release}
 
 %description openssl
-This package provides crypto support for apr-util based on OpenSSL.
+This package provides the OpenSSL crypto support for the apr.
 
 %package nss
-Group: Development/Libraries
-Summary: APR utility library NSS crypto support
-BuildRequires: nss-devel
-Requires: apr-util = %{version}-%{release}
+Summary: APR library NSS crypto support
+BuildRequires: pkgconfig(nss)
+Requires: apr%{?_isa} = %{version}-%{release}
+Provides: apr-%{aprver}(nss) = %{version}-%{release}
 
 %description nss
-This package provides crypto support for apr-util based on Mozilla NSS.
+This package provides the NSS crypto support for the apr.
 
 %prep
 %setup -q
 
 %build
 # regenerate configure script etc.
-./buildconf
+autoheader && autoconf
 %configure \
         --prefix=/usr \
         --includedir=%{_includedir}/apr-%{aprver} \
@@ -109,86 +121,78 @@ This package provides crypto support for
         --with-devrandom=/dev/urandom \
         --without-gdbm \
         --with-sqlite3 --with-pgsql --with-mysql --with-odbc \
-        --with-berkeley-db \
+        --with-lmdb \
         --with-crypto --with-openssl --with-nss \
-        --without-sqlite2
-        CC=gcc CXX=g++
-make %{?_smp_mflags} && make dox
-
-%check
-# Run non-interactive tests
-pushd test
-make %{?_smp_mflags} all CFLAGS=-fno-strict-aliasing
-make check || exit 1
-popd
+        --with-ldap \
+        --without-sqlite2 \
+   || { cat config.log; exit 1; }
+%{make_build}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-make install DESTDIR=$RPM_BUILD_ROOT
+%{make_install}
 
-# Move docs to more convenient location
-mv docs/dox/html html
+mkdir -p $RPM_BUILD_ROOT/%{_datadir}/aclocal
+install -m 644 build/find_apr.m4 $RPM_BUILD_ROOT/%{_datadir}/aclocal
 
-# Unpackaged files:
-rm -f $RPM_BUILD_ROOT%{_libdir}/apr.exp
+# Unpackaged files; remove the static libapr
+rm -f $RPM_BUILD_ROOT%{_libdir}/apr.exp \
+      $RPM_BUILD_ROOT%{_libdir}/libapr*.a \
+      $RPM_BUILD_ROOT%{_libdir}/libapr-%{aprver}.la
 
-%clean
-rm -rf $RPM_BUILD_ROOT
+# Remove build directory
+rm -rf $RPM_BUILD_ROOT%{_libdir}/apr
 
-%post -p /sbin/ldconfig
+%check
+# Run the less verbose test suites
+export MALLOC_CHECK_=2 MALLOC_PERTURB_=$(($RANDOM % 255 + 1))
+cd test
+%{make_build}
+export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}/apr-%{aprver}
+./testall -v -q
 
-%postun -p /sbin/ldconfig
+%ldconfig_scriptlets
 
 %files
-%defattr(-,root,root,-)
 %doc CHANGES LICENSE NOTICE
 %{_libdir}/libapr-%{aprver}.so.*
 %dir %{_libdir}/apr-%{aprver}
 
-%files dbm
-%defattr(-,root,root,-)
-%{_libdir}/apr-%{aprver}/apr_dbm_db*
+%files lmdb
+%{_libdir}/apr-%{aprver}/apr_dbm_lmdb*
 
 %files pgsql
-%defattr(-,root,root,-)
 %{_libdir}/apr-%{aprver}/apr_dbd_pgsql*
 
 %files mysql
-%defattr(-,root,root,-)
 %{_libdir}/apr-%{aprver}/apr_dbd_mysql*
 
 %files sqlite
-%defattr(-,root,root,-)
 %{_libdir}/apr-%{aprver}/apr_dbd_sqlite*
 
 %files odbc
-%defattr(-,root,root,-)
 %{_libdir}/apr-%{aprver}/apr_dbd_odbc*
 
+%files ldap
+%{_libdir}/apr-%{aprver}/apr_ldap*
+
 %files openssl
-%defattr(-,root,root,-)
 %{_libdir}/apr-%{aprver}/apr_crypto_openssl*
 
 %files nss
-%defattr(-,root,root,-)
 %{_libdir}/apr-%{aprver}/apr_crypto_nss*
 
 %files devel
-%defattr(-,root,root,-)
-%doc docs/APRDesign.html docs/canonical_filenames.html
-%doc docs/incomplete_types docs/non_apr_programs
-%doc html
-%{_bindir}/apr*config
-%{_libdir}/libapr-%{aprver}.*a
+%{_bindir}/apr-%{aprver}-config
 %{_libdir}/libapr-%{aprver}.so
-%dir %{_libdir}/apr
-%dir %{_libdir}/apr/build-%{aprver}
-%{_libdir}/apr/build-%{aprver}/*
-%{_libdir}/pkgconfig/apr-%{aprver}.pc
-%dir %{_includedir}/apr-%{aprver}
 %{_includedir}/apr-%{aprver}/*.h
+%{_libdir}/pkgconfig/*.pc
+%{_datadir}/aclocal/*.m4
 
 %changelog
+* Tue Mar 18 2025 Graham Leggett <[email protected]> 2.0.0
+- update to support v2.0.0 of APR
+
 * Sat Aug 30 2008 Graham Leggett <[email protected]> 1.3.3
 - update to depend on the bzip2 binary
 - build depends on python
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.