From f30b7185666447dc82a45b7f41eecda0a7d1778f Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Jun 18 2019 10:03:38 +0000 Subject: Version Obsoletes and simplify syntax a bit --- diff --git a/libsbml.spec b/libsbml.spec index 3f537ff..89ad9c0 100644 --- a/libsbml.spec +++ b/libsbml.spec @@ -64,7 +64,7 @@ BuildRequires: swig BuildRequires: hostname # Python2 is no longer supported -Obsoletes: python2-%{name} +Obsoletes: python2-%{name} < 5.18 %description LibSBML is an open-source programming library designed to @@ -211,9 +211,8 @@ iconv -f latin1 -t utf8 NEWS.txt > t; touch -r NEWS.txt t; mv t NEWS.txt %if %{with python} # Fix invalid shebang # https://sourceforge.net/p/sbml/libsbml/390 -for i in `find docs/src/filters -type f \( -name "*.py" \)`; do -sed -i -r 's|(#!/usr/bin/env python) +#.*|#!%{__python3}|' $i -done +find docs/src/filters -type f -name '*.py' -exec \ + sed -i -r 's|(#!/usr/bin/env python) +#.*|#!%{__python3}|' {} + %endif # Unbundle minizip on fedora < 30 @@ -226,7 +225,7 @@ rm -v src/sbml/compress/{crypt.h,ioapi.*,iowin32.*,unzip.*,zip.*} grep -e 'This file was automatically generated by SWIG' -r . -l|xargs rm mkdir build-docs -cp -a $(/bin/ls -1|grep -v build-docs) build-docs/ +cp -a $(ls -1|grep -v build-docs) build-docs/ %build mkdir -p build && pushd build