Here’s the generated script from the rpmbuild process:
#!/bin/sh
RPM_SOURCE_DIR=“/root/rpmbuild/SOURCES”
RPM_BUILD_DIR=“/root/rpmbuild/BUILD”
RPM_OPT_FLAGS=“-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mminimal-toc”
RPM_ARCH=“ppc64”
RPM_OS=“linux”
export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS
RPM_DOC_DIR=“/usr/share/doc”
export RPM_DOC_DIR
RPM_PACKAGE_NAME=“Percona-Server-56”
RPM_PACKAGE_VERSION=“5.6.16”
RPM_PACKAGE_RELEASE=“64”
export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE
LANG=C
export LANG
unset CDPATH DISPLAY ||:
RPM_BUILD_ROOT=“/root/rpmbuild/BUILDROOT/Percona-Server-56-5.6.16-64.ppc64”
export RPM_BUILD_ROOT
PKG_CONFIG_PATH=“/usr/lib64/pkgconfig:/usr/share/pkgconfig”
export PKG_CONFIG_PATH
set -x
umask 022
cd “/root/rpmbuild/BUILD”
[ “$RPM_BUILD_ROOT” != “/” ] && rm -rf “${RPM_BUILD_ROOT}”
mkdir -p dirname "$RPM_BUILD_ROOT"
mkdir “$RPM_BUILD_ROOT”
cd ‘percona-server-5.6.16-64.2’
LANG=C
export LANG
unset DISPLAY
RBR=$RPM_BUILD_ROOT
MBD=$RPM_BUILD_DIR/percona-server-5.6.16-64.2
Ensure that needed directories exists
install -d $RBR/etc/{logrotate.d,init.d}
install -d $RBR/var/lib/mysql/mysql
install -d $RBR/usr/share/mysql-test
install -d $RBR/usr/share/percona-server/SELinux/RHEL4
install -d $RBR/usr/include
install -d $RBR/usr/lib64
install -d $RBR/usr/share/man
install -d $RBR/usr/sbin
install -d $RBR/usr/lib64/mysql/plugin
(
cd $MBD/release
make DESTDIR=$RBR benchdir_root=/usr/share install
d=“pwd
”
cd $MBD/UDF
make DESTDIR=$RBR benchdir_root=/usr/share install
cd “$d”
)
Install all binaries
(
cd $MBD/release
make DESTDIR=$RBR install
)
FIXME: at some point we should stop doing this and just install everything
FIXME: directly into /usr/lib64/mysql - perhaps at the same time as renaming
FIXME: the shared libraries to use libmysql*-$major.$minor.so syntax
mv -v $RBR//usr/lib64/*.a $RBR//usr/lib64/mysql/
Install logrotate and autostart
install -m 644 $MBD/release/support-files/mysql-log-rotate $RBR/etc/logrotate.d/mysql
install -m 755 $MBD/release/support-files/mysql.server $RBR/etc/init.d/mysql
Delete the symlinks to the libraries from the libdir. These are created by
ldconfig(8) afterwards.
rm -f $RBR/usr/lib64/libmysqlclient*.so.18
Create a symlink “rcmysql”, pointing to the init.script. SuSE users
will appreciate that, as all services usually offer this.
ln -s /etc/init.d/mysql $RBR/usr/sbin/rcmysql
Touch the place where the my.cnf config file might be located
Just to make sure it’s in the file list and marked as a config file
touch $RBR/etc/my.cnf
Install SELinux files in datadir
install -m 600 $MBD/support-files/RHEL4-SElinux/mysql.{fc,te}
$RBR/usr/share/percona-server/SELinux/RHEL4
Remove man pages we explicitly do not want to package, avoids 'unpackaged
files’ warning.
rm -f $RBR/usr/share/man/man1/make_win_bin_dist.1*
##############################################################################
Post processing actions, i.e. when installed
##############################################################################
/usr/lib/rpm/find-debuginfo.sh --strict-build-id “/root/rpmbuild/BUILD/percona-server-5.6.16-64.2”
/usr/lib/rpm/check-buildroot
/usr/lib/rpm/redhat/brp-compress
/usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
/usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
/usr/lib/rpm/brp-python-bytecompile
/usr/lib/rpm/redhat/brp-python-hardlink
/usr/lib/rpm/redhat/brp-java-repack-jars