File iverilog.spec of Package iverilog
#
# spec file for package iverilog
#
# Copyright (c) 2026 SUSE LLC and contributors
#
# 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 https://bugs.opensuse.org/
#
%define so_ver 1
Name: iverilog
Version: 12.0
Release: 0
%define major_ver 12
Summary: Simulation and synthesis tool for IEEE-1364
License: GPL-2.0-or-later
Group: Productivity/Scientific/Electronics
URL: https://steveicarus.github.io/iverilog/
Source: https://altushost-swe.dl.sourceforge.net/project/iverilog/iverilog/%{version}/verilog-%{version}.tar.gz
Patch2: 0001-vvp-generate-libvvp-import-library-for-MinGW-builds.patch
Patch3: 0002-vvp-install-libvvp-pkg-config-file.patch
Patch4: 0003-vvp-create-libvvp-as-versioned-library.patch
BuildRequires: autoconf
BuildRequires: bison
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gcc-c++
BuildRequires: gperf
BuildRequires: libbz2-devel
BuildRequires: pkg-config
BuildRequires: readline-devel
BuildRequires: zlib-devel
%description
Icarus Verilog is a Verilog compiler that generates a variety of
engineering formats, including simulation. It strives to be true
to the IEEE-1364 standard.
%package -n libvvp%{so_ver}
Summary: Shared libraries for iverilog
Group: System/Libraries
%description -n libvvp%{so_ver}
Icarus Verilog is a Verilog compiler that generates a variety of
engineering formats, including simulation. It strives to be true
to the IEEE-1364 standard. This package contains the shared
libraries.
%package devel
Summary: Icarus Verilog development files
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Provides: pkgconfig(libvvp) = %{version}
%description devel
This package contains necessary header files for Icarus Verilog
%prep
%autosetup -p1 -n verilog-%{version}
chmod a+x autoconf.sh
%build
./autoconf.sh
%configure \
--enable-libvvp
%make_build
%install
%make_install
rm %{buildroot}/%{_libdir}/*.a
%fdupes -s %{buildroot}/%{_libdir}/ivl/
%post -n libvvp%{so_ver} -p /sbin/ldconfig
%postun -n libvvp%{so_ver} -p /sbin/ldconfig
%check
LD_LIBRARY_PATH=$PWD/vvp make check
%files
%license COPYING
%doc README.md
%doc examples
%{_bindir}/*
%{_libdir}/ivl/
%{_mandir}/man1/*
%files -n libvvp%{so_ver}
%{_libdir}/libvvp.so.*
%files devel
%{_includedir}/*
%{_libdir}/libvvp.so
%{_libdir}/pkgconfig/*.pc
%changelog