Dr. Werner Fink 2016-04-19 14:08:46 +00:00 committed by Git OBS Bridge
parent 7a9cba61e5
commit 3798211991
3 changed files with 26 additions and 20 deletions

View File

@ -1,8 +1,9 @@
libmagic1 libmagic1
obsoletes "file-<targettype> < <version>"
provides "file-<targettype> = <version>"
requires "file-magic-<targettype> = <version>" requires "file-magic-<targettype> = <version>"
file file
requires "libmagic1-<targettype> = <version>"
requires "file-magic-<targettype> = <version>"
file-devel file-devel
requires "libmagic1-<targettype> = <version>" requires "libmagic1-<targettype> = <version>"
requires "file-magic-<targettype> = <version>"
file-magic file-magic

View File

@ -1,4 +1,4 @@
addFilter(".*Warning:.*using.*regular.*magic.*file.*/usr/share/misc/magic.*") addFilter(".*Warning:.*using.*regular.*magic.*file.*/usr/share/misc/magic.*")
addFilter(".*E:.*shlib-fixed-dependency.*") addFilter(".*W:.*no-dependency-on file.*/file-libs/libfile.*")
addFilter(".*W:.*no-dependency-on.*")
addFilter(".*W:.*name-repeated-in-summary.*") addFilter(".*W:.*name-repeated-in-summary.*")
addFilter(".*E:.*shlib-fixed-dependency.*")

View File

@ -77,33 +77,33 @@ specified file. File type recognition is controlled by the file
/etc/magic, which contains the classification criteria. This command is /etc/magic, which contains the classification criteria. This command is
used by apsfilter to permit automatic printing of different file types. 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 Summary: The magic files for libmagic to use
Group: Productivity/File utilities 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 This package contains the basic magic files that libmagic reads and uses
to estimate a file's type. to estimate a file's type.
%package -n %libname %package -n %libname
Summary: Library with file's functionality Summary: Library with file's functionality
Group: System/Libraries Group: System/Libraries
Provides: file:%{_libdir}/libmagic.so.%{somajor}
Requires: file-magic = %{version} Requires: file-magic = %{version}
Provides: %{name} = %{version}
Obsoletes: %{name} < %{version}
%description -n %libname %description -n %libname
This library reads magic files and detects file types. Used by file command 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 Summary: Include Files and Libraries mandatory for Development
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Provides: file:/usr/include/magic.h Provides: file:/usr/include/magic.h
Requires: %libname = %{version} Requires: %libname = %{version}
Requires: glibc-devel Requires: glibc-devel
%description -n file-devel %description devel
This package contains all necessary include files and libraries needed This package contains all necessary include files and libraries needed
to develop applications that require the magic "file" interface. to develop applications that require the magic "file" interface.
@ -162,7 +162,10 @@ make DESTDIR=%{buildroot} install pkgdatadir='$(datadir)'
rm -vf %{buildroot}%{_sysconfdir}/magic rm -vf %{buildroot}%{_sysconfdir}/magic
echo '# Localstuff: file(1) magic(5) for locally observed files' > %{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 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: # Check out that the binary does not bail out:
LD_LIBRARY_PATH=%{buildroot}%{_libdir} LD_LIBRARY_PATH=%{buildroot}%{_libdir}
export LD_LIBRARY_PATH export LD_LIBRARY_PATH
@ -176,25 +179,27 @@ unset LD_LIBRARY_PATH
%postun -n %libname -p /sbin/ldconfig %postun -n %libname -p /sbin/ldconfig
%files -n %libname %files -n %libname
%defattr (644,root,root,755) %defattr (-,root,root)
%{_libdir}/lib*.so.* %{_libdir}/lib*.so.*
%files -n file-magic %files magic
%defattr (644,root,root,755) %defattr (-,root,root)
%config(noreplace) %{_sysconfdir}/magic %config(noreplace) %{_sysconfdir}/magic
%{_miscdir}/magic %{_miscdir}/magic
%{_miscdir}/magic.mgc %{_miscdir}/magic.mgc
%doc %{_mandir}/man5/magic.5.gz %doc %{_mandir}/man5/magic.5.gz
%files %files
%defattr (644,root,root,755) %defattr (-,root,root)
%{nil %{_bindir}/dcore} %if %{with decore}
%attr(755,root,root) %{_bindir}/dcore
%endif
%attr(755,root,root) %{_bindir}/file %attr(755,root,root) %{_bindir}/file
%doc %{_mandir}/man1/file.1.gz %doc %{_mandir}/man1/file.1.gz
%doc COPYING AUTHORS NEWS ChangeLog %doc COPYING AUTHORS NEWS ChangeLog
%files -n file-devel %files devel
%defattr (644,root,root,755) %defattr (-,root,root)
%{_libdir}/lib*.so %{_libdir}/lib*.so
%{_includedir}/magic.h %{_includedir}/magic.h
%doc %{_mandir}/man3/libmagic.3.gz %doc %{_mandir}/man3/libmagic.3.gz