Author: minfrin
Date: Thu Mar 20 14:27:44 2025
New Revision: 1924501
URL: http://svn.apache.org/viewvc?rev=1924501&view=rev
Log:
RPM spec file: modernise build for APR-util v1.7.
Modified:
apr/apr-util/branches/1.7.x/build/rpm/apr-util.spec.in
Modified: apr/apr-util/branches/1.7.x/build/rpm/apr-util.spec.in
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.7.x/build/rpm/apr-util.spec.in?rev=1924501&r1=1924500&r2=1924501&view=diff
==============================================================================
--- apr/apr-util/branches/1.7.x/build/rpm/apr-util.spec.in (original)
+++ apr/apr-util/branches/1.7.x/build/rpm/apr-util.spec.in Thu Mar 20 14:27:44 2025
@@ -4,14 +4,16 @@
Summary: Apache Portable Runtime Utility library
Name: apr-util
Version: APU_VERSION
-Release: APU_RELEASE
-License: Apache Software License
-Group: System Environment/Libraries
+Release: APU_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, apr-devel >= 1.4.0
-BuildRequires: expat-devel, libuuid-devel
+Source0: https://www.apache.org/dist/apr/%{name}-%{version}.tar.bz2
+BuildRequires: gcc
+BuildRequires: autoconf, apr-devel >= 1.3.0
+BuildRequires: pkgconfig(expat), libuuid-devel
+BuildRequires: libxcrypt-devel
+Recommends: apr-util-openssl%{_isa} = %{version}-%{release}
+Recommends: apr-util-lmdb%{_isa} = %{version}-%{release}
%description
The mission of the Apache Portable Runtime (APR) is to provide a
@@ -20,10 +22,9 @@ contains additional utility interfaces f
for XML, LDAP, database interfaces, URI parsing and more.
%package devel
-Group: Development/Libraries
Summary: APR utility library development kit
-Requires: apr-util = %{version}-%{release}, apr-devel
-Requires: db4-devel, expat-devel
+Requires: apr-util%{?_isa} = %{version}-%{release}, apr-devel%{?_isa}, pkgconfig
+Requires: pkgconfig(ldap)
%description devel
This package provides the support files which can be used to
@@ -31,167 +32,176 @@ build applications using the APR utility
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.
+%package lmdb
+Summary: APR utility library LMDB driver
+BuildRequires: pkgconfig(lmdb)
+Requires: apr-util%{?_isa} = %{version}-%{release}
+Provides: apr-%{aprver}(lmdb) = %{version}-%{release}
+
+%description lmdb
+This package provides the LMDB driver for the apr-util
+DBM (database abstraction) interface.
%package pgsql
-Group: Development/Libraries
Summary: APR utility library PostgreSQL DBD driver
-BuildRequires: postgresql-devel
-Requires: apr-util = %{version}-%{release}
+BuildRequires: pkgconfig(libpq)
+Requires: apr-util%{?_isa} = %{version}-%{release}
+Provides: apr-%{aprver}(pgsql) = %{version}-%{release}
%description pgsql
This package provides the PostgreSQL driver for the apr-util
DBD (database abstraction) interface.
%package mysql
-Group: Development/Libraries
Summary: APR utility library MySQL DBD driver
-BuildRequires: mysql-devel
-Requires: apr-util = %{version}-%{release}
+BuildRequires: pkgconfig(mariadb)
+Requires: apr-util%{?_isa} = %{version}-%{release}
+Provides: apr-%{aprver}(mysql) = %{version}-%{release}
%description mysql
This package provides the MySQL driver for the apr-util 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}
+BuildRequires: pkgconfig(sqlite3)
+Requires: apr-util%{?_isa} = %{version}-%{release}
+Provides: apr-%{aprver}(sqlite) = %{version}-%{release}
%description sqlite
This package provides the SQLite driver for the apr-util DBD
(database abstraction) interface.
%package odbc
-Group: Development/Libraries
Summary: APR utility library ODBC DBD driver
-BuildRequires: unixODBC-devel
-Requires: apr-util = %{version}-%{release}
+BuildRequires: pkgconfig(odbc)
+Requires: apr-util%{?_isa} = %{version}-%{release}
+Provides: apr-%{aprver}(odbc) = %{version}-%{release}
%description odbc
This package provides the ODBC driver for the apr-util DBD
(database abstraction) interface.
%package ldap
-Group: Development/Libraries
Summary: APR utility library LDAP support
-BuildRequires: openldap-devel
-Requires: apr-util = %{version}-%{release}
+BuildRequires: pkgconfig(ldap)
+Requires: apr-util%{?_isa} = %{version}-%{release}
+Provides: apr-%{aprver}(ldap) = %{version}-%{release}
%description ldap
This package provides the LDAP support for the apr-util.
%package openssl
-Group: Development/Libraries
Summary: APR utility library OpenSSL crypto support
-BuildRequires: openssl-devel
-Requires: apr-util = %{version}-%{release}
+BuildRequires: pkgconfig(libcrypto)
+Requires: apr-util%{?_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-util.
%package nss
-Group: Development/Libraries
Summary: APR utility library NSS crypto support
-BuildRequires: nss-devel
-Requires: apr-util = %{version}-%{release}
+BuildRequires: pkgconfig(nss)
+Requires: apr-util%{?_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-util.
%prep
-%setup -q
+%autosetup -p1
%build
+autoheader && autoconf
+# A fragile autoconf test which fails if the code trips
+# any other warning; force correct result for OpenLDAP:
+export ac_cv_ldap_set_rebind_proc_style=three
%configure --with-apr=%{_prefix} \
--includedir=%{_includedir}/apr-%{apuver} \
- --with-ldap --without-gdbm \
+ --with-ldap=ldap --without-gdbm \
--with-sqlite3 --with-pgsql --with-mysql --with-odbc \
- --with-berkeley-db \
- --with-crypto --with-openssl --with-nss \
- --without-sqlite2
-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-dbm=lmdb --with-lmdb \
+ --without-sqlite2 \
+ --with-crypto --with-openssl \
+ --with-nss \
+ || { cat config.log; exit 1; }
+%{make_build}
%install
rm -rf $RPM_BUILD_ROOT
-make install DESTDIR=$RPM_BUILD_ROOT
+%{make_install}
-# Documentation
-mv docs/dox/html html
+mkdir -p $RPM_BUILD_ROOT/%{_datadir}/aclocal
+install -m 644 build/find_apu.m4 $RPM_BUILD_ROOT/%{_datadir}/aclocal
-# Unpackaged files
-rm -f $RPM_BUILD_ROOT%{_libdir}/aprutil.exp
+# Unpackaged files; remove the static libaprutil
+rm -f $RPM_BUILD_ROOT%{_libdir}/aprutil.exp \
+ $RPM_BUILD_ROOT%{_libdir}/libapr*.a
+
+# And remove the reference to the static libaprutil from the .la
+# file.
+sed -i '/^old_library/s,libapr.*\.a,,' \
+ $RPM_BUILD_ROOT%{_libdir}/libapr*.la
+
+# Remove unnecessary exports from dependency_libs
+sed -ri '/^dependency_libs/{s,-l(pq|sqlite[0-9]|rt|dl|uuid) ,,g}' \
+ $RPM_BUILD_ROOT%{_libdir}/libapr*.la
-%clean
-rm -rf $RPM_BUILD_ROOT
+# Trim libtool DSO cruft
+rm -f $RPM_BUILD_ROOT%{_libdir}/apr-util-%{apuver}/*.*a
-%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-util-%{apuver}
+./testall -v -q
-%postun -p /sbin/ldconfig
+%ldconfig_scriptlets
%files
-%defattr(-,root,root,-)
%doc CHANGES LICENSE NOTICE
%{_libdir}/libaprutil-%{apuver}.so.*
%dir %{_libdir}/apr-util-%{apuver}
-%files dbm
-%defattr(-,root,root,-)
-%{_libdir}/apr-util-%{apuver}/apr_dbm_db*
+%files lmdb
+%{_libdir}/apr-util-%{apuver}/apr_dbm_lmdb*
%files pgsql
-%defattr(-,root,root,-)
%{_libdir}/apr-util-%{apuver}/apr_dbd_pgsql*
%files mysql
-%defattr(-,root,root,-)
%{_libdir}/apr-util-%{apuver}/apr_dbd_mysql*
%files sqlite
-%defattr(-,root,root,-)
%{_libdir}/apr-util-%{apuver}/apr_dbd_sqlite*
%files odbc
-%defattr(-,root,root,-)
%{_libdir}/apr-util-%{apuver}/apr_dbd_odbc*
%files ldap
-%defattr(-,root,root,-)
%{_libdir}/apr-util-%{apuver}/apr_ldap*
%files openssl
-%defattr(-,root,root,-)
%{_libdir}/apr-util-%{apuver}/apr_crypto_openssl*
%files nss
-%defattr(-,root,root,-)
%{_libdir}/apr-util-%{apuver}/apr_crypto_nss*
%files devel
-%defattr(-,root,root,-)
%{_bindir}/apu-%{apuver}-config
-%{_libdir}/libaprutil-%{apuver}.*a
+%{_libdir}/libaprutil-%{apuver}.la
%{_libdir}/libaprutil-%{apuver}.so
-%{_libdir}/pkgconfig/apr-util-%{apuver}.pc
%{_includedir}/apr-%{apuver}/*.h
-%doc html
+%{_libdir}/pkgconfig/*.pc
+%{_datadir}/aclocal/*.m4
%changelog
+* Wed Mar 19 2025 Graham Leggett <[email protected]> 1.7.0-1
+- update to support v1.7.0 of APR
+
* Tue Jun 22 2004 Graham Leggett <[email protected]> 1.0.0-1
- update to support v1.0.0 of APR
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.