BuildRequires: perl-devel >= 1:5.6.1
BuildRequires: readline-devel >= 4.2
BuildRequires: rpm-perlprov >= 4.1-13
-BuildRequires: rpmbuild(macros) >= 1.159
+BuildRequires: rpmbuild(macros) >= 1.202
BuildRequires: texinfo
BuildRequires: zlib-devel
PreReq: rc-scripts >= 0.2.0
rm -rf $RPM_BUILD_ROOT
%pre
-if [ -n "`/usr/bin/getgid mysql`" ]; then
- if [ "`/usr/bin/getgid mysql`" != "89" ]; then
- echo "Error: group mysql doesn't have gid=89. Correct this before installing mysql." 1>&2
- exit 1
- fi
-else
- /usr/sbin/groupadd -g 89 mysql
-fi
-if [ -n "`/bin/id -u mysql 2>/dev/null`" ]; then
- if [ "`/bin/id -u mysql`" != "89" ]; then
- echo "Error: user mysql doesn't have uid=89. Correct this before installing mysql." 1>&2
- exit 1
- fi
-else
- /usr/sbin/useradd -u 89 \
- -d %{_mysqlhome} -s /bin/sh -g mysql \
- -c "MySQL Server" mysql 1>&2
-fi
+%groupadd -g 89 mysql
+%useradd -u 89 -d %{_mysqlhome} -s /bin/sh -g mysql -c "MySQL Server" mysql
%post
[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1