File limbo.spec of Package limbo
#
# spec file for package limbo
#
# Copyright (c) 2025 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 openblas_version 0.3.6
%define source_name Limbo
Name: limbo
Version: 3.5.3
Release: 0
Summary: Library for VLSI CAD Design Useful parsers and solvers' api are implemented.
Group: Productivity/Scientific/Electronics
License: MIT
URL: https://github.com/limbo018/Limbo
Source: %{source_name}-%{version}.tar.gz
Source1: OpenBLAS-%{openblas_version}.tar.gz
Patch0: Limbo-fix-traits.patch
Patch1: Limbo-fix-third-party.patch
Patch2: Limbo-fix-explicit-static.patch
BuildRequires: cmake
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: gcc-fortran
BuildRequires: lemon-devel lemon
BuildRequires: lpsolve-devel lpsolve
BuildRequires: flex
BuildRequires: bison
BuildRequires: zlib-ng-compat-devel
BuildRequires: libboost_graph-devel
BuildRequires: libboost_regex-devel
%description
Library for VLSI CAD Design Useful parsers and solvers' api are implemented.
%package devel
Summary: Library for VLSI CAD Design Useful parsers and solvers' api are implemented.
Group: Productivity/Scientific/Electronics
Requires: %{name} = %{version}
%description devel
Library for VLSI CAD Design Useful parsers and solvers' api are implemented.
%prep
%autosetup -p1 -n %{source_name}-%{version}
tar xf %{SOURCE1}
rm -rf limbo/thirdparty/OpenBLAS
mv OpenBLAS-%{openblas_version} limbo/thirdparty/OpenBLAS
%build
export CFLAGS="-Wno-error"
export CXXFLAGS="-Wno-error"
export FCFLAGS="-Wno-error"
%cmake -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
%cmake_build
%install
%cmake_install
mkdir -p %{buildroot}/%{_docdir}/%{name}
#mv %{buildroot}/usr/docs/html %{buildroot}/%{_docdir}/%{name}/
#rm -rf %{buildroot}/usr/docs
mv %{buildroot}/%{_bindir}/thirdparty/lefdef/5.8/def/* %{buildroot}/%{_bindir}/
mv %{buildroot}/%{_bindir}/thirdparty/lefdef/5.8/lef/* %{buildroot}/%{_bindir}/
rm -rf %{buildroot}/%{_bindir}/thirdparty
if [ "%{_lib}" != "lib" ]; then
mv %{buildroot}/usr/lib %{buildroot}/%{_libdir}
fi
%files
%license LICENSE
%doc Readme.md
# docs/html
%{_bindir}
%post devel -p /sbin/ldconfig
%postun devel -p /sbin/ldconfig
%files devel
%{_includedir}/limbo
%{_libdir}
%changelog