List:Commits« Previous MessageNext Message »
From:kboortz Date:June 20 2007 11:36am
Subject:Connector/ODBC 3.51 commit: r524 - in trunk: . scripts
View as plain text  
Modified:
   trunk/configure.in
   trunk/qt.m4
   trunk/scripts/Makefile.am
   trunk/scripts/makerpm.sh
   trunk/scripts/myodbc3.spec.sh
Log:
Changed the RPM spec to create a separate "setup" RPM, that contains
the setup lib, the configuration dialogs. [Mads did the real work]


Modified: trunk/configure.in
===================================================================
--- trunk/configure.in	2007-06-19 19:42:50 UTC (rev 523)
+++ trunk/configure.in	2007-06-20 09:36:29 UTC (rev 524)
@@ -531,8 +531,8 @@
                        [Define path to system ODBC.INI file])
   fi
 
-  ODBC_DM_PATH="--with-iodbc=$iodbc"
-  AC_SUBST(ODBC_DM_PATH)
+  ODBC_DM_PATH_ARG="--with-iodbc=$iodbc"
+  AC_SUBST(ODBC_DM_PATH_ARG)
 
 else
 # unixODBC
@@ -580,8 +580,8 @@
                        [Define path to system ODBC.INI file])
   fi
 
-  ODBC_DM_PATH="--with-unixODBC=$unixODBC"
-  AC_SUBST(ODBC_DM_PATH)
+  ODBC_DM_PATH_ARG="--with-unixODBC=$unixODBC"
+  AC_SUBST(ODBC_DM_PATH_ARG)
 
   ODBC_DM_LIB="-lodbc"
   AC_SUBST(ODBC_DM_LIB)

Modified: trunk/qt.m4
===================================================================
--- trunk/qt.m4	2007-06-19 19:42:50 UTC (rev 523)
+++ trunk/qt.m4	2007-06-20 09:36:29 UTC (rev 524)
@@ -65,7 +65,9 @@
       qt_includes="$withval"/include
       qt_libraries="$withval"/lib
       qt_programs="$withval"/bin
+      QT_PATH_ARG="--with-qt-dir=$qt_dir"
     ])
+  AC_SUBST(QT_PATH_ARG)
   AC_ARG_WITH([qt_includes], AC_HELP_STRING([--with-qt-includes=DIR],
                              [where the Qt includes are installed]),
     [qt_includes="$withval"])

Modified: trunk/scripts/Makefile.am
===================================================================
--- trunk/scripts/Makefile.am	2007-06-19 19:42:50 UTC (rev 523)
+++ trunk/scripts/Makefile.am	2007-06-20 09:36:29 UTC (rev 524)
@@ -38,8 +38,9 @@
 	-e 's!@''VERSION''@!@VERSION@!' \
 	-e 's!@''MACHINE_TYPE''@!@MACHINE_TYPE@!' \
 	-e 's!@''SYSTEM_TYPE''@!@SYSTEM_TYPE@!' \
-	-e 's!@''ODBC_DM_PATH''@!@ODBC_DM_PATH@!' \
+	-e 's!@''ODBC_DM_PATH_ARG''@!@ODBC_DM_PATH_ARG@!' \
 	-e 's!@''MYSQL_PATH_ARG''@!@MYSQL_PATH_ARG@!' \
+	-e 's!@''QT_PATH_ARG''@!@QT_PATH_ARG@!' \
 	$< > $@-t
 	chmod +x $@-t
 	mv $@-t $@

Modified: trunk/scripts/makerpm.sh
===================================================================
--- trunk/scripts/makerpm.sh	2007-06-19 19:42:50 UTC (rev 523)
+++ trunk/scripts/makerpm.sh	2007-06-20 09:36:29 UTC (rev 524)
@@ -11,7 +11,7 @@
     --prefix=${RPM_BUILD_ROOT}%{prefix} \
     --with-mysql-libs=%{MYSQL_LIBS} \
     --with-mysql-includes=%{MYSQL_INCLUDES} \
-    ${ODBC_DM_PATH} \
+    ${ODBC_DM_PATH_ARG} \
     --enable-shared=yes \
     --enable-static=yes \
     --without-debug
