%global pkgvers 2 %global scdate0 20231013 %global schash0 0c4740a4f8f1e615cc587b3cd3849fa23a623862 %global branch0 master %global source0 https://github.com/ghdl/ghdl-yosys-plugin.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: ghdl-yosys-plugin Version: 0 Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} Summary: GHDL plugin for Yosys License: GPLv3 URL: https://github.com/ghdl/ghdl-yosys-plugin BuildRequires: gcc-c++ ghdl libffi-devel BuildRequires: git readline-devel yosys-devel Requires: yosys %description VHDL synthesis based on GHDL and Yosys. %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 sed -i 's|-Wl,-rpath,$(dir $(LIBGHDL_LIB))||' Makefile sed -i 's|shell $(GHDL) --libghdl-library-path|echo -lghdl|' Makefile sed -i 's|-DYOSYS_ENABLE_GHDL|-DYOSYS_ENABLE_GHDL -I%{_includedir}/yosys|' Makefile sed -i 's|$(LIBGHDL_LIB)|/usr/lib64/libghdl*.so|' Makefile %make_build %install mkdir -p %{buildroot}%{_datadir}/yosys/plugins/ install -p ghdl.so %{buildroot}%{_datadir}/yosys/plugins/ %files %license LICENSE %doc README.md %{_datadir}/yosys/plugins/ghdl.so %changelog * Tue Aug 17 2021 Cristian Balint - Update to git releases * Fri May 1 2020 Aimylios - Initial version for nightly builds