]> git.pld-linux.org Git - packages/file.git/blobdiff - file.spec
up to 5.42
[packages/file.git] / file.spec
index c9e94abe4f495cb2d8734ef9eb0b9e7436fc6d3a..a0cad01ad542623c0e0fcca94bbdfbe5de685b90 100644 (file)
--- a/file.spec
+++ b/file.spec
@@ -1,9 +1,14 @@
 #
 # Conditional build:
-%bcond_without python2         # don't build python-magic module for Python 2.x
-%bcond_without python3         # don't build python-magic module for Python 3.x
-%bcond_without static_libs     # don't build static libraries
-%bcond_without tests           # don't perform "make check"
+%bcond_without python2         # CPython 2.x python-magic module
+%bcond_without python3         # CPython 3.x python-magic module
+%bcond_without static_libs     # static library
+%bcond_without tests           # unit tests
+%bcond_without seccomp         # SECCOMP support
+
+%ifnarch %{x8664} aarch64
+%undefine      with_seccomp
+%endif
 
 Summary:       A utility for determining file types
 Summary(cs.UTF-8):     Program pro zjišťování typu souborů
@@ -29,12 +34,12 @@ Summary(uk.UTF-8):  Утиліта для визначення типів фай
 Summary(zh_CN.UTF-8):  判定文件类型的工具。
 Summary(zh_TW.UTF-8):  用於決定檔案類型的一個工具程式。
 Name:          file
-Version:       5.36
+Version:       5.42
 Release:       1
 License:       distributable
 Group:         Applications/File
 Source0:       ftp://ftp.astron.com/pub/file/%{name}-%{version}.tar.gz
-# Source0-md5: 9af0eb3f5db4ae00fffc37f7b861575c
+# Source0-md5: 4d4f70c3b08a8a70d8baf67f085d7e92
 Source1:       http://ftp1.pld-linux.org/people/glen/%{name}-non-english-man-pages.tar.bz2
 # Source1-md5: 6a45bcaefd19b94db36a1b2b7c5b806b
 Source2:       %{name}-zisofs.magic
@@ -43,13 +48,14 @@ Source4:    %{name}-magic.mime-gen.awk
 Patch0:                %{name}-selinux.patch
 Patch1:                searchpath.patch
 Patch2:                automake.patch
+Patch3:                %{name}-gettext-no-random-translations.patch
 Patch4:                name-use-count.patch
 URL:           http://www.darwinsys.com/file/
 BuildRequires: autoconf >= 2.50
 BuildRequires: automake
 BuildRequires: libseccomp-devel
 BuildRequires: libtool >= 2:2.0
-BuildRequires: rpmbuild(macros) >= 1.710
+BuildRequires: rpmbuild(macros) >= 1.751
 %if %{with python2}
 BuildRequires: python-devel
 BuildRequires: python-modules
@@ -211,6 +217,7 @@ Summary:    Header files for libmagic library
 Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki libmagic
 Group:         Development/Libraries
 Requires:      libmagic = %{version}-%{release}
+Requires:      libseccomp-devel
 Requires:      zlib-devel
 
 %description -n libmagic-devel
@@ -247,6 +254,7 @@ Summary(pl.UTF-8):  Wiązania Pythona 2 do biblioteki libmagic
 Group:         Libraries/Python
 Requires:      libmagic = %{version}-%{release}
 Requires:      python-libs
+BuildArch:     noarch
 
 %description -n python-magic
 Python 2 bindings for libmagic.
@@ -260,6 +268,7 @@ Summary(pl.UTF-8):  Wiązania Pythona 3 do biblioteki libmagic
 Group:         Libraries/Python
 Requires:      libmagic = %{version}-%{release}
 Requires:      python-libs
+BuildArch:     noarch
 
 %description -n python3-magic
 Python 3 bindings for libmagic.
@@ -272,9 +281,10 @@ Wiązania Pythona 3 do biblioteki libmagic.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 %patch4 -p1
 
-%if "%{cc_version}" < "3.4"
+%if "%{_ver_lt '%{cc_version}' '3.4'}" == "1"
 %{__sed} -i -e 's,-Wextra,,' configure.ac
 %endif
 
@@ -289,14 +299,12 @@ cp -a python py3
 
 %build
 %{__libtoolize}
-%{__aclocal}
-%{__autoheader}
+%{__aclocal} -I m4
 %{__autoconf}
+%{__autoheader}
 %{__automake}
 %configure \
-%ifnarch %{x8664}
-       --disable-libseccomp \
-%endif
+       %{!?with_seccomp:--disable-libseccomp} \
        --disable-silent-rules \
        --enable-fsect-man5 \
        %{?with_static_libs:--enable-static}
@@ -325,7 +333,7 @@ install -d $RPM_BUILD_ROOT/%{_lib}
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
-mv $RPM_BUILD_ROOT%{_libdir}/libmagic.so.* $RPM_BUILD_ROOT/%{_lib}
+%{__mv} $RPM_BUILD_ROOT%{_libdir}/libmagic.so.* $RPM_BUILD_ROOT/%{_lib}
 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libmagic.so.*.*.*) \
         $RPM_BUILD_ROOT%{_libdir}/libmagic.so
 
@@ -367,7 +375,7 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%doc ChangeLog COPYING README
+%doc ChangeLog COPYING
 %attr(755,root,root) %{_bindir}/file
 %{_datadir}/file
 %{_datadir}/misc/magic
@@ -396,6 +404,7 @@ fi
 %attr(755,root,root) %{_libdir}/libmagic.so
 %{_libdir}/libmagic.la
 %{_includedir}/magic.h
+%{_pkgconfigdir}/libmagic.pc
 %{_mandir}/man3/libmagic.3*
 
 %if %{with static_libs}
@@ -404,7 +413,7 @@ fi
 %{_libdir}/libmagic.a
 %endif
 
-%if %{with python3}
+%if %{with python2}
 %files -n python-magic
 %defattr(644,root,root,755)
 %doc python/README.md python/example.py
@@ -412,7 +421,7 @@ fi
 %{py_sitescriptdir}/file_magic-*-py*.egg-info
 %endif
 
-%if %{with_python3}
+%if %{with python3}
 %files -n python3-magic
 %defattr(644,root,root,755)
 %doc python/README.md python/example.py
This page took 0.111586 seconds and 4 git commands to generate.