@@ -37,7 +37,7 @@
   exit 1
 fi
 
-ODBC_DM_PATH="@ODBC_DM_PATH@"
+ODBC_DM_PATH_ARG="@ODBC_DM_PATH_ARG@"
 MYSQL_LIBS="@MYSQL_USED_LIB_PATH@"
 MYSQL_INCLUDES="@MYSQL_USED_INCLUDE_PATH@"
 MyODBC_ROOT=`pwd`

Modified: trunk/scripts/myodbc3.spec.sh
===================================================================
--- trunk/scripts/myodbc3.spec.sh	2007-06-19 19:42:50 UTC (rev 523)
+++ trunk/scripts/myodbc3.spec.sh	2007-06-20 09:36:29 UTC (rev 524)
@@ -1,6 +1,8 @@
+##############################################################################
 #
-# mysql-connector-odbc 3.51 RPM spec 
+# mysql-connector-odbc 3.51 RPM specification
 #
+##############################################################################
 
 # You can control the license file to include building like
 # "rpmbuild --with commercial" or "rpm --define '_with_commercial 1'"
@@ -9,18 +11,24 @@
 %{?_with_commercial:%define com_lic 1}
 %{!?_with_commercial:%define com_lic 0}
 
-%define myodbc_version @VERSION@
-%define release 0
+%define no_odbc_gui 0
 
+##############################################################################
+#
+#  Main information section
+#
+##############################################################################
+
 %if %{com_lic}
 Name:       mysql-connector-odbc-commercial
 %else
 Name:       mysql-connector-odbc
 %endif
-Summary:    An ODBC 3.51 driver for MySQL
+Summary:    An ODBC 3.51 driver for MySQL - driver package
 Group:      Applications/Databases
-Version:    %{myodbc_version}
-Release:    %{release}
+Version:    @VERSION@
+Release:    0
+Provides:   mysqlodbcrpmpack
 %if %{com_lic}
 Copyright:  Commercial
 %else
@@ -28,69 +36,130 @@
 %endif
 Source0:    %{name}-%{version}.tar.gz
 URL:        http://www.mysql.com/
-Vendor:	    MySQL AB
+Vendor:     MySQL AB
 Packager:   MySQL Production Engineering Team <build@stripped>
 
-# Think about what you use here since the first step is to
-# run a rm -rf
-BuildRoot:	%{_tmppath}/%{name}-%{version}-build
+BuildRoot:  %{_tmppath}/%{name}-%{version}-build
 
-# From the manual
+%if %{no_odbc_gui}
+%else
+%package setup
+Summary:    An ODBC 3.51 driver for MySQL - setup library
+Group:      Application/Databases
+Requires:   mysqlodbcrpmpack
+%endif
+
+##############################################################################
+#
+#  Documentation
+#
+##############################################################################
+
 %description
-mysql-connector-odbc is an ODBC (3.50) level 0 (with level 1 and level 2 features)
-driver for connecting an ODBC-aware application to MySQL. mysql-connector-odbc 
-works on Windows NT/2000/XP, and most Unix platforms (incl. OSX and Linux).
+mysql-connector-odbc is an ODBC (3.50) level 0 (with level 1 and level
+2 features) driver for connecting an ODBC-aware application to MySQL.
+mysql-connector-odbc  works on Windows NT/2000/XP/2003, and most Unix
+platforms (incl. OSX and Linux).
 
-mysql-connector-odbc 3.51 is an enhanced version of MyODBC 2.50 to meet ODBC 3.5 
-specification. The driver is commonly referred to as 'MySQL ODBC 3.51 Driver'.
+mysql-connector-odbc 3.51 is an enhanced version of MyODBC 2.50 to meet
+ODBC 3.5 specification. The driver is commonly referred to as
+'MySQL ODBC 3.51 Driver'.
 
+%description setup
+The setup library for the MySQL ODBC package, handles the optional GUI
+dialog for configuring the driver.
+
+##############################################################################
+#
+#  Build
+#
+##############################################################################
+
 %prep
-%setup -n %{name}-%{version}
+%setup
 
