File yosys.spec of Package yosys

Name        	: yosys
Version     	: 0.45+139
Release     	: c4m.<CI_CNT>.<B_CNT>

Summary     	: Yosys Open SYnthesis Suite
%if 0%{?is_opensuse}
Group       	: Development/Tools/Other
%else
Group       	: Applications/Engineering
%endif
License   	: ISC
URL         	: https://github.com/YosysHQ/yosys

Source0         : yosys.tar.xz
BuildRequires   : gdb
BuildRequires   : gcc-c++
BuildRequires   : flex, bison >= 3.0
BuildRequires   : tcl-devel
BuildRequires   : readline-devel
BuildRequires   : libffi-devel
BuildRequires   : boost-devel
BuildRequires   : python3-devel
BuildRoot	: %{_tmppath}/yosys-0.45+139-build
Requires        : tcl
Requires        : readline

%description
This is a framework for RTL synthesis tools. It currently has extensive
Verilog-2005 support and provides a basic set of synthesis algorithms for
various application domains.

Yosys can be adapted to perform any synthesis job by combining the existing
passes (algorithms) using synthesis scripts and adding additional passes as
needed by extending the yosys C++ code base.

Yosys is free software licensed under the ISC license (a GPL compatible license
that is similar in terms to the MIT license or the 2-clause BSD license).

http://www.clifford.at/yosys/


%prep
%setup -q -n yosys

%build
cat >Makefile.conf <<EOF
CONFIG := gcc
ENABLE_LIBYOSYS := 1
PREFIX := %{_prefix}
BINDIR := %{_bindir}
LIBDIR := %{_libdir}
DATDIR := %{_datadir}/yosys
EOF
make %{?_smp_mflags}

%install
rm -rf %{buildroot}

make DESTDIR=%{buildroot} install

%if 0%{?is_opensuse}
# OpenSUSE does not like development files in normal release package
rm -fr %{buildroot}%{_prefix}/share/yosys/include
%endif


%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root)
%{_bindir}/*
%{_libdir}/lib*
%{_prefix}/share/yosys
%{_prefix}/share/yosys/*
openSUSE Build Service is sponsored by