2
0
mirror of https://github.com/xcat2/xcat-dep.git synced 2024-12-25 12:41:33 +00:00

create meta package for MySQL on AIX

This commit is contained in:
nott 2008-08-14 11:51:32 +00:00
parent 1ede21126c
commit 6aae76957f
2 changed files with 77 additions and 0 deletions

View File

@ -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

View File

@ -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)