#!/bin/sh
echo "Name: mlsqlodbc"
echo "Summary: MarkLogic ODBC Client."
echo "Version: $1"
echo "Release: $2"
echo "License: Other License(s), see package"
echo "Group: Applications/Databases"
echo "URL: https://progress.com"
echo "Vendor: Progress Software Corporation"
echo "Prefix: /opt"
echo "AutoReqProv: no"
if ( [ "`/bin/uname -m`" = "x86_64" ] ); then
  echo "Requires: libc.so.6(GLIBC_2.4)(64bit) libgcc_s.so.1()(64bit) libstdc++.so.6()(64bit) libc.so.6(GLIBC_2.4) openssl"
else
  echo "Requires: libc.so.6(GLIBC_2.4) libgcc_s.so.1 libstdc++.so.6 openssl"
fi
echo ""
echo "%define __prelink_undo_cmd /bin/cat prelink library"
echo "%define _unpackaged_files_terminate_build 1"
echo "%description"
echo ""
echo "MarkLogic ODBC Driver is a driver for applications to access"
echo "a MarkLogic Server via ODBC (Open Database Connectivity)."
echo "It includes a command line SQL client (mlsql)."
echo ""
echo "%files"
echo "%defattr (-,root,root)"
echo "/opt/MarkLogic/templates"
echo "/opt/MarkLogic/lib/odbc"
echo "/opt/MarkLogic/bin/mlsql"
echo "/opt/MarkLogic/bin/mlodbcinst"
echo "/opt/MarkLogic/NOTICE-ODBCDRIVER.txt"
echo "%post"
echo "/opt/MarkLogic/bin/mlodbcinst -i -d -f /opt/MarkLogic/templates/mlsql_driver.template"
echo "exit 0"
echo ""
echo "%preun"
echo "#!/bin/sh"
echo "if [ -f /opt/MarkLogic/bin/mlodbcinst ]; then"
echo "/opt/MarkLogic/bin/mlodbcinst -u -d -n MarkLogicSQL"
echo "fi"
echo "exit 0"
