2
0
mirror of https://github.com/xcat2/xcat-dep.git synced 2024-11-21 17:11:45 +00:00

modified unixODBC build process for AIX

This commit is contained in:
linggao 2009-07-16 03:39:16 +00:00
parent b9d2a5d1d5
commit f5b445d6ac
3 changed files with 56 additions and 22 deletions

View File

@ -1,16 +1,46 @@
Build Notes
Download unixODBC-2.2.14-aix-ppc-64.tar.gz.
(See http://sourceforge.net/projects/unixodbc/
Select Download - green box
Click on package unixODBC on 2.2.14 line. Then choose
unixODBC-2.2.14-aix-ppc-64.tar.gz)
Due to problems building the lastest version 2.2.14 on AIX, had to
Download from ftp://ftp.unixodbc.org/pub/unixODBC/
unixODBC-2.2.15pre.tar
gunzip
tar -xvf
'cd' to the directory containing the package's source code
export CC=xlc_r
export CCC=xlC_r
./configure --enable-gui=no --enable-drivers=no --enable-iconv=no --sysconfdir=/etc
make
make install
The .a files in the lib need to converted into .so files using ar found
in binutils:
cd /usr/local/lib
/opt/freeware/bin/ar -x libodbc.a
/opt/freeware/bin/ar -x libodbccr.a
/opt/freeware/bin/ar -x libodbcinst.a
Create the tar and gz files:
cd /tmp
mkdir -p /tmp/odbc
cd /tmp/odbc
mkdir -p etc
mkdir usr/local/bin
mkdir usr/local/lib
cp /etc/o*ini etc/.
cp /usr/local/lib/libodbc*[a1] usr/local/lib/.
cp /usr/local/bin/*sql usr/local/bin/.
cp /usr/local/bin/odbc* usr/local/bin/.
cp /usr/local/bin/dltest usr/local/bin/.
tar -cvf ../unixODBC-2.2.15pre-aix-ppc.tar *
cd ..
gzip unixODBC-2.2.15pre-aix-ppc.tar
Download and install binutils-2.14-3.aix5.1.ppc.rpm on to your buid machine.
Copy the gz file to the SOURCES directory.
cp unixODBC-2.2.14-aix-ppc-64.tar.gz /opt/freeware/src/packages/SOURCES
cp unixODBC-2.2.15pre-aix-ppc.tar /opt/freeware/src/packages/SOURCES
Remove any old RPMs
rm -f /opt/freeware/src/packages/SRPMS/unixODBC*rpm /opt/freeware/src/packages/RPMS/ppc/unixODBC*rpm
@ -22,5 +52,4 @@ want to use a different version etc.
rpm -ba unixODBC.spec
Creates:
/opt/freeware/src/packages/RPMS/ppc/unixODBC-2.2.14-64bit.aix5.3.ppc.rpm
/opt/freeware/src/packages/RPMS/ppc/unixODBC-2.2.15-pre.aix5.3.ppc.rpm

Binary file not shown.

View File

@ -1,7 +1,7 @@
Summary: Metapackage for unixODBC on AIX
Name: unixODBC
Version: 2.2.14
Release: 64bit
Version: 2.2.15
Release: pre
License: LGPL
Group: Applications/System
Vendor: unixODBC
@ -10,11 +10,11 @@ Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
Prefix: /
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root
BuildArch: ppc
Source1: unixODBC-2.2.14-aix-ppc-64.tar.gz
Source1: unixODBC-2.2.15pre-aix-ppc.tar.gz
Provides: unixODBC = %{version}
%description
unixODBC 2.2.14 on AIX systems (64-bit).
unixODBC 2.2.15 on AIX systems.
%prep
@ -25,24 +25,29 @@ rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/local
cp %{SOURCE1} $RPM_BUILD_ROOT/
cd $RPM_BUILD_ROOT
gunzip -f unixODBC-2.2.14-aix-ppc-64.tar.gz
tar -xf unixODBC-2.2.14-aix-ppc-64.tar
gunzip -f unixODBC-2.2.15pre-aix-ppc.tar.gz
tar -xf unixODBC-2.2.15pre-aix-ppc.tar
cd usr/local/lib
/opt/freeware/bin/ar -x libodbc.a
/opt/freeware/bin/ar -x libodbccr.a
/opt/freeware/bin/ar -x libodbcinst.a
ln -s -f libodbcinst.so.1 libodbcinst.so
ln -s -f libodbccr.so.1 libodbccr.so
ln -s -f libodbc.so.1 libodbc.so
ln -s libodbcinst.so.1 libodbcinst.so
ln -s libodbccr.so.1 libodbccr.so
ln -s libodbc.so.1 libodbc.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
%files
%defattr(-,root,root)
/usr/local/include
/etc/odbc.ini
/etc/odbcinst.ini
/usr/local/lib
/usr/local/bin