%global full_version r17121-d4cea0f2 Name: kicad Version: r17121 # Higher epoch than stable builds to make sure your nightly builds are prioritized # if you enabled the nightly build repo Epoch: 100 Release: d4cea0f2%{?dist} Summary: Electronic schematic diagrams and printed circuit board artwork License: AGPLv3+ URL: http://www.kicad-pcb.org # Source files generated by builder.sh Source0: %{name}-%{full_version}.tar.gz Source1: %{name}-i18n-%{full_version}.tar.gz Source2: %{name}-templates-%{full_version}.tar.gz Source3: %{name}-symbols-%{full_version}.tar.gz Source4: %{name}-footprints-%{full_version}.tar.gz Source5: %{name}-packages3D-%{full_version}.tar.gz Source6: %{name}-doc-%{full_version}.tar.gz # https://bugs.launchpad.net/kicad/+bug/1755752 ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 ppc64le BuildRequires: cmake BuildRequires: desktop-file-utils BuildRequires: doxygen BuildRequires: gcc-c++ BuildRequires: gettext BuildRequires: git BuildRequires: libappstream-glib BuildRequires: swig BuildRequires: boost-devel BuildRequires: glew-devel BuildRequires: glm-devel BuildRequires: libcurl-devel BuildRequires: libngspice-devel BuildRequires: openssl-devel BuildRequires: python3-wxpython4 BuildRequires: python3-devel BuildRequires: wxGTK3-devel # For F32 and up, use opencascade rather than the community edition. %if 0%{?fedora} > 31 %define CASCADE KICAD_USE_OCC BuildRequires: opencascade-devel %else %define CASCADE KICAD_USE_OCE BuildRequires: OCE-devel %endif # Documentation BuildRequires: asciidoc BuildRequires: po4a Requires: electronics-menu Requires: python3-wxpython4 %description KiCad is an open-source software tool for the creation of electronic schematic diagrams and PCB artwork. It does not present any board-size limitation and it can handle up to 32 copper layers, 14 technical layers and 4 auxiliary layers. Beneath its singular surface, KiCad incorporates an elegant ensemble of the following software tools: KiCad (project manager), Eeschema (schematic editor and component editor), Pcbnew (circuit board layout editor and footprint editor) and GerbView (Gerber viewer). %package packages3d Summary: 3D models for KiCad License: CC-BY-SA BuildArch: noarch Requires: kicad %description packages3d 3D models for KiCad. %package doc Summary: Documentation for KiCad License: GPLv3+ BuildArch: noarch %description doc Documentation for KiCad. %prep %setup -q -n %{name}-%{full_version} -a 1 -a 2 -a 3 -a 4 -a 5 -a 6 %build # KiCad application %cmake \ -DUSE_WX_GRAPHICS_CONTEXT=OFF \ -DUSE_WX_OVERLAY=OFF \ -DKICAD_SCRIPTING=ON \ -DKICAD_SCRIPTING_MODULES=ON \ -DKICAD_SCRIPTING_WXPYTHON=ON \ -DKICAD_SCRIPTING_WXPYTHON_PHOENIX=ON \ -DKICAD_SCRIPTING_PYTHON3=ON \ -DKICAD_SCRIPTING_ACTION_MENU=ON \ -D%{CASCADE}=ON \ -DKICAD_INSTALL_DEMOS=ON \ -DBUILD_GITHUB_PLUGIN=ON \ -DKICAD_SPICE=ON \ -DKICAD_VERSION_EXTRA=r17121-d4cea0f2 \ -DCMAKE_BUILD_TYPE=Debug \ . %make_build # Localization mkdir %{name}-i18n-%{full_version}/build/ pushd %{name}-i18n-%{full_version}/build/ %cmake \ -DKICAD_I18N_UNIX_STRICT_PATH=ON \ .. %make_build popd # Templates pushd %{name}-templates-%{full_version}/ %cmake . %make_build popd # Symbol libraries pushd %{name}-symbols-%{full_version}/ %cmake . %make_build popd # Footprint libraries pushd %{name}-footprints-%{full_version}/ %cmake . %make_build popd # 3D models pushd %{name}-packages3D-%{full_version}/ %cmake . %make_build popd # Documentation (HTML only) mkdir %{name}-doc-%{full_version}/build/ pushd %{name}-doc-%{full_version}/build/ %cmake \ -DBUILD_FORMATS=html \ .. %make_build popd %install # KiCad application %make_install %{__cp} -p AUTHORS.txt %{buildroot}%{_docdir}/%{name}/ # Localization pushd %{name}-i18n-%{full_version}/build/ %make_install popd # Desktop integration for desktopfile in %{buildroot}%{_datadir}/applications/*.desktop ; do desktop-file-install \ --dir %{buildroot}%{_datadir}/applications \ --remove-category Development \ --delete-original \ ${desktopfile} done # Templates pushd %{name}-templates-%{full_version}/ %make_install popd # Symbol libraries pushd %{name}-symbols-%{full_version}/ %make_install popd # Footprint libraries pushd %{name}-footprints-%{full_version}/ %make_install popd # 3D models pushd %{name}-packages3D-%{full_version}/ %make_install popd # Documentation pushd %{name}-doc-%{full_version}/build/ %make_install popd %find_lang %{name} %check appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/*.appdata.xml %files -f %{name}.lang %{_bindir}/* %{_libdir}/%{name}/ %{_libdir}/libkicad_3dsg.so* %{python3_sitelib}/*pcbnew* %{python3_sitelib}/__pycache__/* %{_datadir}/%{name}/ %exclude %{_datadir}/%{name}/modules/packages3d/* %{_datadir}/appdata/*.xml %{_datadir}/applications/*.desktop %{_datadir}/icons/hicolor/*/mimetypes/application-x-*.* %{_datadir}/icons/hicolor/*/apps/*.* %{_datadir}/mime/packages/*.xml %license LICENSE.README LICENSE.GPLv3 LICENSE.AGPLv3 %files packages3d %{_datadir}/%{name}/modules/packages3d/*.3dshapes/ %license %{name}-packages3D-%{full_version}/LICENSE.md %files doc %{_docdir}/%{name}/ %license %{name}-doc-%{full_version}/LICENSE.adoc %changelog