-%define ODBC_DM_PATH @ODBC_DM_PATH@
-%define MYSQL_PATH_ARG  @MYSQL_PATH_ARG@
+%define ODBC_DM_PATH_ARG @ODBC_DM_PATH_ARG@
+%define MYSQL_PATH_ARG   @MYSQL_PATH_ARG@
+%define QT_PATH_ARG      @QT_PATH_ARG@
+%define EXTRA_XLIBS      @EXTRA_XLIBS@
 
 %build
 ./configure \
     --prefix=%{_prefix} \
     --libdir=%{_libdir} \
     --enable-dmlink \
+%if %{no_odbc_gui}
     --disable-gui \
+%else
+    %{QT_PATH_ARG} \
+    --with-extra-xlibs='%{EXTRA_XLIBS}' \
+%endif
     --with-separate-debug-driver \
-    %{ODBC_DM_PATH} \
+    %{ODBC_DM_PATH_ARG} \
     %{MYSQL_PATH_ARG} \
     --without-debug
 make
 
+##############################################################################
+#
+#  Cleanup
+#
+##############################################################################
+
 %clean 
 [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
 
+##############################################################################
+#
+#  Install and deinstall scripts
+#
+##############################################################################
+
+# ----------------------------------------------------------------------
+# Install, but remove the doc files.
+# The way %doc <file-without-path> works, we can't
+# have these files installed
+# ----------------------------------------------------------------------
+
 %install
 make DESTDIR=$RPM_BUILD_ROOT install
-# The way %doc <file-without-path> works, we can't
-# have these files installed
 rm -v $RPM_BUILD_ROOT%{_datadir}/mysql-connector-odbc/{ChangeLog,README,README.debug}
 
-#
+# ----------------------------------------------------------------------
 # REGISTER DRIVER
-#   Hard-coded path here makes this package non-relocatable.
-#
-%post
-myodbc3i -w0 -a -d -t"MySQL ODBC 3.51
Driver;DRIVER=%{_libdir}/libmyodbc3.so;SETUP=%{_libdir}/libmyodbc3S.so"
+# ----------------------------------------------------------------------
 
-#
+%post 
+myodbc3i -a -d -t"MySQL ODBC 3.51 Driver;DRIVER={_libdir}/libmyodbc3.so"
+
+%post setup
+myodbc3i -a -e -t"MySQL ODBC 3.51
Driver;DRIVER={_libdir}/libmyodbc3.so;SETUP={_libdir}/libmyodbc3S.so"
+
+# ----------------------------------------------------------------------
 # DEREGISTER DRIVER 
-#   We simply orphan any related DSNs.
-#
+# ----------------------------------------------------------------------
+
+# Removing the driver package, we simply orphan any related DSNs
 %preun
-myodbc3i -w0 -r -d -n"MySQL ODBC 3.51 Driver"
+myodbc3i -r -d -n"MySQL ODBC 3.51 Driver"
 
+# Removing the setup RPM, downgrade the registration
+%preun setup
+myodbc3i -a -d -t"MySQL ODBC 3.51 Driver;DRIVER={_libdir}/libmyodbc3.so"
+
+##############################################################################
+#
+#  Listing of files to be in the package
+#
+##############################################################################
+
 %files 
 %defattr(-,root,root)
-%attr(755, root, root) %{_bindir}/myodbc3i
-%attr(755, root, root) %{_bindir}/myodbc3m
-%attr(644, root, root) %{_libdir}/libmyodbc3*
-
+%{_bindir}/myodbc3i
+%{_bindir}/myodbc3m
+%{_libdir}/libmyodbc3.*
+%{_libdir}/libmyodbc3-*
+%{_libdir}/libmyodbc3_*
 %doc ChangeLog README README.debug
 %if %{com_lic}
 %doc LICENSE.commercial
@@ -98,3 +167,8 @@
 %doc LICENSE.gpl
 %doc LICENSE.exceptions
 %endif
+
+%files setup
+%{_libdir}/libmyodbc3S*
+
+##############################################################################

Thread
Connector/ODBC 3.51 commit: r524 - in trunk: . scriptskboortz20 Jun