spec: python{2,3} %configure opts on one place

Version: 10.1-3
This commit is contained in:
Pavel Raiskup 2017-12-13 11:57:29 +01:00
parent 0a81447ee3
commit 5fbaf23499

View File

@ -63,7 +63,7 @@ Summary: PostgreSQL client programs
Name: postgresql Name: postgresql
%global majorversion 10 %global majorversion 10
Version: 10.1 Version: 10.1
Release: 2%{?dist} Release: 3%{?dist}
# The PostgreSQL license is very similar to other MIT licenses, but the OSI # The PostgreSQL license is very similar to other MIT licenses, but the OSI
# recognizes it as an independent license, so we do as well. # recognizes it as an independent license, so we do as well.
@ -425,57 +425,59 @@ export CFLAGS
# distclean and do it again for the "normal" build. Note that the installed # distclean and do it again for the "normal" build. Note that the installed
# Makefile.global will reflect the python 2 build, which seems appropriate # Makefile.global will reflect the python 2 build, which seems appropriate
# since that's still considered the default plpython version. # since that's still considered the default plpython version.
common_configure_options='
--disable-rpath
%if %beta
--enable-debug
--enable-cassert
%endif
%if %plperl
--with-perl
%endif
%if %pltcl
--with-tcl
--with-tclconfig=%_libdir
%endif
%if %ldap
--with-ldap
%endif
%if %ssl
--with-openssl
%endif
%if %pam
--with-pam
%endif
%if %kerberos
--with-krb5
--with-gssapi
%endif
%if %uuid
--with-ossp-uuid
%endif
%if %xml
--with-libxml
--with-libxslt
%endif
%if %nls
--enable-nls
%endif
%if %sdt
--enable-dtrace
%endif
%if %selinux
--with-selinux
%endif
--with-system-tzdata=%_datadir/zoneinfo
--datadir=%_datadir/pgsql
'
%if %plpython3 %if %plpython3
export PYTHON=/usr/bin/python3 export PYTHON=/usr/bin/python3
# These configure options must match main build # These configure options must match main build
%configure --disable-rpath \ %configure $common_configure_options \
%if %beta --with-python
--enable-debug \
--enable-cassert \
%endif
%if %plperl
--with-perl \
%endif
%if %pltcl
--with-tcl \
--with-tclconfig=%{_libdir} \
%endif
%if %plpython3
--with-python \
%endif
%if %ldap
--with-ldap \
%endif
%if %ssl
--with-openssl \
%endif
%if %pam
--with-pam \
%endif
%if %kerberos
--with-krb5 \
--with-gssapi \
%endif
%if %uuid
--with-ossp-uuid \
%endif
%if %xml
--with-libxml \
--with-libxslt \
%endif
%if %nls
--enable-nls \
%endif
%if %sdt
--enable-dtrace \
%endif
%if %selinux
--with-selinux \
%endif
--with-system-tzdata=%{_datadir}/zoneinfo \
--datadir=%{_datadir}/pgsql
# Fortunately we don't need to build much except plpython itself. # Fortunately we don't need to build much except plpython itself.
make %{?_smp_mflags} -C src/pl/plpython all make %{?_smp_mflags} -C src/pl/plpython all
@ -487,58 +489,15 @@ cp src/Makefile.global src/Makefile.global.python3
make distclean make distclean
%endif %endif # %%plpython3
unset PYTHON unset PYTHON
# Normal (not python3) build begins here # Normal (python2) build begins here
%configure $common_configure_options \
%configure --disable-rpath \
%if %beta
--enable-debug \
--enable-cassert \
%endif
%if %plperl
--with-perl \
%endif
%if %pltcl
--with-tcl \
--with-tclconfig=%{_libdir} \
%endif
%if %plpython %if %plpython
--with-python \ --with-python
%endif %endif
%if %ldap
--with-ldap \
%endif
%if %ssl
--with-openssl \
%endif
%if %pam
--with-pam \
%endif
%if %kerberos
--with-krb5 \
--with-gssapi \
%endif
%if %uuid
--with-ossp-uuid \
%endif
%if %xml
--with-libxml \
--with-libxslt \
%endif
%if %nls
--enable-nls \
%endif
%if %sdt
--enable-dtrace \
%endif
%if %selinux
--with-selinux \
%endif
--with-system-tzdata=%_datadir/zoneinfo \
--datadir=%_datadir/pgsql
make %{?_smp_mflags} world make %{?_smp_mflags} world
@ -1160,6 +1119,9 @@ make -C postgresql-setup-%{setup_version} check
%endif %endif
%changelog %changelog
* Wed Dec 13 2017 Pavel Raiskup <praiskup@redhat.com> - 10.1-3
- unify %%configure options for python2/python3 configure
* Tue Nov 14 2017 Pavel Raiskup <praiskup@redhat.com> - 10.1-2 * Tue Nov 14 2017 Pavel Raiskup <praiskup@redhat.com> - 10.1-2
- postgresql-setup v7.0 - postgresql-setup v7.0