From 5fbaf23499fa60ad03f53dc8df051f435f312ddc Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Wed, 13 Dec 2017 11:57:29 +0100 Subject: [PATCH] spec: python{2,3} %configure opts on one place Version: 10.1-3 --- postgresql.spec | 150 ++++++++++++++++++------------------------------ 1 file changed, 56 insertions(+), 94 deletions(-) diff --git a/postgresql.spec b/postgresql.spec index 9997f09..e0dcaa1 100644 --- a/postgresql.spec +++ b/postgresql.spec @@ -63,7 +63,7 @@ Summary: PostgreSQL client programs Name: postgresql %global majorversion 10 Version: 10.1 -Release: 2%{?dist} +Release: 3%{?dist} # The PostgreSQL license is very similar to other MIT licenses, but the OSI # 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 # Makefile.global will reflect the python 2 build, which seems appropriate # 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 export PYTHON=/usr/bin/python3 # These configure options must match main build -%configure --disable-rpath \ -%if %beta - --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 +%configure $common_configure_options \ + --with-python # Fortunately we don't need to build much except plpython itself. make %{?_smp_mflags} -C src/pl/plpython all @@ -487,58 +489,15 @@ cp src/Makefile.global src/Makefile.global.python3 make distclean -%endif +%endif # %%plpython3 unset PYTHON -# Normal (not python3) build begins here - -%configure --disable-rpath \ -%if %beta - --enable-debug \ - --enable-cassert \ -%endif -%if %plperl - --with-perl \ -%endif -%if %pltcl - --with-tcl \ - --with-tclconfig=%{_libdir} \ -%endif +# Normal (python2) build begins here +%configure $common_configure_options \ %if %plpython - --with-python \ + --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 make %{?_smp_mflags} world @@ -1160,6 +1119,9 @@ make -C postgresql-setup-%{setup_version} check %endif %changelog +* Wed Dec 13 2017 Pavel Raiskup - 10.1-3 +- unify %%configure options for python2/python3 configure + * Tue Nov 14 2017 Pavel Raiskup - 10.1-2 - postgresql-setup v7.0