From 62398503b6943856bc8714852c9b0ce01368609c Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 12 Feb 2008 00:15:57 +0000 Subject: [PATCH] Move libodbcinst.so symlink into main package, per bug 204882 --- unixODBC.spec | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/unixODBC.spec b/unixODBC.spec index 66dc109..2231d03 100644 --- a/unixODBC.spec +++ b/unixODBC.spec @@ -1,7 +1,7 @@ Summary: A complete ODBC driver manager for Linux Name: unixODBC Version: 2.2.12 -Release: 5%{?dist} +Release: 6%{?dist} Group: System Environment/Libraries URL: http://www.unixODBC.org/ # Programs are GPL, libraries are LGPL, except News Server library is GPL. @@ -125,32 +125,32 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/libltdl.* rm -rf $RPM_BUILD_ROOT/usr/share/libtool -find $RPM_BUILD_ROOT/%{_libdir} -name "*.so.*" |sed "s|$RPM_BUILD_ROOT||" |grep -i -v libodbcinstQ > foo-list -find $RPM_BUILD_ROOT/%{_libdir} -name "*.so" |sed "s|$RPM_BUILD_ROOT||" |grep -i -v libodbcinstQ |grep -v -E "libodbc.so$" |grep -v -E "libodbcpsqlS?.so$" |grep -v -E "libodbcmyS.so$" > foo-list2 +# initialize lists of .so files; note that libodbcinstQ* go into kde subpkg +find $RPM_BUILD_ROOT%{_libdir} -name "*.so.*" | sed "s|^$RPM_BUILD_ROOT||" | grep -v /libodbcinstQ > base-so-list +find $RPM_BUILD_ROOT%{_libdir} -name "*.so" | sed "s|^$RPM_BUILD_ROOT||" | grep -v /libodbcinstQ > devel-so-list -# move to main package, it's often dlopened... -echo "%{_libdir}/libodbc.so" >> foo-list -echo "%{_libdir}/libodbcpsql.so" >> foo-list -echo "%{_libdir}/libodbcpsqlS.so" >> foo-list -echo "%{_libdir}/libodbcmyS.so" >> foo-list +# move these to main package, they're often dlopened... +for lib in libodbc.so libodbcinst.so libodbcpsql.so libodbcpsqlS.so libodbcmyS.so +do + echo "%{_libdir}/$lib" >> base-so-list + grep -v "/$lib$" devel-so-list > devel-so-list.x + mv -f devel-so-list.x devel-so-list +done %clean rm -rf $RPM_BUILD_ROOT -%files -f foo-list +%files -f base-so-list %defattr(-,root,root) %doc README COPYING AUTHORS ChangeLog NEWS INSTALL doc %config(noreplace) %{_sysconfdir}/odbc* -#{_libdir}/*so.* %{_bindir}/odbcinst %{_bindir}/isql %{_bindir}/dltest %{_bindir}/iusql %{_bindir}/odbc_config -#%{_bindir}/odbctest -#{_libdir}/libodbcinstQ* -%files devel -f foo-list2 +%files devel -f devel-so-list %defattr(-,root,root) %{_includedir}/* %{_libdir}/*.a @@ -175,6 +175,11 @@ rm -rf $RPM_BUILD_ROOT %postun -p /sbin/ldconfig %changelog +* Mon Feb 11 2008 Tom Lane 2.2.12-6 +- Move libodbcinst.so symlink into main package, since it's often dlopen'd +Related: #204882 +- Clean up specfile's ugly coding for making base-vs-devel decisions + * Sun Dec 30 2007 Tom Lane 2.2.12-5 - Add missing BuildRequires for flex. Resolves: #427063