diff --git a/AIX/xcat-mysql/Build-notes b/AIX/xcat-mysql/Build-notes new file mode 100644 index 0000000..2da2a54 --- /dev/null +++ b/AIX/xcat-mysql/Build-notes @@ -0,0 +1,21 @@ +Build Notes + +Download mysql-5.1.26-rc-aix5.3-powerpc.tar.gz. +(See http://dev.mysql.com/downloads/mysql/5.1.html#aix) + +Copy the gz file to the SOURCES directory. +cp mysql-5.1.26-rc-aix5.3-powerpc.tar.gz /opt/freeware/src/packages/SOURCES + +Remove any old RPMs +rm -f /opt/freeware/src/packages/SRPMS/xcat-mysql*rpm /opt/freeware/src/packages/RPMS/ppc/xcat-mysql*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 xcat-mysql.spec + +Creates: +/opt/freeware/src/packages/RPMS/ppc/xcat-mysql-5.1-1.aix5.3.ppc.rpm +/opt/freeware/src/packages/SRPMS/xcat-mysql-5.1-1.src.rpm + diff --git a/AIX/xcat-mysql/xcat-mysql.spec b/AIX/xcat-mysql/xcat-mysql.spec new file mode 100644 index 0000000..c18a8e8 --- /dev/null +++ b/AIX/xcat-mysql/xcat-mysql.spec @@ -0,0 +1,56 @@ +Summary: Metapackage for MySQL on AIX +Name: xcat-mysql +Version: 5.1 +Release: 1 +License: EPL +Group: Applications/System +Vendor: IBM Corp. +Packager: IBM Corp. +Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}} +BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root +BuildArch: ppc +Source1: mysql-5.1.26-rc-aix5.3-powerpc.tar.gz +Provides: xcat-mysql = %{version} + +%description +Installs and configures MySQL 5.1 on AIX systems. + +%prep + +%build + +%install +mkdir -p $RPM_BUILD_ROOT/usr/local +cp %{SOURCE1} $RPM_BUILD_ROOT/usr/local + +%post + +cd /usr/local + +# uwrap +gunzip mysql-5.1.26-rc-aix5.3-powerpc.tar.gz +tar -xvf mysql-5.1.26-rc-aix5.3-powerpc.tar + +# set up link for mysql +ln -s /usr/local/mysql-5.1.26-rc-aix5.3-powerpc mysql + +# create group & user id +mkgroup mysql +mkuser mysql + +# TODO - add call to script (xcatcfgmysql) to do config! + +# set PATH?? +echo "PATH=\$PATH:/usr/local/mysql:/usr/local/mysql/bin:/usr/local/mysql/lib:/usr/local/mysql/include +export PATH" >>/etc/profile + +echo "The PATH environment variable has been updated in /etc/profile." + + +# TODO - add postun section to remove MySQL - + +%clean + +%files +/usr/local/mysql-5.1.26-rc-aix5.3-powerpc.tar.gz +%defattr(-,root,root)