diff --git a/baselibs.conf b/baselibs.conf index 2f8139d..8f26cae 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1 +1 @@ -file +libmagic1 diff --git a/file.changes b/file.changes index defb54c..4f2331b 100644 --- a/file.changes +++ b/file.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Oct 27 18:37:13 UTC 2012 - coolo@suse.com + +- implement shared library policy for libmagic1 + ------------------------------------------------------------------- Tue Sep 18 10:24:58 UTC 2012 - werner@suse.de diff --git a/file.spec b/file.spec index 3b742d1..818ef67 100644 --- a/file.spec +++ b/file.spec @@ -70,12 +70,28 @@ specified file. File type recognition is controlled by the file /etc/magic, which contains the classification criteria. This command is used by apsfilter to permit automatic printing of different file types. +%package -n libmagic-data +Summary: The magic files for libmagic to use +Group: Development/Libraries/Other + +%description -n libmagic-data +This package contains the basic magic files that libmagic reads and uses +to estimate a file's type. + +%package -n libmagic1 +Summary: Library with file's functionality +Group: Development/Libraries/Other +Requires: libmagic-data = %{version} + +%description -n libmagic1 +This library reads magic files and detects file types. Used by file command + %package -n file-devel Summary: Include Files and Libraries mandatory for Development Group: Development/Libraries/Other Provides: file:/usr/include/magic.h -Requires: file = %{version} Requires: glibc-devel +Requires: libmagic1 = %{version} %description -n file-devel This package contains all necessary include files and libraries needed @@ -143,20 +159,26 @@ find %{buildroot}%{_bindir}/file %{_bindir}/ /%{_lib}/ %{_libdir}/ | \ unset LD_LIBRARY_PATH %{__rm} -f %{buildroot}%{_libdir}/*.la -%post -p /sbin/ldconfig +%post -n libmagic1 -p /sbin/ldconfig -%postun -p /sbin/ldconfig +%postun -n libmagic1 -p /sbin/ldconfig + +%files -n libmagic1 +%defattr (644,root,root,755) +%{_libdir}/lib*.so.* + +%files -n libmagic-data +%defattr (644,root,root,755) +%config(noreplace) %{_sysconfdir}/magic +%{_miscdir}/magic +%{_miscdir}/magic.mgc +%doc %{_mandir}/man5/magic.5.gz %files %defattr (644,root,root,755) -%config(noreplace) %{_sysconfdir}/magic %{nil %{_bindir}/dcore} %attr(755,root,root) %{_bindir}/file -%{_libdir}/lib*.so.* -%{_miscdir}/magic -%{_miscdir}/magic.mgc %doc %{_mandir}/man1/file.1.gz -%doc %{_mandir}/man5/magic.5.gz %doc COPYING AUTHORS NEWS ChangeLog %files -n file-devel