|
@@ -3,7 +3,7 @@
|
|
|
Summary: A utility for determining file types.
|
|
|
Summary(ja): ファイルの種類を判別するユーティリティー
|
|
|
Name: file
|
|
|
-Version: 5.43
|
|
|
+Version: 5.45
|
|
|
Release: 1%{?_dist_release}
|
|
|
Group: system
|
|
|
Vendor: Project Vine
|
|
@@ -11,7 +11,7 @@ Distribution: Vine Linux
|
|
|
Packager: daisuke
|
|
|
|
|
|
License: BSD
|
|
|
-URL: http://www.darwinsys.com/file/
|
|
|
+URL: https://www.darwinsys.com/file/
|
|
|
# master site is toooooooooooooooooo slow
|
|
|
Source0: http://ftp.astron.com/pub/file/%{name}-%{version}.tar.gz
|
|
|
|
|
@@ -25,13 +25,21 @@ Patch0: file-localmagic.patch
|
|
|
Patch1: file-4.17-rpm-name.patch
|
|
|
Patch2: file-5.04-volume_key.patch
|
|
|
|
|
|
+# revert upstream commits (rhbz#2167964)
|
|
|
+# 1. https://github.com/file/file/commit/e1233247bbe4d2d66b891224336a23384a93cce1
|
|
|
+# 2. https://github.com/file/file/commit/f7a65dbf1739a8f8671621e41c5648d1f7e9f6ae
|
|
|
+Patch3: file-5.45-readelf-limit-revert.patch
|
|
|
+
|
|
|
+# upstream commit: https://github.com/file/file/commit/218fdf813fd5ccecbb8887a1b62509cd1c6dd3a1
|
|
|
+Patch4: file-5.45-time-t.patch
|
|
|
+
|
|
|
# Vine
|
|
|
Patch1000: file-5.14-magicbuild-fix.patch
|
|
|
|
|
|
Buildroot: %{_tmppath}/%{name}-%{version}-root
|
|
|
#BuildRequires: automake
|
|
|
#BuildRequires: autoconf
|
|
|
-BuildRequires: zlib-devel
|
|
|
+BuildRequires: pkgconfig(zlib)
|
|
|
Obsoletes: file-static
|
|
|
|
|
|
%description
|
|
@@ -113,7 +121,7 @@ CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" \
|
|
|
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
|
|
|
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
|
|
|
export LD_LIBRARY_PATH=$RPM_BUILD_ROOT/%{name}-%{version}/src/.libs
|
|
|
-make
|
|
|
+%make_build
|
|
|
|
|
|
cd python
|
|
|
%py_build
|
|
@@ -129,11 +137,15 @@ mkdir -p $RPM_BUILD_ROOT%{_mandir}/man5
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_datadir}/misc
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_datadir}/file
|
|
|
|
|
|
-make install DESTDIR=$RPM_BUILD_ROOT
|
|
|
+%make_install
|
|
|
+rm -f ${RPM_BUILD_ROOT}%{_libdir}/*.la
|
|
|
+
|
|
|
+# local magic in /etc/magic
|
|
|
+mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}
|
|
|
+cp -a ./magic/magic.local ${RPM_BUILD_ROOT}%{_sysconfdir}/magic
|
|
|
|
|
|
cat magic/Magdir/* > ${RPM_BUILD_ROOT}%{_datadir}/misc/magic
|
|
|
ln -s misc/magic ${RPM_BUILD_ROOT}%{_datadir}/magic
|
|
|
-##ln -s file/magic.mime ${RPM_BUILD_ROOT}%{_datadir}/magic.mime
|
|
|
ln -s ../magic ${RPM_BUILD_ROOT}%{_datadir}/file/magic
|
|
|
|
|
|
cd python
|
|
@@ -142,20 +154,6 @@ cd python
|
|
|
|
|
|
%{__install} -d ${RPM_BUILD_ROOT}%{_datadir}/%{name}
|
|
|
|
|
|
-# LIBTOOL=/usr/bin/libtool
|
|
|
-#ln -s file/magic ${RPM_BUILD_ROOT}%{_datadir}/magic
|
|
|
-#ln -s file/magic.mime ${RPM_BUILD_ROOT}%{_datadir}/magic.mime
|
|
|
-
|
|
|
-#ln -s ../magic ${RPM_BUILD_ROOT}%{_datadir}/misc/magic
|
|
|
-
|
|
|
-#{ cd ${RPM_BUILD_ROOT}
|
|
|
-# strip .%{_bindir}/file
|
|
|
-# cp %SOURCE1 .%{_datadir}/magic.mime
|
|
|
-#}
|
|
|
-
|
|
|
-# remove unused files
|
|
|
-rm -rf $RPM_BUILD_ROOT%{_libdir}/*.la
|
|
|
-
|
|
|
|
|
|
%ifarch x86_64
|
|
|
%check
|
|
@@ -164,14 +162,10 @@ make -C tests check
|
|
|
%endif
|
|
|
|
|
|
|
|
|
-%clean
|
|
|
-rm -rf $RPM_BUILD_ROOT
|
|
|
-
|
|
|
-
|
|
|
%files
|
|
|
-%defattr(-,root,root)
|
|
|
%license COPYING
|
|
|
%doc ChangeLog README
|
|
|
+%config(noreplace) %{_sysconfdir}/magic
|
|
|
%{_bindir}/*
|
|
|
%{_libdir}/libmagic.so.*
|
|
|
%{_datadir}/file/*
|
|
@@ -180,14 +174,12 @@ rm -rf $RPM_BUILD_ROOT
|
|
|
%{_mandir}/man[15]/*
|
|
|
|
|
|
%files devel
|
|
|
-%defattr(-,root,root,-)
|
|
|
%{_libdir}/*.so
|
|
|
%{_libdir}/pkgconfig/*
|
|
|
%{_includedir}/magic.h
|
|
|
%{_mandir}/man3/*
|
|
|
|
|
|
%files -n python-magic
|
|
|
-%defattr(-, root, root, -)
|
|
|
%license python/LICENSE
|
|
|
%doc python/README* python/example.py
|
|
|
%{python_sitelib}/magic.py
|
|
@@ -196,13 +188,15 @@ rm -rf $RPM_BUILD_ROOT
|
|
|
%{python_sitelib}/*egg-info
|
|
|
|
|
|
%files -n python3-magic
|
|
|
-%defattr(-, root, root, -)
|
|
|
%license python/LICENSE
|
|
|
%doc python/README* python/example.py
|
|
|
%{python3_sitelib}/*
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
+* Fri Jul 12 2024 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.45-1
|
|
|
+- new upstream release.
|
|
|
+
|
|
|
* Sun Oct 02 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.43-1
|
|
|
- new upstream release.
|
|
|
|