add build conditionals for python2, python3 and kwallet
This commit is contained in:
parent
f71da83290
commit
0006eb7232
@ -7,25 +7,30 @@
|
|||||||
%global with_java 1
|
%global with_java 1
|
||||||
%global make_check 1
|
%global make_check 1
|
||||||
%endif
|
%endif
|
||||||
%define with_kwallet 1
|
|
||||||
|
%bcond_without kwallet
|
||||||
|
%bcond_without python2
|
||||||
|
%bcond_with python3
|
||||||
|
|
||||||
|
%if %{with python2} == %{with python3}
|
||||||
|
%error Pick exactly one Python version
|
||||||
|
%endif
|
||||||
|
|
||||||
# set JDK path to build javahl; default for JPackage
|
# set JDK path to build javahl; default for JPackage
|
||||||
%define jdk_path /usr/lib/jvm/java
|
%define jdk_path /usr/lib/jvm/java
|
||||||
|
|
||||||
%define perl_vendorarch %(eval "`%{__perl} -V:installvendorarch`"; echo $installvendorarch)
|
%define perl_vendorarch %(eval "`%{__perl} -V:installvendorarch`"; echo $installvendorarch)
|
||||||
|
|
||||||
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
%if %{with python2}
|
||||||
|
%global svn_python_sitearch %{python2_sitearch}
|
||||||
%{!?_httpd_apxs: %{expand: %%global _httpd_apxs %%{_sbindir}/apxs}}
|
%else
|
||||||
%{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn 2>/dev/null || echo 0-0)}}
|
%global svn_python_sitearch %{python3_sitearch}
|
||||||
%{!?_httpd_confdir: %{expand: %%global _httpd_confdir %%{_sysconfdir}/httpd/conf.d}}
|
%endif
|
||||||
# /etc/httpd/conf.d with httpd < 2.4 and defined as /etc/httpd/conf.modules.d with httpd >= 2.4
|
|
||||||
%{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}}
|
|
||||||
|
|
||||||
Summary: A Modern Concurrent Version Control System
|
Summary: A Modern Concurrent Version Control System
|
||||||
Name: subversion
|
Name: subversion
|
||||||
Version: 1.9.7
|
Version: 1.9.7
|
||||||
Release: 6%{?dist}
|
Release: 7%{?dist}
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
Group: Development/Tools
|
Group: Development/Tools
|
||||||
URL: https://subversion.apache.org/
|
URL: https://subversion.apache.org/
|
||||||
@ -44,7 +49,7 @@ Patch3: subversion-1.9.4-kwallet.patch
|
|||||||
Patch4: subversion-1.8.0-rubybind.patch
|
Patch4: subversion-1.8.0-rubybind.patch
|
||||||
Patch5: subversion-1.8.5-swigplWall.patch
|
Patch5: subversion-1.8.5-swigplWall.patch
|
||||||
|
|
||||||
BuildRequires: autoconf, libtool, python2, python2-devel, texinfo, which
|
BuildRequires: autoconf, libtool, texinfo, which
|
||||||
BuildRequires: libdb-devel >= 4.1.25, swig >= 1.3.24, gettext
|
BuildRequires: libdb-devel >= 4.1.25, swig >= 1.3.24, gettext
|
||||||
BuildRequires: apr-devel >= 1.3.0, apr-util-devel >= 1.3.0
|
BuildRequires: apr-devel >= 1.3.0, apr-util-devel >= 1.3.0
|
||||||
BuildRequires: libserf-devel >= 1.3.0, cyrus-sasl-devel
|
BuildRequires: libserf-devel >= 1.3.0, cyrus-sasl-devel
|
||||||
@ -61,7 +66,7 @@ Requires: subversion-libs%{?_isa} = %{version}-%{release}
|
|||||||
%define __perl_requires %{SOURCE3}
|
%define __perl_requires %{SOURCE3}
|
||||||
|
|
||||||
# Put Python bindings in site-packages
|
# Put Python bindings in site-packages
|
||||||
%define swigdirs swig_pydir=%{python_sitearch}/libsvn swig_pydir_extra=%{python_sitearch}/svn
|
%define swigdirs swig_pydir=%{svn_python_sitearch}/libsvn swig_pydir_extra=%{svn_python_sitearch}/svn
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Subversion is a concurrent version control system which enables one
|
Subversion is a concurrent version control system which enables one
|
||||||
@ -83,18 +88,32 @@ Conflicts: libserf%{?_isa} < 1.3.0
|
|||||||
The subversion-libs package includes the essential shared libraries
|
The subversion-libs package includes the essential shared libraries
|
||||||
used by the Subversion version control tools.
|
used by the Subversion version control tools.
|
||||||
|
|
||||||
|
%if %{with python2}
|
||||||
%package -n python2-subversion
|
%package -n python2-subversion
|
||||||
%{?python_provide:%python_provide python2-subversion}
|
%{?python_provide:%python_provide python2-subversion}
|
||||||
# Remove before F30
|
# Remove before F30
|
||||||
Provides: %{name}-python = %{version}-%{release}
|
Provides: %{name}-python = %{version}-%{release}
|
||||||
Provides: %{name}-python%{?_isa} = %{version}-%{release}
|
Provides: %{name}-python%{?_isa} = %{version}-%{release}
|
||||||
Obsoletes: %{name}-python < %{version}-%{release}
|
Obsoletes: %{name}-python < %{version}-%{release}
|
||||||
|
BuildRequires: python2, python2-devel
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Summary: Python bindings for Subversion Version Control system
|
Summary: Python bindings for Subversion Version Control system
|
||||||
|
|
||||||
%description -n python2-subversion
|
%description -n python2-subversion
|
||||||
The subversion-python package includes the Python bindings to the
|
The python2-subversion package includes the Python 2.x bindings to the
|
||||||
Subversion libraries.
|
Subversion libraries.
|
||||||
|
%else
|
||||||
|
|
||||||
|
%package -n python3-subversion
|
||||||
|
%{?python_provide:%python_provide python3-subversion}
|
||||||
|
Group: Development/Libraries
|
||||||
|
Summary: Python bindings for Subversion Version Control system
|
||||||
|
BuildRequires: python3, python3-devel
|
||||||
|
|
||||||
|
%description -n python3-subversion
|
||||||
|
The python3-subversion package includes the Python 3.x bindings to the
|
||||||
|
Subversion libraries.
|
||||||
|
%endif
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Group: Development/Tools
|
Group: Development/Tools
|
||||||
@ -116,7 +135,7 @@ BuildRequires: libgnome-keyring-devel, dbus-devel
|
|||||||
The subversion-gnome package adds support for storing Subversion
|
The subversion-gnome package adds support for storing Subversion
|
||||||
passwords in the GNOME Keyring.
|
passwords in the GNOME Keyring.
|
||||||
|
|
||||||
%if %{with_kwallet}
|
%if %{with kwallet}
|
||||||
%package kde
|
%package kde
|
||||||
Group: Development/Tools
|
Group: Development/Tools
|
||||||
Summary: KDE Wallet support for Subversion
|
Summary: KDE Wallet support for Subversion
|
||||||
@ -215,7 +234,12 @@ export EXTRA_CFLAGS="$RPM_OPT_FLAGS -DSVN_SQLITE_MIN_VERSION_NUMBER=3007012 \
|
|||||||
-DSVN_SQLITE_MIN_VERSION=\\\"3.7.12\\\""
|
-DSVN_SQLITE_MIN_VERSION=\\\"3.7.12\\\""
|
||||||
export APACHE_LDFLAGS="-Wl,-z,relro,-z,now"
|
export APACHE_LDFLAGS="-Wl,-z,relro,-z,now"
|
||||||
export CC=gcc CXX=g++ JAVA_HOME=%{jdk_path}
|
export CC=gcc CXX=g++ JAVA_HOME=%{jdk_path}
|
||||||
|
|
||||||
|
%if %{with python2}
|
||||||
export PYTHON=/usr/bin/python2
|
export PYTHON=/usr/bin/python2
|
||||||
|
%else
|
||||||
|
export PYTHON=/usr/bin/python3
|
||||||
|
%endif
|
||||||
|
|
||||||
%configure --with-apr=%{_prefix} --with-apr-util=%{_prefix} \
|
%configure --with-apr=%{_prefix} --with-apr-util=%{_prefix} \
|
||||||
--disable-debug \
|
--disable-debug \
|
||||||
@ -231,7 +255,7 @@ export PYTHON=/usr/bin/python2
|
|||||||
--enable-javahl \
|
--enable-javahl \
|
||||||
--with-junit=%{_prefix}/share/java/junit.jar \
|
--with-junit=%{_prefix}/share/java/junit.jar \
|
||||||
%endif
|
%endif
|
||||||
%if %{with_kwallet}
|
%if %{with kwallet}
|
||||||
--with-kwallet \
|
--with-kwallet \
|
||||||
%endif
|
%endif
|
||||||
--with-berkeley-db || (cat config.log; exit 1)
|
--with-berkeley-db || (cat config.log; exit 1)
|
||||||
@ -269,7 +293,7 @@ install -p -m 644 10-subversion.conf ${RPM_BUILD_ROOT}%{_httpd_modconfdir}
|
|||||||
|
|
||||||
# Remove unpackaged files
|
# Remove unpackaged files
|
||||||
rm -rf ${RPM_BUILD_ROOT}%{_includedir}/subversion-*/*.txt \
|
rm -rf ${RPM_BUILD_ROOT}%{_includedir}/subversion-*/*.txt \
|
||||||
${RPM_BUILD_ROOT}%{python_sitearch}/*/*.{a,la}
|
${RPM_BUILD_ROOT}%{svn_python_sitearch}/*/*.{a,la}
|
||||||
|
|
||||||
# The SVN build system is broken w.r.t. DSO support; it treats
|
# The SVN build system is broken w.r.t. DSO support; it treats
|
||||||
# normal libraries as DSOs and puts them in $libdir, whereas they
|
# normal libraries as DSOs and puts them in $libdir, whereas they
|
||||||
@ -429,19 +453,27 @@ make check-javahl
|
|||||||
%if %{with_java}
|
%if %{with_java}
|
||||||
%{_libdir}/libsvnjavahl-*.so
|
%{_libdir}/libsvnjavahl-*.so
|
||||||
%endif
|
%endif
|
||||||
%if %{with_kwallet}
|
%if %{with kwallet}
|
||||||
%exclude %{_libdir}/libsvn_auth_kwallet*
|
%exclude %{_libdir}/libsvn_auth_kwallet*
|
||||||
%endif
|
%endif
|
||||||
%exclude %{_libdir}/libsvn_auth_gnome*
|
%exclude %{_libdir}/libsvn_auth_gnome*
|
||||||
|
|
||||||
|
%if %{with python2}
|
||||||
%files -n python2-subversion
|
%files -n python2-subversion
|
||||||
%{python_sitearch}/svn
|
%{python2_sitearch}/svn
|
||||||
%{python_sitearch}/libsvn
|
%{python2_sitearch}/libsvn
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
|
%files -n python3-subversion
|
||||||
|
%{python3_sitearch}/svn
|
||||||
|
%{python3_sitearch}/libsvn
|
||||||
|
%endif
|
||||||
|
|
||||||
%files gnome
|
%files gnome
|
||||||
%{_libdir}/libsvn_auth_gnome_keyring-*.so.*
|
%{_libdir}/libsvn_auth_gnome_keyring-*.so.*
|
||||||
|
|
||||||
%if %{with_kwallet}
|
%if %{with kwallet}
|
||||||
%files kde
|
%files kde
|
||||||
%{_libdir}/libsvn_auth_kwallet-*.so.*
|
%{_libdir}/libsvn_auth_kwallet-*.so.*
|
||||||
%endif
|
%endif
|
||||||
@ -477,6 +509,9 @@ make check-javahl
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Mar 27 2018 Joe Orton <jorton@redhat.com> - 1.9.7-7
|
||||||
|
- add build conditionals for python2, python3 and kwallet
|
||||||
|
|
||||||
* Thu Feb 8 2018 Joe Orton <jorton@redhat.com> - 1.9.7-6
|
* Thu Feb 8 2018 Joe Orton <jorton@redhat.com> - 1.9.7-6
|
||||||
- force use of Python2 in test suite
|
- force use of Python2 in test suite
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user