2017-09-10 17:05:27 +02:00
|
|
|
#
|
|
|
|
|
# spec file for package klayout
|
|
|
|
|
#
|
|
|
|
|
# Copyright (c) 2017 SUSE LINUX Products 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: klayout
|
2017-09-10 19:04:31 +02:00
|
|
|
Version: %{git_version}
|
2017-09-10 17:05:27 +02:00
|
|
|
Release: 0
|
|
|
|
|
Summary: KLayout, viewer and editor for mask layouts
|
|
|
|
|
License: GPL-2.0+
|
|
|
|
|
Group: Productivity/Scientific/Electronics
|
|
|
|
|
Url: http://www.klayout.de
|
2017-09-10 19:04:31 +02:00
|
|
|
%if "%{git_source}" == ""
|
2017-09-10 17:05:27 +02:00
|
|
|
Source0: http://www.klayout.de/downloads/%{name}-%{version}.tar.gz
|
2017-09-10 19:04:31 +02:00
|
|
|
%endif
|
2017-09-12 23:02:20 +02:00
|
|
|
# BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2017-09-10 17:05:27 +02:00
|
|
|
|
2017-09-10 20:35:23 +02:00
|
|
|
# Disable auto-detection of dependencies (to prevent including the
|
|
|
|
|
# so's of klayout itself)
|
|
|
|
|
AutoReqProv: no
|
|
|
|
|
|
2020-02-21 21:16:38 +01:00
|
|
|
# CentOS8 requirements
|
|
|
|
|
%if "%{target_system}" == "centos8"
|
|
|
|
|
Requires: ruby >= 2.5.5
|
2020-02-21 21:41:28 +01:00
|
|
|
Requires: python3 >= 3.6.0
|
2020-02-21 21:16:38 +01:00
|
|
|
Requires: qt5-qtbase >= 5.11.1
|
|
|
|
|
Requires: qt5-qtmultimedia >= 5.11.1
|
|
|
|
|
Requires: qt5-qtxmlpatterns >= 5.11.1
|
|
|
|
|
Requires: qt5-qtsvg >= 5.11.1
|
|
|
|
|
Requires: qt5-qttools >= 5.11.1
|
|
|
|
|
|
|
|
|
|
%define buildopt -j2
|
|
|
|
|
%define pylib %{python_sitearch}
|
|
|
|
|
%endif
|
|
|
|
|
|
2017-09-10 22:15:13 +02:00
|
|
|
# CentOS7 requirements
|
|
|
|
|
%if "%{target_system}" == "centos7"
|
|
|
|
|
Requires: ruby >= 2.0.0
|
|
|
|
|
Requires: python >= 2.7.5
|
2017-09-15 21:38:32 +02:00
|
|
|
Requires: qt-x11 >= 4.8.5
|
2018-06-19 01:08:15 +02:00
|
|
|
%define buildopt -j2
|
2018-06-20 00:28:40 +02:00
|
|
|
%define pylib %{python_sitearch}
|
2017-09-10 22:15:13 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if "%{target_system}" == "centos6"
|
|
|
|
|
# CentOS6 requirements
|
2018-05-01 08:40:02 +02:00
|
|
|
Requires: libcurl >= 7.19.7
|
|
|
|
|
Requires: ruby >= 1.8.7
|
|
|
|
|
Requires: python >= 2.6.6
|
2018-05-01 17:16:43 +02:00
|
|
|
Requires: qt-x11 >= 4.6.2
|
2018-06-19 01:08:15 +02:00
|
|
|
%define buildopt -libcurl -j2
|
2018-06-20 00:28:40 +02:00
|
|
|
%define pylib %{python_sitearch}
|
2017-09-10 22:15:13 +02:00
|
|
|
%endif
|
|
|
|
|
|
2017-09-13 22:20:40 +02:00
|
|
|
%if "%{target_system}" == "opensuse42_2"
|
|
|
|
|
# OpenSuSE 42.2 requirements
|
2017-09-16 19:44:01 +02:00
|
|
|
Requires: ruby2.3 >= 2.3.1
|
2017-09-16 21:50:57 +02:00
|
|
|
Requires: python3 >= 3.4.6
|
2017-09-16 22:52:47 +02:00
|
|
|
Requires: libqt4-x11 >= 4.8.6
|
2018-06-19 01:08:15 +02:00
|
|
|
%define buildopt -j2
|
2018-06-24 17:33:24 +02:00
|
|
|
%define pylib %{python3_sitearch}
|
2017-09-13 22:20:40 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if "%{target_system}" == "opensuse42_3"
|
|
|
|
|
# OpenSuSE 42.3 requirements
|
2017-09-16 19:44:01 +02:00
|
|
|
Requires: ruby2.3 >= 2.3.1
|
2017-09-16 21:50:57 +02:00
|
|
|
Requires: python3 >= 3.4.6
|
2017-09-16 22:52:47 +02:00
|
|
|
Requires: libqt4-x11 >= 4.8.6
|
2018-06-19 01:08:15 +02:00
|
|
|
%define buildopt -j2
|
2018-06-24 17:33:24 +02:00
|
|
|
%define pylib %{python3_sitearch}
|
2017-09-13 22:20:40 +02:00
|
|
|
%endif
|
|
|
|
|
|
2018-07-31 08:01:01 +02:00
|
|
|
%if "%{target_system}" == "opensuse15"
|
2018-07-31 02:49:37 +02:00
|
|
|
# OpenSuSE Leap 15 requirements
|
2018-07-31 08:01:01 +02:00
|
|
|
Requires: ruby >= 2.5
|
|
|
|
|
Requires: python3 >= 3.6
|
2018-07-31 02:49:37 +02:00
|
|
|
Requires: libqt4-x11 >= 4.8.7
|
|
|
|
|
%define buildopt -j2
|
2018-07-31 07:12:51 +02:00
|
|
|
%define pylib %{python3_sitearch}
|
2018-07-31 02:49:37 +02:00
|
|
|
%endif
|
|
|
|
|
|
2018-07-31 08:00:27 +02:00
|
|
|
%if "%{target_system}" == "opensuse15"
|
2018-07-30 23:02:07 +02:00
|
|
|
# OpenSuSE Leap 15 requirements
|
2018-07-31 08:00:27 +02:00
|
|
|
Requires: ruby >= 2.5
|
|
|
|
|
Requires: python3 >= 3.6
|
2018-07-30 23:02:07 +02:00
|
|
|
Requires: libqt4-x11 >= 4.8.7
|
|
|
|
|
%define buildopt -j2
|
|
|
|
|
%endif
|
|
|
|
|
|
2017-09-10 17:05:27 +02:00
|
|
|
%description
|
|
|
|
|
Mask layout viewer and editor for the chip design engineer.
|
|
|
|
|
|
2017-09-10 19:04:31 +02:00
|
|
|
For details see README.md
|
2017-09-10 17:05:27 +02:00
|
|
|
|
|
|
|
|
%prep
|
2017-09-10 19:04:31 +02:00
|
|
|
|
|
|
|
|
%if "%{git_source}" != ""
|
2017-09-12 23:14:12 +02:00
|
|
|
rm -rf %{_sourcedir}
|
|
|
|
|
ln -s %{git_source} %{_sourcedir}
|
2017-09-10 19:04:31 +02:00
|
|
|
%else
|
|
|
|
|
%setup -q
|
|
|
|
|
%endif
|
2017-09-10 17:05:27 +02:00
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
2017-09-11 22:13:02 +02:00
|
|
|
TARGET="linux-release"
|
2017-09-10 19:04:31 +02:00
|
|
|
|
2017-09-10 23:08:56 +02:00
|
|
|
%if "%{git_source}" != ""
|
|
|
|
|
# build from git sources if possible
|
|
|
|
|
cd %{git_source}
|
|
|
|
|
%else
|
2017-09-10 19:04:31 +02:00
|
|
|
cd %{_sourcedir}
|
2017-09-10 23:08:56 +02:00
|
|
|
%endif
|
2018-07-29 02:45:59 +02:00
|
|
|
|
|
|
|
|
# clean bin dir
|
|
|
|
|
rm -rf %{_builddir}/bin.$TARGET
|
|
|
|
|
|
|
|
|
|
# do the actual build
|
2017-09-10 19:04:31 +02:00
|
|
|
./build.sh -rpath %{_libdir}/klayout \
|
|
|
|
|
-bin %{_builddir}/bin.$TARGET \
|
|
|
|
|
-build %{_builddir}/build.$TARGET \
|
2018-07-29 02:45:59 +02:00
|
|
|
%{buildopt}
|
2017-09-10 17:05:27 +02:00
|
|
|
|
2017-09-10 20:35:23 +02:00
|
|
|
cp -p LICENSE Changelog CONTRIB %{_builddir}
|
2018-06-19 23:15:29 +02:00
|
|
|
strip %{_builddir}/bin.$TARGET/*.so
|
|
|
|
|
strip %{_builddir}/bin.$TARGET/*/*.so
|
|
|
|
|
strip %{_builddir}/bin.$TARGET/*/*/*.so
|
|
|
|
|
strip %{_builddir}/bin.$TARGET/klayout
|
|
|
|
|
strip %{_builddir}/bin.$TARGET/strm*
|
2017-09-10 20:35:23 +02:00
|
|
|
|
2017-09-10 17:05:27 +02:00
|
|
|
%install
|
2017-09-10 19:04:31 +02:00
|
|
|
|
2017-09-11 22:13:02 +02:00
|
|
|
TARGET="linux-release"
|
2017-09-10 19:04:31 +02:00
|
|
|
|
2018-10-22 22:45:26 +02:00
|
|
|
# create and populate pylib
|
2018-06-19 23:15:29 +02:00
|
|
|
mkdir -p %{buildroot}%{pylib}/klayout
|
|
|
|
|
cp -pd %{_builddir}/bin.$TARGET/pymod/klayout/*.so %{buildroot}%{pylib}/klayout
|
|
|
|
|
cp -pd %{_builddir}/bin.$TARGET/pymod/klayout/*.py %{buildroot}%{pylib}/klayout
|
2018-10-22 22:45:26 +02:00
|
|
|
chmod 644 %{buildroot}%{pylib}/klayout/*
|
2018-10-22 21:58:56 +02:00
|
|
|
for d in tl db rdb; do
|
|
|
|
|
mkdir -p %{buildroot}%{pylib}/klayout/$d
|
|
|
|
|
cp -pd %{_builddir}/bin.$TARGET/pymod/klayout/$d/*.py %{buildroot}%{pylib}/klayout/$d
|
2018-10-22 22:45:26 +02:00
|
|
|
chmod 644 %{buildroot}%{pylib}/klayout/$d/*
|
2018-10-22 21:58:56 +02:00
|
|
|
done
|
2018-10-22 22:45:26 +02:00
|
|
|
|
|
|
|
|
# create and populate libdir
|
|
|
|
|
mkdir -p %{buildroot}%{_libdir}/klayout
|
|
|
|
|
mkdir -p %{buildroot}%{_libdir}/klayout/db_plugins
|
|
|
|
|
mkdir -p %{buildroot}%{_libdir}/klayout/lay_plugins
|
2017-09-10 20:35:23 +02:00
|
|
|
cp -pd %{_builddir}/bin.$TARGET/lib*.so* %{buildroot}%{_libdir}/klayout
|
2018-06-19 23:15:29 +02:00
|
|
|
cp -pd %{_builddir}/bin.$TARGET/db_plugins/lib*.so* %{buildroot}%{_libdir}/klayout/db_plugins
|
|
|
|
|
cp -pd %{_builddir}/bin.$TARGET/lay_plugins/lib*.so* %{buildroot}%{_libdir}/klayout/lay_plugins
|
|
|
|
|
chmod 644 %{buildroot}%{_libdir}/klayout/*.so*
|
|
|
|
|
chmod 644 %{buildroot}%{_libdir}/klayout/db_plugins/*.so*
|
|
|
|
|
chmod 644 %{buildroot}%{_libdir}/klayout/lay_plugins/*.so*
|
2018-10-22 22:45:26 +02:00
|
|
|
|
|
|
|
|
# create and populate bindir
|
|
|
|
|
mkdir -p %{buildroot}%{_bindir}
|
2017-09-10 20:35:23 +02:00
|
|
|
cp -pd %{_builddir}/bin.$TARGET/klayout %{_builddir}/bin.$TARGET/strm* %{buildroot}%{_bindir}
|
|
|
|
|
chmod 755 %{buildroot}%{_bindir}/*
|
2018-10-22 22:45:26 +02:00
|
|
|
|
|
|
|
|
# other files
|
2017-09-10 19:04:31 +02:00
|
|
|
install -Dm644 %{_sourcedir}/etc/%{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
|
2017-09-10 20:35:23 +02:00
|
|
|
install -Dm644 %{_sourcedir}/etc/logo.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
|
2017-09-16 01:42:56 +02:00
|
|
|
|
|
|
|
|
# TODO: remove this? This macro does not expand to anything in SuSE 42.x
|
|
|
|
|
#%if 0%{?suse_version}%{?sles_version}
|
|
|
|
|
#%suse_update_desktop_file -n %{name}
|
|
|
|
|
#%endif
|
2017-09-10 17:05:27 +02:00
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%defattr(-,root,root)
|
2017-09-10 20:35:23 +02:00
|
|
|
%doc LICENSE
|
|
|
|
|
%doc Changelog
|
|
|
|
|
%doc CONTRIB
|
2017-09-10 17:05:27 +02:00
|
|
|
%{_bindir}/klayout
|
|
|
|
|
%{_bindir}/strm*
|
2018-06-20 00:28:40 +02:00
|
|
|
%{pylib}/klayout/*
|
2017-09-10 17:05:27 +02:00
|
|
|
%{_libdir}/klayout/*
|
|
|
|
|
%{_datadir}/applications/%{name}.desktop
|
|
|
|
|
%{_datadir}/pixmaps/%{name}.png
|
|
|
|
|
|
|
|
|
|
%changelog
|