Handle ldconfig more cleanly, per Joe Orton.
This commit is contained in:
parent
f2a9cba9de
commit
a30372b280
23
mysql.spec
23
mysql.spec
@ -1,6 +1,6 @@
|
|||||||
Name: mysql
|
Name: mysql
|
||||||
Version: 4.1.7
|
Version: 4.1.7
|
||||||
Release: 2
|
Release: 3
|
||||||
Source0: http://dev.mysql.com/get/Downloads/MySQL-4.1/mysql-%{version}.tar.gz
|
Source0: http://dev.mysql.com/get/Downloads/MySQL-4.1/mysql-%{version}.tar.gz
|
||||||
Source1: mysql.init
|
Source1: mysql.init
|
||||||
Source2: mysql.logrotate
|
Source2: mysql.logrotate
|
||||||
@ -176,6 +176,9 @@ rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/postinstall
|
|||||||
# compress manual
|
# compress manual
|
||||||
bzip2 Docs/manual.txt
|
bzip2 Docs/manual.txt
|
||||||
|
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
|
||||||
|
echo "%{_libdir}/mysql" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.conf
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
@ -185,11 +188,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
%post
|
%post
|
||||||
/sbin/install-info %{_infodir}/mysql.info.gz %{_infodir}/dir
|
/sbin/install-info %{_infodir}/mysql.info.gz %{_infodir}/dir
|
||||||
if ! grep '^%{_libdir}/mysql$' /etc/ld.so.conf > /dev/null 2>&1
|
/sbin/ldconfig
|
||||||
then
|
|
||||||
echo "%{_libdir}/mysql" >> /etc/ld.so.conf
|
|
||||||
fi
|
|
||||||
/sbin/ldconfig %{_libdir}/mysql
|
|
||||||
|
|
||||||
%post server
|
%post server
|
||||||
if [ $1 = 1 ]; then
|
if [ $1 = 1 ]; then
|
||||||
@ -210,13 +209,7 @@ fi
|
|||||||
|
|
||||||
%postun
|
%postun
|
||||||
if [ $1 = 0 ] ; then
|
if [ $1 = 0 ] ; then
|
||||||
if grep '^%{_libdir}/mysql$' /etc/ld.so.conf > /dev/null 2>&1
|
/sbin/ldconfig
|
||||||
then
|
|
||||||
grep -v '^%{_libdir}/mysql$' /etc/ld.so.conf \
|
|
||||||
> /etc/ld.so.conf.$$ 2> /dev/null
|
|
||||||
mv /etc/ld.so.conf.$$ /etc/ld.so.conf
|
|
||||||
fi
|
|
||||||
/sbin/ldconfig %{_libdir}/mysql
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@ -261,6 +254,7 @@ fi
|
|||||||
%{_libdir}/mysql/libmysqlclient*.so.*
|
%{_libdir}/mysql/libmysqlclient*.so.*
|
||||||
%{_libdir}/mysql/mysqlbug
|
%{_libdir}/mysql/mysqlbug
|
||||||
%{_libdir}/mysql/mysql_config
|
%{_libdir}/mysql/mysql_config
|
||||||
|
/etc/ld.so.conf.d/*
|
||||||
|
|
||||||
%dir %{_datadir}/mysql
|
%dir %{_datadir}/mysql
|
||||||
%{_datadir}/mysql/english
|
%{_datadir}/mysql/english
|
||||||
@ -357,6 +351,9 @@ fi
|
|||||||
%{_datadir}/sql-bench
|
%{_datadir}/sql-bench
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Oct 29 2004 Tom Lane <tgl@redhat.com> 4.1.7-3
|
||||||
|
- Handle ldconfig more cleanly (put a file in /etc/ld.so.conf.d/).
|
||||||
|
|
||||||
* Thu Oct 28 2004 Tom Lane <tgl@redhat.com> 4.1.7-2
|
* Thu Oct 28 2004 Tom Lane <tgl@redhat.com> 4.1.7-2
|
||||||
- rebuild in devel branch
|
- rebuild in devel branch
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user