File magic.spec of Package magic

#
# spec file for package magic
#
# Copyright (c) 2022 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 http://bugs.opensuse.org/
#

Name:           magic
Version:        8.3.266
Release:        0
License:        BSD-1-Clause
Summary:        Detail netlist router for ASICs
Group:          Productivity/Scientific/Electronics
Url:            http://opencircuitdesign.com/magic
Source:         https://github.com/RTimothyEdwards/magic/archive/refs/tags/%{version}.tar.gz#/magic-%{version}.tar.gz
BuildRequires:  Mesa-libGL-devel
BuildRequires:  freeglut-devel
BuildRequires:  gcc-c++
BuildRequires:  glu-devel
BuildRequires:  python3-base
BuildRequires:  readline-devel
BuildRequires:  tcl-devel
BuildRequires:  tcsh
BuildRequires:  tk-devel
BuildRequires:  libX11-devel
BuildRequires:  libXt-devel
BuildRequires:  libXft-devel
Requires:       tcl

%description
Magic is an interactive editor for VLSI layouts.

%prep
%setup -q
# Remove bundled readline
rm -Rf ./readline/

%build
find -type f -exec sed -i \
  -e 's/#!\/usr\/local\/bin\/tclsh/#!\/usr\/bin\/tclsh/g' \
  -e 's/#!\/bin\/tclsh/#!\/usr\/bin\/tclsh/g' \
  '{}' \;
%configure \
  --enable-readline \
  %{nil}

%make_build

cat make.log

%install
%make_install \
  LIBDIR=%{_libdir} INSTALL_LIBDIR=%{_libdir}


%files
%license LICENSE
%doc README.md README.Tcl VERSION
%{_bindir}/*
%{_libdir}/%{name}
%{_mandir}/man1/*
%{_mandir}/man5/*

%changelog
openSUSE Build Service is sponsored by