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
|
||||
Version: 4.1.7
|
||||
Release: 2
|
||||
Release: 3
|
||||
Source0: http://dev.mysql.com/get/Downloads/MySQL-4.1/mysql-%{version}.tar.gz
|
||||
Source1: mysql.init
|
||||
Source2: mysql.logrotate
|
||||
@ -176,6 +176,9 @@ rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/postinstall
|
||||
# compress manual
|
||||
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
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
@ -185,11 +188,7 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
/sbin/install-info %{_infodir}/mysql.info.gz %{_infodir}/dir
|
||||
if ! grep '^%{_libdir}/mysql$' /etc/ld.so.conf > /dev/null 2>&1
|
||||
then
|
||||
echo "%{_libdir}/mysql" >> /etc/ld.so.conf
|
||||
fi
|
||||
/sbin/ldconfig %{_libdir}/mysql
|
||||
/sbin/ldconfig
|
||||
|
||||
%post server
|
||||
if [ $1 = 1 ]; then
|
||||
@ -210,13 +209,7 @@ fi
|
||||
|
||||
%postun
|
||||
if [ $1 = 0 ] ; then
|
||||
if grep '^%{_libdir}/mysql$' /etc/ld.so.conf > /dev/null 2>&1
|
||||
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
|
||||
/sbin/ldconfig
|
||||
fi
|
||||
|
||||
|
||||
@ -261,6 +254,7 @@ fi
|
||||
%{_libdir}/mysql/libmysqlclient*.so.*
|
||||
%{_libdir}/mysql/mysqlbug
|
||||
%{_libdir}/mysql/mysql_config
|
||||
/etc/ld.so.conf.d/*
|
||||
|
||||
%dir %{_datadir}/mysql
|
||||
%{_datadir}/mysql/english
|
||||
@ -357,6 +351,9 @@ fi
|
||||
%{_datadir}/sql-bench
|
||||
|
||||
%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
|
||||
- rebuild in devel branch
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user