From 961c84de0135589387bec7b8175f9f078a52eefc Mon Sep 17 00:00:00 2001 From: linggao Date: Thu, 16 Jul 2009 17:42:22 +0000 Subject: [PATCH] more changes for ODBC build for AIX --- AIX/mysql-connector-odbc/Build-notes | 8 ++++---- .../mysql-connector-odbc.spec | 17 ++++++++++------- AIX/unixODBC/Build-notes | 2 +- AIX/unixODBC/unixODBC.spec | 15 +++++++-------- 4 files changed, 22 insertions(+), 20 deletions(-) diff --git a/AIX/mysql-connector-odbc/Build-notes b/AIX/mysql-connector-odbc/Build-notes index 80838fd..344896d 100644 --- a/AIX/mysql-connector-odbc/Build-notes +++ b/AIX/mysql-connector-odbc/Build-notes @@ -1,11 +1,11 @@ Build Notes -Download mysql-connector-odbc-3.51.27-aix5.3-powerpc-64bit.tar.gz. +Download mysql-connector-odbc-3.51.27-aix5.3-powerpc-32bit.tar.gz. (See http://dev.mysql.com/downloads/connector/odbc/3.51.html#aix) - AIX 5.3 power 64-bit + AIX 5.3 power 32-bit Copy the gz file to the SOURCES directory. -cp mysql-connector-odbc-3.51.27-aix5.3-powerpc-64bit.tar.gz /opt/freeware/src/packages/SOURCES +cp mysql-connector-odbc-3.51.27-aix5.3-powerpc-32bit.tar.gz /opt/freeware/src/packages/SOURCES Remove any old RPMs rm -f /opt/freeware/src/packages/SRPMS/mysql-connector*rpm /opt/freeware/src/packages/RPMS/ppc/mysql-connector*rpm @@ -17,5 +17,5 @@ a different version etc. rpm -ba mysql-connector-odbc.spec Creates: -/opt/freeware/src/packages/RPMS/ppc/mysql-connector-odbc-3.51.27-64bit.aix5.3.ppc.rpm +/opt/freeware/src/packages/RPMS/ppc/mysql-connector-odbc-3.51.27-32bit.aix5.3.ppc.rpm diff --git a/AIX/mysql-connector-odbc/mysql-connector-odbc.spec b/AIX/mysql-connector-odbc/mysql-connector-odbc.spec index 1bebf2f..0fe8893 100644 --- a/AIX/mysql-connector-odbc/mysql-connector-odbc.spec +++ b/AIX/mysql-connector-odbc/mysql-connector-odbc.spec @@ -1,7 +1,7 @@ Summary: Package for MySQL Connector/ODBC on AIX Name: mysql-connector-odbc Version: 3.51.27 -Release: 64bit +Release: 32bit License: GPL Group: Applications/System Vendor: MySQL @@ -10,26 +10,27 @@ Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}} Prefix: / BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root BuildArch: ppc -Source: mysql-connector-odbc-3.51.27-aix5.3-powerpc-64bit.tar.gz +Source: mysql-connector-odbc-3.51.27-aix5.3-powerpc-32bit.tar.gz Provides: mysql-connector-odbc = %{version} %description -MySQL Connector/ODBC 3.51.27 on AIX systems (64-bit). +MySQL Connector/ODBC 3.51.27 on AIX systems. %prep -%setup -q -n mysql-connector-odbc-3.51.27-aix5.3-powerpc-64bit +%setup -q -n mysql-connector-odbc-3.51.27-aix5.3-powerpc-32bit %build %install mkdir -p $RPM_BUILD_ROOT/usr/local/bin mkdir -p $RPM_BUILD_ROOT/usr/local/lib +mkdir -p $RPM_BUILD_ROOT/usr/lib mkdir -p $RPM_BUILD_ROOT/usr/share/doc/mysql-connector-odbc-3.51.27 cp bin/* $RPM_BUILD_ROOT/usr/local/bin -#chmod 755 $RPM_BUILD_ROOT/usr/local/bin/* +chmod 755 $RPM_BUILD_ROOT/usr/local/bin/* cp lib/* $RPM_BUILD_ROOT/usr/local/lib -#chmod 755 $RPM_BUILD_ROOT/usr/local/lib/* +chmod 755 $RPM_BUILD_ROOT/usr/local/lib/* cp ChangeLog $RPM_BUILD_ROOT/usr/share/doc/mysql-connector-odbc-3.51.27 cp INSTALL $RPM_BUILD_ROOT/usr/share/doc/mysql-connector-odbc-3.51.27 cp LICENSE.exceptions $RPM_BUILD_ROOT/usr/share/doc/mysql-connector-odbc-3.51.27 @@ -37,6 +38,8 @@ cp LICENSE.gpl $RPM_BUILD_ROOT/usr/share/doc/mysql-connector-odbc-3.51.27 cp README $RPM_BUILD_ROOT/usr/share/doc/mysql-connector-odbc-3.51.27 cp README.debug $RPM_BUILD_ROOT/usr/share/doc/mysql-connector-odbc-3.51.27 #chmod 644 $RPM_BUILD_ROOT/usr/share/doc/mysql-connector-odbc-3.51.27/* +cd $RPM_BUILD_ROOT/usr/lib +ln -s -f ../local/lib/libmyodbc3.so %post @@ -47,4 +50,4 @@ cp README.debug $RPM_BUILD_ROOT/usr/share/doc/mysql-connector-odbc-3.51.27 /usr/local/lib /usr/local/bin /usr/share/doc/mysql-connector-odbc-3.51.27 - +/usr/lib diff --git a/AIX/unixODBC/Build-notes b/AIX/unixODBC/Build-notes index 49ca0bb..a4cb580 100644 --- a/AIX/unixODBC/Build-notes +++ b/AIX/unixODBC/Build-notes @@ -52,4 +52,4 @@ want to use a different version etc. rpm -ba unixODBC.spec Creates: -/opt/freeware/src/packages/RPMS/ppc/unixODBC-2.2.15-pre.aix5.3.ppc.rpm +/opt/freeware/src/packages/RPMS/ppc/unixODBC-2.2.15-32bit.aix5.3.ppc.rpm diff --git a/AIX/unixODBC/unixODBC.spec b/AIX/unixODBC/unixODBC.spec index 6d70cab..c1b66a4 100644 --- a/AIX/unixODBC/unixODBC.spec +++ b/AIX/unixODBC/unixODBC.spec @@ -1,7 +1,7 @@ Summary: Metapackage for unixODBC on AIX Name: unixODBC Version: 2.2.15 -Release: pre +Release: 32bit License: LGPL Group: Applications/System Vendor: unixODBC @@ -27,21 +27,19 @@ cp %{SOURCE1} $RPM_BUILD_ROOT/ cd $RPM_BUILD_ROOT gunzip -f unixODBC-2.2.15pre-aix-ppc.tar.gz tar -xf unixODBC-2.2.15pre-aix-ppc.tar +mkdir -p usr/lib cd usr/local/lib ln -s libodbcinst.so.1 libodbcinst.so ln -s libodbccr.so.1 libodbccr.so ln -s libodbc.so.1 libodbc.so +cd $RPM_BUILD_ROOT/usr/lib +ln -s ../local/lib/libodbc.so.1 libodbc.so +ln -s ../local/lib/libodbcinst.so.1 libodbcinst.so +ln -s ../local/lib/libodbccr.so.1 libodbccr.so %post -cd /usr/local/lib -ln -s /usr/local/lib/libodbc.so.1 /usr/lib/libodbc.so -ln -s /usr/local/lib/libodbcinst.so.1 /usr/lib/libodbcinst.so -ln -s /usr/local/lib/libodbccr.so.1 /usr/lib/libodbccr.so %postun -rm /usr/lib/libodbc.so -rm /usr/lib/libodbcinst.so -rm /usr/lib/libodbccr.so %clean @@ -51,3 +49,4 @@ rm /usr/lib/libodbccr.so /etc/odbcinst.ini /usr/local/lib /usr/local/bin +/usr/lib