kicad/kicad.spec

129 lines
3.7 KiB
RPMSpec

#
# spec file for package kicad
#
# Copyright (c) 2013 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/
#
%define with_gost 0
# with_gost variable sets technical standard:
# 0 - international
# 1 - GOST
# it is sole difference between kicad.spec and kicad-gost.spec
%if 0%{?with_gost}
Name: kicad-gost
%else
Name: kicad
%endif
Version: 20130331
Release: 0
License: GPL-2.0+
%if 0%{?with_gost}
Summary: EDA software suite for the creation of schematics and PCB with GOST support
%else
Summary: EDA software suite for the creation of schematics and PCB
%endif
Group: Productivity/Scientific/Electronics
Url: http://kicad-pcb.org
# bzr branch lp:kicad/stable stable
# bzr export -r 3261 --root=kicad-[version] kicad-[version].tar.bz
Source: kicad-%{version}.tar.bz2
Patch0: kicad-2012.01.19-gcc-4.7.patch
Patch1: kicad-2012.01.19-build-with-old-wxwidgets.patch
BuildRequires: boost-devel
BuildRequires: cmake >= 2.4.6
BuildRequires: doxygen
BuildRequires: freeglut-devel
BuildRequires: gcc-c++
BuildRequires: update-desktop-files
BuildRequires: zlib-devel
%if 0%{?suse_version} < 1140
BuildRequires: wxGTK-devel >= 2.8
%else
BuildRequires: wxWidgets-devel >= 2.8.11
%endif
# fix directory owner
BuildRequires: hicolor-icon-theme
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: kicad-library
Recommends: kicad-doc
%if 0%{?with_gost}
Conflicts: kicad
Provides: kicad = %{version}
%endif
%description
Kicad is an open source (GPL) software for the creation of electronic schematic
diagrams and printed circuit board artwork up to 16 layers.
Kicad is a set of four softwares and a project manager:
- Eeschema: schematic entry
- Pcbnew: board editor
- Gerbview: GERBER viewer (photoplotter documents)
- Cvpcb: footprint selector for components used in the circuit design
- Kicad: project manager
%prep
%setup -q -n kicad-%{version}
%if 0%{?suse_version} > 1210
%patch0 -p1
%endif
%if 0%{?suse_version} <= 1110
%patch1 -p1
%endif
# 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 \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DwxWidgets_USE_STATIC=OFF \
-DwxUSE_UNICODE=ON \
%if 0%{?with_gost}
-DKICAD_GOST=ON \
%endif
-DKICAD_STABLE_VERSION=ON \
.
make %{?_smp_mflags}
%install
rm resources/linux/mime/applications/eeschema.desktop
make install DESTDIR="%buildroot"
%suse_update_desktop_file -r kicad "Education;Engineering"
%files
%defattr(-,root,root)
%doc COPYRIGHT.txt CHANGELOG.txt
%{_bindir}/*
%{_datadir}/kicad/
%{_datadir}/doc/kicad/
%{_libdir}/kicad/plugins/netlist_form_pads-pcb.xsl
%dir %{_libdir}/kicad/
%dir %{_libdir}/kicad/plugins/
%{_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-kicad-project.*
%{_datadir}/icons/hicolor/*/apps/*.*
%changelog