From 4be894b82ccfd2b5fcfe39f116f42a8bd58856c5 Mon Sep 17 00:00:00 2001 From: linggao Date: Tue, 30 Jun 2009 13:53:15 +0000 Subject: [PATCH] build nodes and spec file for unixODBC and mysql-connector-odbc for AIX --- AIX/mysql-connector-odbc/Build-notes | 21 ++++++++ .../mysql-connector-odbc.spec | 50 +++++++++++++++++++ AIX/unixODBC/Build-notes | 26 ++++++++++ AIX/unixODBC/unixODBC.spec | 48 ++++++++++++++++++ 4 files changed, 145 insertions(+) create mode 100644 AIX/mysql-connector-odbc/Build-notes create mode 100644 AIX/mysql-connector-odbc/mysql-connector-odbc.spec create mode 100644 AIX/unixODBC/Build-notes create mode 100644 AIX/unixODBC/unixODBC.spec diff --git a/AIX/mysql-connector-odbc/Build-notes b/AIX/mysql-connector-odbc/Build-notes new file mode 100644 index 0000000..80838fd --- /dev/null +++ b/AIX/mysql-connector-odbc/Build-notes @@ -0,0 +1,21 @@ + Build Notes + +Download mysql-connector-odbc-3.51.27-aix5.3-powerpc-64bit.tar.gz. +(See http://dev.mysql.com/downloads/connector/odbc/3.51.html#aix) + AIX 5.3 power 64-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 + +Remove any old RPMs +rm -f /opt/freeware/src/packages/SRPMS/mysql-connector*rpm /opt/freeware/src/packages/RPMS/ppc/mysql-connector*rpm + +Use the spec file provided to build the RPM. (The spec file specifies +this particular MySQL gz file, so it will have to be modified if you want to use +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 + diff --git a/AIX/mysql-connector-odbc/mysql-connector-odbc.spec b/AIX/mysql-connector-odbc/mysql-connector-odbc.spec new file mode 100644 index 0000000..1bebf2f --- /dev/null +++ b/AIX/mysql-connector-odbc/mysql-connector-odbc.spec @@ -0,0 +1,50 @@ +Summary: Package for MySQL Connector/ODBC on AIX +Name: mysql-connector-odbc +Version: 3.51.27 +Release: 64bit +License: GPL +Group: Applications/System +Vendor: MySQL +Packager: IBM Corp. +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 +Provides: mysql-connector-odbc = %{version} + +%description +MySQL Connector/ODBC 3.51.27 on AIX systems (64-bit). + +%prep +%setup -q -n mysql-connector-odbc-3.51.27-aix5.3-powerpc-64bit +%build + +%install + +mkdir -p $RPM_BUILD_ROOT/usr/local/bin +mkdir -p $RPM_BUILD_ROOT/usr/local/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/* +cp lib/* $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 +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/* + +%post + +%clean + +%files +%defattr(-,root,root) +/usr/local/lib +/usr/local/bin +/usr/share/doc/mysql-connector-odbc-3.51.27 + diff --git a/AIX/unixODBC/Build-notes b/AIX/unixODBC/Build-notes new file mode 100644 index 0000000..893b1cf --- /dev/null +++ b/AIX/unixODBC/Build-notes @@ -0,0 +1,26 @@ + 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) + +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 + +Remove any old RPMs +rm -f /opt/freeware/src/packages/SRPMS/unixODBC*rpm /opt/freeware/src/packages/RPMS/ppc/unixODBC*rpm + +Use the spec file provided to build the RPM. (The spec file specifies +this particular unixODBC gz file, so it will have to be modified if you +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 + diff --git a/AIX/unixODBC/unixODBC.spec b/AIX/unixODBC/unixODBC.spec new file mode 100644 index 0000000..8625728 --- /dev/null +++ b/AIX/unixODBC/unixODBC.spec @@ -0,0 +1,48 @@ +Summary: Metapackage for unixODBC on AIX +Name: unixODBC +Version: 2.2.14 +Release: 64bit +License: LGPL +Group: Applications/System +Vendor: unixODBC +Packager: IBM Corp. +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 +Provides: unixODBC = %{version} + +%description +unixODBC 2.2.14 on AIX systems (64-bit). + +%prep + +%build + +%install +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 +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 + +%post + +%postun + +%clean + +%files +%defattr(-,root,root) +/usr/local/include +/usr/local/lib +/usr/local/bin