diff --git a/baselibs.conf b/baselibs.conf index b8aba93..09285b5 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,8 +1,9 @@ libmagic1 - obsoletes "file- < " - provides "file- = " - requires "file-magic- = " + requires "file-magic- = " file + requires "libmagic1- = " + requires "file-magic- = " file-devel requires "libmagic1- = " + requires "file-magic- = " file-magic diff --git a/file-rpmlintrc b/file-rpmlintrc index 218dbc5..adc9d6c 100644 --- a/file-rpmlintrc +++ b/file-rpmlintrc @@ -1,4 +1,4 @@ addFilter(".*Warning:.*using.*regular.*magic.*file.*/usr/share/misc/magic.*") -addFilter(".*E:.*shlib-fixed-dependency.*") -addFilter(".*W:.*no-dependency-on.*") +addFilter(".*W:.*no-dependency-on file.*/file-libs/libfile.*") addFilter(".*W:.*name-repeated-in-summary.*") +addFilter(".*E:.*shlib-fixed-dependency.*") diff --git a/file.spec b/file.spec index 4daf567..bae2376 100644 --- a/file.spec +++ b/file.spec @@ -77,33 +77,33 @@ 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 file-magic +%package magic Summary: The magic files for libmagic to use Group: Productivity/File utilities -Obsoletes: libmagic-data +Obsoletes: libmagic-data < %{version} +Provides: libmagic-data = %{version} -%description -n file-magic +%description magic This package contains the basic magic files that libmagic reads and uses to estimate a file's type. %package -n %libname Summary: Library with file's functionality Group: System/Libraries +Provides: file:%{_libdir}/libmagic.so.%{somajor} Requires: file-magic = %{version} -Provides: %{name} = %{version} -Obsoletes: %{name} < %{version} %description -n %libname This library reads magic files and detects file types. Used by file command -%package -n file-devel +%package devel Summary: Include Files and Libraries mandatory for Development Group: Development/Libraries/C and C++ Provides: file:/usr/include/magic.h Requires: %libname = %{version} Requires: glibc-devel -%description -n file-devel +%description devel This package contains all necessary include files and libraries needed to develop applications that require the magic "file" interface. @@ -162,7 +162,10 @@ make DESTDIR=%{buildroot} install pkgdatadir='$(datadir)' rm -vf %{buildroot}%{_sysconfdir}/magic echo '# Localstuff: file(1) magic(5) for locally observed files' > %{buildroot}%{_sysconfdir}/magic echo '# global magic file is %{_miscdir}/magic(.mgc)' >> %{buildroot}%{_sysconfdir}/magic -%{nil install -s dcore %{buildroot}%{_bindir}} +# Does not build +%if %{with decore} +install -s dcore %{buildroot}%{_bindir} +%endif # Check out that the binary does not bail out: LD_LIBRARY_PATH=%{buildroot}%{_libdir} export LD_LIBRARY_PATH @@ -176,25 +179,27 @@ unset LD_LIBRARY_PATH %postun -n %libname -p /sbin/ldconfig %files -n %libname -%defattr (644,root,root,755) +%defattr (-,root,root) %{_libdir}/lib*.so.* -%files -n file-magic -%defattr (644,root,root,755) +%files magic +%defattr (-,root,root) %config(noreplace) %{_sysconfdir}/magic %{_miscdir}/magic %{_miscdir}/magic.mgc %doc %{_mandir}/man5/magic.5.gz %files -%defattr (644,root,root,755) -%{nil %{_bindir}/dcore} +%defattr (-,root,root) +%if %{with decore} +%attr(755,root,root) %{_bindir}/dcore +%endif %attr(755,root,root) %{_bindir}/file %doc %{_mandir}/man1/file.1.gz %doc COPYING AUTHORS NEWS ChangeLog -%files -n file-devel -%defattr (644,root,root,755) +%files devel +%defattr (-,root,root) %{_libdir}/lib*.so %{_includedir}/magic.h %doc %{_mandir}/man3/libmagic.3.gz