kicad-doc/kicad-doc.spec
Dave Plater 2c9af27964 Accepting request 627053 from home:plater
- Update to version 5.0.0, rebase verbose-a2x-debug.patch.
- Is now dual GPL-3.0+ and CC-BY-SA-3.0 licensed
- Added Chinese documentation.

OBS-URL: https://build.opensuse.org/request/show/627053
OBS-URL: https://build.opensuse.org/package/show/electronics/kicad-doc?expand=0&rev=20
2018-08-04 05:22:47 +00:00

318 lines
8.9 KiB
RPMSpec

#
# spec file for package kicad-doc
#
# Copyright (c) 2018 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/
#
# No texlive-collection-langjapanese in 42.1 or 13.2
%if 0%{?suse_version} > 1320 || 0%{?sle_version} >= 120200
%bcond_without japanese
%else
%bcond_with japanese
%endif
%bcond_without italian
#eeschema_pdf_en fails to build in obs but builds local.
%bcond_with pdf
Name: kicad-doc
Version: 5.0.0
Release: 0
Summary: Documentation and tutorials for KiCad
#-or-later
License: GPL-3.0-or-later AND CC-BY-SA-3.0
Group: Documentation/Other
Url: http://kicad-pcb.org
Source: https://github.com/KiCad/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0: verbose-a2x-debug.patch
# PATCH-FIX-OPENSUSE kicad-doc-notimestamp.patch davejplater@gmail.com -- Remove time stamped footer from html pages.
Patch1: kicad-doc-notimestamp.patch
BuildRequires: asciidoc >= 8.6.9
BuildRequires: cmake
BuildRequires: dblatex >= 0.3.4
BuildRequires: fdupes
BuildRequires: gettext >= 0.18
BuildRequires: git
BuildRequires: libxslt-tools
BuildRequires: po4a >= 0.45
BuildRequires: source-highlight
%if %{with pdf}
BuildRequires: texlive-collection-langeuropean
BuildRequires: texlive-collection-langfrench
BuildRequires: texlive-collection-langgerman
BuildRequires: texlive-collection-langitalian
%if %{with japanese}
BuildRequires: texlive-collection-langjapanese
BuildRequires: vlgothic-fonts
%endif
BuildRequires: texlive-collection-langcyrillic
BuildRequires: texlive-collection-langpolish
BuildRequires: texlive-collection-langspanish
BuildRequires: texlive-collection-latexrecommended
BuildRequires: texlive-collection-xetex
BuildRequires: texlive-euenc
BuildRequires: texlive-gnu-freefont-fonts
BuildRequires: texlive-xetexref
%endif
BuildRequires: perl(Unicode::LineBreak)
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: kicad = %{version}
%description
Kicad is an open source software for the creation of electronic
schematic diagrams and printed circuit board artwork.
This is the documentation package for KiCad. It contains documentation
and tutorials.
%package en
Summary: English documentation and tutorials for KiCad
Group: Documentation/Other
Provides: locale(kicad-doc:en)
Requires: kicad-doc = %{version}
%description en
This package contains English documentation and tutorials for KiCad
%package fr
Summary: French documentation and tutorials for KiCad
Group: Documentation/Other
Provides: locale(kicad-doc:fr)
Requires: kicad-doc = %{version}
%description fr
This package contains French documentation and tutorials for KiCad
%if %{with italian}
%package it
Summary: Italian documentation and tutorials for KiCad
Group: Documentation/Other
Provides: locale(kicad-doc:it)
Requires: kicad-doc = %{version}
%description it
This package contains Italian documentation and tutorials for KiCad
%endif
%if %{with japanese}
%package ja
Summary: Japanese documentation and tutorials for KiCad
Group: Documentation/Other
Provides: locale(kicad-doc:ja)
Requires: kicad-doc = %{version}
%description ja
This package contains Japanese documentation and tutorials for KiCad
%endif
%package nl
Summary: Netherlandian documentation and tutorials for KiCad
Group: Documentation/Other
Provides: locale(kicad-doc:nl)
Requires: kicad-doc = %{version}
%description nl
This package contains Netherlandian documentation and tutorials for KiCad
%package pl
Summary: Polish documentation and tutorials for KiCad
Group: Documentation/Other
Provides: locale(kicad-doc:pl)
Requires: kicad-doc = %{version}
%description pl
This package contains Polish documentation and tutorials for KiCad
%package ca
Summary: Catalan documentation and tutorials for KiCad
Group: Documentation/Other
Provides: locale(kicad-doc:ca)
Requires: kicad-doc = %{version}
%description ca
This package contains Catalan documentation and tutorials for KiCad
%package de
Summary: German documentation and tutorials for KiCad
Group: Documentation/Other
Provides: locale(kicad-doc:de)
Requires: kicad-doc = %{version}
%description de
This package contains German documentation and tutorials for KiCad
%package es
Summary: Spanish documentation and tutorials for KiCad
Group: Documentation/Other
Provides: locale(kicad-doc:es)
Requires: kicad-doc = %{version}
%description es
This package contains Spanish documentation and tutorials for KiCad
%package ru
Summary: Russian documentation and tutorials for KiCad
Group: Documentation/Other
Provides: locale(kicad-doc:ru)
Requires: kicad-doc = %{version}
%description ru
This package contains Russian documentation and tutorials for KiCad
%package id
Summary: Indonesian documentation and tutorials for KiCad
Group: Documentation/Other
Provides: locale(kicad-doc:id)
Requires: kicad-doc = %{version}
%description id
This package contains Indonesian documentation and tutorials for KiCad
%package zh
Summary: Chinese documentation and tutorials for KiCad
Group: Documentation/Other
Provides: locale(kicad-doc:id)
Requires: kicad-doc = %{version}
%description zh
This package contains Chinese documentation and tutorials for KiCad
%prep
%setup -q
# Fix documentation path
sed -i "s|share/doc/kicad|share/doc/packages/kicad|" CMakeModules/KiCadDocumentation.cmake
%patch0
%patch1
# FIXME
%if %{without japanese}
# Delete japanese translation due to build problems
find src/ -name 'addendum.ja' -type f -delete -print
find src/ -name 'ja.po' -type f -delete -print
%endif
#Problems with italian too
%if %{without italian}
find src/ -name 'addendum.it' -type f -delete -print
find src/ -name 'it.po' -type f -delete -print
%endif
%build
%if %{with pdf}
%cmake
%else
%cmake -DBUILD_FORMATS:STRING=html
%endif
make all %{?_smp_mflags}
#make cvpcb
#make gerbview
#make getting_started_in_kicad
#make idf_exporter
#make kicad
#make pcbnew
#make plugins
#make pl_editor
#make gui_translation_howto
%if 1 == 0
make eeschema_pdf_ru
make eeschema_pdf_fr
make eeschema_pdf_es
make eeschema_pdf_de
make eeschema_pdf_pl
make eeschema_pdf_en
%endif
%install
%cmake_install
%fdupes -s %{buildroot}%{_datadir}/doc/packages/kicad/help/en
%fdupes -s %{buildroot}%{_datadir}/doc/packages/kicad/help/fr
%fdupes -s %{buildroot}%{_datadir}/doc/packages/kicad/help/nl
%fdupes -s %{buildroot}%{_datadir}/doc/packages/kicad/help/pl
%fdupes -s %{buildroot}%{_datadir}/doc/packages/kicad/help/ca
%fdupes -s %{buildroot}%{_datadir}/doc/packages/kicad/help/de
%fdupes -s %{buildroot}%{_datadir}/doc/packages/kicad/help/es
%fdupes -s %{buildroot}%{_datadir}/doc/packages/kicad/help/ru
%fdupes -s %{buildroot}%{_datadir}/doc/packages/kicad/help/id
%if %{with italian}
%fdupes -s %{buildroot}%{_datadir}/doc/packages/kicad/help/it
%endif
%if %{with japanese}
%fdupes -s %{buildroot}%{_datadir}/doc/packages/kicad/help/ja
%endif
%files
%defattr(-,root,root)
%dir %{_datadir}/doc/packages/kicad/
%dir %{_datadir}/doc/packages/kicad/help/
%doc AUTHORS_README.adoc CHEATSHEET.adoc README.adoc
%license LICENSE.adoc
%files en
%defattr(-,root,root)
%{_datadir}/doc/packages/kicad/help/en/
%files fr
%defattr(-,root,root)
%{_datadir}/doc/packages/kicad/help/fr/
%if %{with italian}
%files it
%defattr(-,root,root)
%{_datadir}/doc/packages/kicad/help/it/
%endif
%if %{with japanese}
%files ja
%defattr(-,root,root)
%{_datadir}/doc/packages/kicad/help/ja/
%endif
%files nl
%defattr(-,root,root)
%{_datadir}/doc/packages/kicad/help/nl/
%files pl
%defattr(-,root,root)
%{_datadir}/doc/packages/kicad/help/pl/
%files ca
%defattr(-,root,root)
%{_datadir}/doc/packages/kicad/help/ca/
%files de
%defattr(-,root,root)
%{_datadir}/doc/packages/kicad/help/de/
%files es
%defattr(-,root,root)
%{_datadir}/doc/packages/kicad/help/es/
%files ru
%defattr(-,root,root)
%{_datadir}/doc/packages/kicad/help/ru/
%files id
%defattr(-,root,root)
%{_datadir}/doc/packages/kicad/help/id/
%files zh
%defattr(-,root,root)
%{_datadir}/doc/packages/kicad/help/zh/
# There's clearly a changelog tag
%changelog