File qflow.spec of Package qflow
#
# spec file for package qflow
#
# Copyright (c) 2025 SUSE LLC
#
# 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/
#
Name: qflow
Version: 1.4.104
Release: 0
License: GPL-1.0-or-later
Summary: Detail netlist router for ASICs
Group: Productivity/Scientific/Electronics
URL: http://opencircuitdesign.com/qflow
Source: https://github.com/RTimothyEdwards/qflow/archive/refs/tags/%{version}.tar.gz#/qflow-%{version}.tar.gz
Patch0: https://patch-diff.githubusercontent.com/raw/RTimothyEdwards/qflow/pull/58.patch#/fix_getopt_declaration.patch
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: graywolf
#BuildRequires: magic
BuildRequires: qrouter
BuildRequires: yosys
Requires: graywolf
#Requires: magic
Requires: qrouter
Requires: yosys
%description
Qflow is a complete tool chain for synthesizing digital circuits starting
from verilog source and ending in physical layout for a specific target
fabrication process.
%prep
%autosetup -p1
find . -iname \*.py.in -exec sed -i -e "1 s@ENV_PATH python3@%{_bindir}/python3@" {} \+
find . \( -iname \*.in -or -iname \*.sh \) -exec sed -i -e "1 s@!/bin/tcsh@!%{_bindir}/tcsh@" {} \+
%build
%configure \
--with-tclsh=%{_bindir} \
--with-magic=%{_bindir} \
--with-netgent=%{_bindir} \
--with-qrouter=%{_bindir} \
--with-graywolf=%{_bindir} \
--with-yosys=%{_bindir} \
--with-bindir=%{_bindir} \
--with-libdir=%{_datadir}/qflow
%make_build
%install
%make_install \
QFLOWEXECPATH=%{_libexecdir}/qflow INSTALL_QFLOWEXECPATH=%{_libexecdir}/qflow \
BININSTALL=%{_libexecdir}/qflow INSTALL_BININSTALL=%{_libexecdir}/qflow
find %{buildroot}%{_datadir}/qflow/tech -type f -executable -not -iname \*.sh -exec chmod -x {} \+
chmod -x %{buildroot}%{_datadir}/qflow/scripts/*txt
%fdupes %{buildroot}%{_datadir}
%files
%doc README VERSION
%{_bindir}/qflow
%{_datadir}/qflow
%{_libexecdir}/qflow
%changelog