From f207895b40a2d5cc08cc49299acbc315b83ca43b Mon Sep 17 00:00:00 2001 From: "Ralf S. Engelschall" Date: Sun, 23 Mar 2008 08:44:50 +0000 Subject: [PATCH] link into ODBC also on upgrades --- postgresql/postgresql.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/postgresql/postgresql.spec b/postgresql/postgresql.spec index 209c5d7daa..a214b748eb 100644 --- a/postgresql/postgresql.spec +++ b/postgresql/postgresql.spec @@ -46,7 +46,7 @@ Class: BASE Group: Database License: GPL Version: %{V_postgresql} -Release: 20080318 +Release: 20080323 # package options %option with_server yes @@ -693,16 +693,19 @@ AutoReqProv: no echo "After this the user will be able to connect to his RDBMS with:" echo " \$ $RPM_INSTALL_PREFIX/bin/psql" ) | %{l_rpmtool} msg -b -t notice + fi - # optionally link into ODBC %if "%{with_odbc}" == "yes" + # optionally link into ODBC + if ! $RPM_INSTALL_PREFIX/bin/odbcinst -q -d -n "PostgreSQL" >/dev/null 2>&1; then ( echo "[PostgreSQL]" echo "Description = PostgreSQL ODBC driver" echo "Driver = $RPM_INSTALL_PREFIX/lib/psqlodbc.so" echo "Threading = 2" ) | $RPM_INSTALL_PREFIX/bin/odbcinst -i -d -r -n "PostgreSQL" -%endif fi +%endif + if [ $1 -eq 2 ]; then # after upgrade, restore status { eval `cat %{l_tmpfile}`; rm -f %{l_tmpfile}; true; } >/dev/null 2>&1