File verilator.spec of Package verilator
#
# spec file for package verilator
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: verilator
Version: 3.900
Release: 0
Summary: Compiling Verilog HDL simulator
License: Artistic-2.0 or LGPL-3.0
Group: Productivity/Scientific/Electronics
Url: https://www.veripool.org/projects/verilator/wiki/Intro
Source0: https://www.veripool.org/ftp/%{name}-%{version}.tgz
Source1: verilator-rpmlintrc
BuildRequires: bison
BuildRequires: flex
BuildRequires: gcc-c++
BuildRequires: gdb
BuildRequires: perl
BuildRequires: perl-SystemPerl-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Verilator compiles synthesizable Verilog (not test-bench code), plus
some PSL, SystemVerilog and Synthesis assertions into an optimized
model which is in turn wrapped inside a C++/SystemC module for faster
execution.
%package doc
Summary: Documentation for verilator in HTML format
Group: Documentation/HTML
Requires: %{name} = %{version}
BuildArch: noarch
%description doc
Verilator is a compiling Verilog HDL simulator.
This package contains documentation for verilator in HTML format.
%package doc-pdf
Summary: Documentation for verilator in PDF format
Group: Documentation/Other
Requires: %{name} = %{version}
BuildArch: noarch
%description doc-pdf
Verilator is a compiling Verilog HDL simulator.
This package contains documentation for verilator in PDF format.
%package examples
Summary: Examples for verilator
Group: Documentation/Other
Requires: %{name} = %{version}
BuildArch: noarch
%description examples
Verilator is a compiling Verilog HDL simulator.
This package contains examples of using verilator.
%prep
%setup -q
%build
%configure --enable-envdef
make %{?_smp_mflags} SYSTEMPERL_INCLUDE=%{_includedir}/perl-SystemPerl
%install
%make_install
# install documentation
install -d %{buildroot}%{_docdir}/%{name}/
install -Dm644 *.html %{buildroot}%{_docdir}/%{name}/
install -Dm644 *.pdf %{buildroot}%{_docdir}/%{name}/
# install examples
mv %{buildroot}%{_datadir}/verilator/examples %{buildroot}%{_docdir}/%{name}/examples
mkdir -p %{buildroot}%{_libdir}
mv %{buildroot}%{_datadir}/pkgconfig -t %{buildroot}%{_libdir}
%check
make test
%files
%defattr(-,root,root)
%doc Artistic COPYING.LESSER Changes README
%exclude %{_docdir}/%{name}/*.html
%exclude %{_docdir}/%{name}/*.pdf
%exclude %{_docdir}/%{name}/examples/
%{_bindir}/verilator
%{_bindir}/verilator_bin
%{_bindir}/verilator_bin_dbg
%{_bindir}/verilator_coverage
%{_bindir}/verilator_coverage_bin_dbg
%{_bindir}/verilator_profcfunc
%{_datadir}/verilator
%{_libdir}/pkgconfig/verilator.pc
%{_mandir}/man1/verilator.1.gz
%{_mandir}/man1/verilator_coverage.1.gz
%{_mandir}/man1/verilator_profcfunc.1.gz
%files doc
%defattr(-,root,root)
%{_docdir}/%{name}/*.html
%files doc-pdf
%defattr(-,root,root)
%{_docdir}/%{name}/*.pdf
%files examples
%defattr(-,root,root)
%doc %{_docdir}/%{name}/examples/
%changelog