%global pkgvers 0 %global scdate0 20241114 %global schash0 49c0de0433b6e5b899b6e7ba99fca262dbd44573 %global branch0 master %global source0 https://github.com/rtimothyedwards/netgen.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: netgen Version: %(curl -s https://raw.githubusercontent.com/rtimothyedwards/netgen/%{schash0}/VERSION) Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} Summary: General-purpose netlist management system License: GPLv2 URL: http://opencircuitdesign.com/netgen BuildRequires: make m4 gcc-c++ git tcl-devel tk-devel python3-devel %if 0%{?rhel} == 8 %define __brp_mangle_shebangs /usr/bin/true %endif %description NETGEN is a general-purpose netlist management system. %prep %setup -T -c -n %{name} git clone --depth 1 -n -b %{branch0} %{source0} . git fetch --depth 1 origin %{schash0} git reset --hard %{schash0} git log --format=fuller %build # disable cxx assert %global optflags %(echo %optflags | sed 's|-Werror=format-security||g') %configure %make_build %install %make_install mkdir %{buildroot}%{_libdir} # fix path mv -f %{buildroot}/usr/lib/%{name} %{buildroot}%{_libdir}/ # fix shebag for f in `find %{buildroot}/%{_libdir}/%{name} -name '*.py'`; do sed -i -e 's|#!/bin/env python|#!/usr/bin/python|' $f done %files %license Copying %doc README.md %doc doc/netgen.doc %{_bindir}/* %{_libdir}/* %changelog * Thu Aug 05 2021 Cristian Balint - github update releases