%global pkgvers 1 %global scdate0 20230508 %global schash0 8a6ce53429cdb8d75cfe8ac514dfee6a5a130083 %global branch0 master %global source0 https://github.com/d-m-bailey/cvc.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: cvc Version: 1.1.5 Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} Summary: Circuit Validity Checker License: BSD URL: https://github.com/d-m-bailey/cvc BuildRequires: git gcc-c++ vim-common python3-devel BuildRequires: m4 automake autoconf gettext gettext-devel BuildRequires: gettext gawk flex bison doxygen zlib-devel readline-devel Requires: python3-kivy %global __cmake_in_source_build 1 %description CVC: Circuit Validity Checker. Voltage aware ERC checker for CDL netlists. %prep %setup -T -c -n %{name} find %{_builddir} -name SPECPARTS -exec rm -rf {} + git clone --depth 1 -n -b %{branch0} %{source0} . git fetch --depth 1 origin %{schash0} git reset --hard %{schash0} git log --format=fuller %build # build error sed -i '/^#include /a #include ' src/Cvc.hh sed -i 's|api.parser.class|parser_class_name|' src/cdlParser.yy # disable cxx assert %global optflags %(echo %optflags | sed 's|-Wp,-D_GLIBCXX_ASSERTIONS||g') # manual python sed -i 's|src_py||g' Makefile.am # compile flags sed -i '/LDFLAGS/d' src/Makefile.am sed -i 's|CFLAGS =|CFLAGS = %{optflags}|g' src/Makefile.am sed -i 's|CXXFLAGS =|CXXFLAGS = %{optflags}|g' src/Makefile.am # generate aclocal autoheader touch config.rpath touch config.h.in automake -a -c --foreign autoconf # config %configure export CFLAGS="%{optflags}" export CXXFLAGS="%{optflags}" # build %make_build # docs pushd doc doxygen popd %install rm -rf %{buildroot} mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_datadir}/%{name} mkdir -p %{buildroot}%{python3_sitelib}/cvc install -p -m 0755 src/cvc_rv %{buildroot}%{_bindir}/ install -p scripts/* %{buildroot}%{_datadir}/%{name}/ install -p -m 0755 src_py/check_cvc.py %{buildroot}%{_bindir}/ install -p -m 0644 src_py/cvc_globals.py %{buildroot}%{python3_sitelib}/cvc/ install -p -m 0644 src_py/ResultFile.py %{buildroot}%{python3_sitelib}/cvc/ install -p -m 0644 src_py/SummaryApp.py %{buildroot}%{python3_sitelib}/cvc/ install -p -m 0644 src_py/SummaryFile.py %{buildroot}%{python3_sitelib}/cvc/ install -p -m 0644 src_py/summaryGUI.py %{buildroot}%{python3_sitelib}/cvc/ install -p -m 0644 src_py/summary.kv %{buildroot}%{python3_sitelib}/cvc/ install -p -m 0644 src_py/utility.py %{buildroot}%{python3_sitelib}/cvc/ # fix headers sed -i 's|#! /usr/bin/env python|#/usr/bin/python3|' %{buildroot}%{_bindir}/check_cvc.py sed -i 's|#! /usr/bin/env python|#/usr/bin/python3|' %{buildroot}%{_datadir}/%{name}/expand_cells.py %files %license LICENSE %doc README.md %{_bindir}/* %{_datadir}/* %{python3_sitelib}/* %changelog * Thu Aug 05 2021 Cristian Balint - github update releases