kicad/kicad.spec
Dmitry Roshchin db9811936e Accepting request 346954 from home:Dmitry_R:branches:electronics
- Update to version 4.0.0
  Changes from previous stable release:
  * New graphics rendering backend GAL (OpenGL and Cairo)
  * New s-expression based pcb format (.kicad_pcb)
  * New footprint library format (.pretty folder with .kicad_mod footprints)
  * Updated footprint editor
  * More advanced footprint manager concept called footprint library table (fp-lib-table)
  * Ability to download footprints on the fly from git repositories
  * Official libraries are now stored on github and regularly updated
  * Awesome/Advanced Push and Shove (PnS) router (only usable with GAL renderer)
  * Interactive differential trace routing and tuning
  * Interactive trace length tuning
  * Much more realistic 3D board rendering
  * Intelligent library search with preview in Eeschema
  * Initial Python api for Pcbnew

OBS-URL: https://build.opensuse.org/request/show/346954
OBS-URL: https://build.opensuse.org/package/show/electronics/kicad?expand=0&rev=11
2015-12-01 08:13:43 +00:00

152 lines
5.1 KiB
RPMSpec

#
# spec file for package kicad
#
# Copyright (c) 2015 SUSE LINUX 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: kicad
Version: 4.0.0
Release: 0
Summary: EDA software suite for the creation of schematics and PCB
License: GPL-2.0+ and GPL-3.0+
Group: Productivity/Scientific/Electronics
Url: http://kicad-pcb.org
Source: https://launchpad.net/kicad/4.0/%{version}/+download/kicad-%{version}.tar.xz
# License file was removed due to GPL-3.0+ code
# https://github.com/KiCad/kicad-source-mirror/commit/681090b8ef3a362af75e8ca4417e18622747b63b
Source2: COPYRIGHT.txt
# PATCH-FEATURE-OPENSUSE kicad-user-library.patch -- add user library path
Patch1: kicad-user-library.patch
# PATCH-FEATURE-OPENSUSE kicad-library-repos-install.patch
Patch2: kicad-library-repos-install.patch
%if 0%{?suse_version} > 1320
BuildRequires: boost-devel >= 1.56
%else
BuildRequires: boost_1_58_0-devel
%endif
BuildRequires: cmake
BuildRequires: doxygen
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: pkg-config
BuildRequires: python-devel
BuildRequires: update-desktop-files
# Use direct version to avoid problems with wx 3.2
BuildRequires: wxWidgets-3_0-devel >= 3
# Fix bug in old python-wxWidgets-3_0-devel
BuildRequires: python-wxWidgets-3_0 >= 3
BuildRequires: python-wxWidgets-3_0-devel >= 3
BuildRequires: swig
BuildRequires: pkgconfig(bzip2)
BuildRequires: pkgconfig(cairo)
BuildRequires: pkgconfig(glew)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(zlib)
# Fix directory owner
BuildRequires: hicolor-icon-theme
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: %{name}-library-install
Requires: python-wxWidgets-3_0 >= 3
Recommends: %{name}-doc
Obsoletes: kicad = 20140120
%description
Kicad is an open source (GPL) software for the creation of electronic schematic
diagrams and printed circuit with up to 32 copper layers and additional techinical layers.
KiCad includes a project manager and four main independent software tools:
- Eeschema: schematic editor.
- Pcbnew: printed circuit board editor.
- Gerbview: GERBER file viewer (photoplotter documents).
- Cvpcb: footprint selector for components association.
%package library-install
Summary: Script for KiCad libraries downloading
Group: Productivity/Scientific/Electronics
Obsoletes: %{name}-library
Requires: %{name} = %{version}
Requires: curl
Requires: git-core
Requires: sed
%description library-install
Kicad is an open source (GPL) software for the creation of electronic schematic
diagrams and printed circuit with up to 32 copper layers and additional techinical layers.
This package contains script for KiCad libraries downloading.
%prep
%setup -q -n kicad-%{version}
%patch1 -p1
%patch2 -p1
cp %{SOURCE2} .
# Fix plugin directory
sed -i 's|KICAD_PLUGINS lib/kicad/plugins|KICAD_PLUGINS %{_lib}/kicad/plugins|' CMakeLists.txt
# Fix documentation directory
sed -i 's|KICAD_DOCS share/doc/kicad|KICAD_DOCS share/doc/packages/kicad|' CMakeLists.txt
%build
%cmake \
-DKICAD_REPO_NAME=stable \
-DKICAD_BUILD_VERSION=%{version} \
-DKICAD_SKIP_BOOST=ON \
-DBUILD_GITHUB_PLUGIN=ON \
-DKICAD_SCRIPTING=ON \
-DKICAD_SCRIPTING_MODULES=ON \
-DKICAD_SCRIPTING_WXPYTHON=ON
make %{?_smp_mflags}
%install
%cmake_install
%suse_update_desktop_file -r bitmap2component "Education;Engineering"
%suse_update_desktop_file -r cvpcb "Education;Engineering"
%suse_update_desktop_file -r eeschema "Education;Engineering"
%suse_update_desktop_file -r gerbview "Education;Engineering"
%suse_update_desktop_file -r kicad "Education;Engineering"
%suse_update_desktop_file -r pcbcalculator "Education;Engineering"
%suse_update_desktop_file -r pcbnew "Education;Engineering"
install -D scripts/library-repos-install.sh %{buildroot}%{_bindir}/kicad-library-install.sh
%fdupes -s %{buildroot}%{_datadir}/kicad
%fdupes -s %{buildroot}%{_datadir}/icons/hicolor
%files
%defattr(-,root,root)
%doc CHANGELOG.txt COPYRIGHT.txt
%{_bindir}/*
%exclude %{_bindir}/kicad-library-install.sh
%{_libdir}/kicad/
%{_datadir}/kicad/
%{_datadir}/doc/packages/kicad/
%{python_sitelib}/*
%{_datadir}/applications/*.desktop
%{_datadir}/mime/packages/kicad.xml
%{_datadir}/mimelnk/application/x-kicad-*.desktop
%dir %{_datadir}/mimelnk/
%dir %{_datadir}/mimelnk/application/
%{_datadir}/icons/hicolor/*/mimetypes/application-x-*
%{_datadir}/icons/hicolor/*/apps/*.*
%files library-install
%defattr(-,root,root)
%{_bindir}/kicad-library-install.sh
%changelog