From b9021d9d2c990432f1bcb7fd69b2a7ad3278f56d Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 22:17:22 +0100 Subject: [PATCH] don't build python-magic in favour of python-magic stand-alone distribution [release 5.25-2mamba;Sun Dec 13 2015] --- file.spec | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/file.spec b/file.spec index ed1094c..460ca5b 100644 --- a/file.spec +++ b/file.spec @@ -1,7 +1,7 @@ %define pymagic_version 0.1 Name: file Version: 5.25 -Release: 1mamba +Release: 2mamba Summary: An utility for determining file types Group: Applications/File Vendor: openmamba @@ -21,9 +21,6 @@ Patch7: file-5.04-zmachine-magic-update.patch License: BSD ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel -%if "%{stage1}" != "1" -BuildRequires: libpython-devel -%endif BuildRequires: libz-devel ## AUTOBUILDREQ-END Requires: libmagic = %{?epoch:%epoch:}%{version}-%{release} @@ -88,10 +85,10 @@ This package contains the Python bindings to allow access to the libmagic API. #%patch6 -p1 #%patch7 -p1 -for p in $(find . -name "*.py"); do - sed -i 's|#!/usr/local/bin/python2.1|#!%{__python}|' $p - sed -i 's|#!/usr/local/bin/python|#!%{__python}|' $p -done +#for p in $(find . -name "*.py"); do +# sed -i 's|#!/usr/local/bin/python2.1|#!%{__python}|' $p +# sed -i 's|#!/usr/local/bin/python|#!%{__python}|' $p +#done iconv -f iso-8859-1 -t utf-8 < doc/libmagic.man > doc/libmagic.man_ touch -r doc/libmagic.man doc/libmagic.man_ @@ -101,8 +98,8 @@ mv doc/libmagic.man_ doc/libmagic.man %configure --enable-fsect-man5 %make -cd python -CFLAGS="%{optflags}" %{__python} setup.py build +#cd python +#CFLAGS="%{optflags}" %{__python} setup.py build %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" @@ -116,10 +113,10 @@ ln -s misc/magic %{buildroot}%{_datadir}/magic #ln -s file/magic.mime %{buildroot}%{_datadir}/magic.mime ln -s ../magic %{buildroot}%{_datadir}/file/magic -%if "%{stage1}" != "1" -cd python -%{__python} setup.py install -O1 --skip-build --root %{buildroot} -%endif +#%if "%{stage1}" != "1" +#cd python +#%{__python} setup.py install -O1 --skip-build --root %{buildroot} +#%endif %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" @@ -151,15 +148,18 @@ cd python %{_libdir}/libmagic.so %{_mandir}/man3/* -%if "%{stage1}" != "1" -%files -n python-magic -%defattr(-,root,root) -%{python_sitelib}/Magic_file_extensions-*-py%{python_version}.egg-info -%{python_sitelib}/magic.py* -%doc python/README COPYING python/example.py -%endif +#%if "%{stage1}" != "1" +#%files -n python-magic +#%defattr(-,root,root) +#%{python_sitelib}/Magic_file_extensions-*-py%{python_version}.egg-info +#%{python_sitelib}/magic.py* +#%doc python/README COPYING python/example.py +#%endif %changelog +* Sun Dec 13 2015 Silvan Calarco 5.25-2mamba +- don't build python-magic in favour of python-magic stand-alone distribution + * Thu Sep 17 2015 Automatic Build System 5.25-1mamba - automatic version update by autodist