File horizon-next.spec of Package horizon-next
#
# spec file for package horizon
#
# Copyright (c) 2020 Frank Kunz
#
# 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.
%define reponame horizon
Name: %{reponame}-next
Version: 0.0
Release: 0
Summary: A free EDA package
License: GPL-3.0-only
Group: Productivity/Scientific/Electronics
Url: https://github.com/horizon-eda/horizon.git
Source0: %{reponame}-%{version}.tar
BuildRequires: binutils-gold
BuildRequires: cppzmq-devel
%if 0%{?suse_version} >= 1600
BuildRequires: gcc-c++
BuildRequires: pkgconfig(libpodofo)
%else
BuildRequires: gcc11-c++
BuildRequires: libpodofo-devel
%endif
BuildRequires: git
BuildRequires: glm-devel
BuildRequires: gtkmm3-devel
BuildRequires: libcurl-devel
BuildRequires: libepoxy-devel
BuildRequires: libgit2-devel
BuildRequires: libopenssl-devel
BuildRequires: librsvg-devel
BuildRequires: libzip-devel
BuildRequires: libzmq5
BuildRequires: occt-devel
BuildRequires: pkgconfig
BuildRequires: pkgconfig(cairo)
BuildRequires: pkgconfig(uuid)
BuildRequires: pkgconfig(libarchive)
BuildRequires: pkgconfig(zlib)
BuildRequires: boost-devel
BuildRequires: sqlite3-devel
BuildRequires: update-desktop-files
BuildRequires: yaml-cpp-devel
BuildRequires: libspnav-devel
BuildRequires: meson
###zypper in -y git make gcc gcc-c++ pkg-config cppzmq-devel occt-devel gtkmm3-devel libgit2-devel libuuid-devel sqlite3-devel librsvg-devel cairomm-devel glm-devel boost-devel libcurl-devel libpodofo-devel binutils-gold libarchive-devel libspnav-devel python3 meson cmake
%description
Horizon is a free EDA package.
%prep
%setup -q -n %{reponame}-%{version}
%build
%if 0%{?suse_version} < 1600
export CC=gcc-11
export CXX=g++-11
# patching legacy libpodofo mess
cp -r /usr/lib64/pkgconfig /tmp
export PKG_CONFIG_PATH=/tmp/pkgconfig
sed -i 's/-lpodofo-0/-lpodofo/g' /tmp/pkgconfig/libpodofo-0.pc
sed -i "s/podofo = dependency('libpodofo')/podofo = dependency('libpodofo-0')/g" meson.build
%endif
%meson
%meson_build horizon-eda horizon-imp
%install
%meson_install
%suse_update_desktop_file -r org.horizon_eda.HorizonEDA Education Engineering
%files
%doc CHANGELOG.md README.md SUPPORT.md doc/pool.pdf
%doc %{_mandir}/man1/horizon-eda.1.gz
%doc %{_mandir}/man1/horizon-imp.1.gz
%license LICENSE
%{_bindir}/horizon-*
%{_datadir}/icons/hicolor/*
%{_datadir}/applications/*
%{_datadir}/metainfo/*
%changelog