From 673e703044d2d55bf886f62979be0dcc1fa7c427007fe922cec1a69b2d8894c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= Date: Mon, 29 Jul 2024 12:28:23 +0000 Subject: [PATCH] - update to 8.0.4: See https://www.kicad.org/blog/2024/07/KiCad-8.0.4-Release/ for details OBS-URL: https://build.opensuse.org/package/show/electronics/kicad-doc?expand=0&rev=94 --- .gitattributes | 23 +++ .gitignore | 1 + _multibuild | 4 + kicad-doc-8.0.3.tar.bz2 | 3 + kicad-doc-8.0.4.tar.bz2 | 3 + kicad-doc-notimestamp.patch | 14 ++ kicad-doc.changes | 361 ++++++++++++++++++++++++++++++++++++ kicad-doc.spec | 283 ++++++++++++++++++++++++++++ 8 files changed, 692 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _multibuild create mode 100644 kicad-doc-8.0.3.tar.bz2 create mode 100644 kicad-doc-8.0.4.tar.bz2 create mode 100644 kicad-doc-notimestamp.patch create mode 100644 kicad-doc.changes create mode 100644 kicad-doc.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..1792833 --- /dev/null +++ b/_multibuild @@ -0,0 +1,4 @@ + + pdf + html + diff --git a/kicad-doc-8.0.3.tar.bz2 b/kicad-doc-8.0.3.tar.bz2 new file mode 100644 index 0000000..6f63e40 --- /dev/null +++ b/kicad-doc-8.0.3.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e2653791e1c35e48b9a7e635a5cfb6692b88ec43f9e538c7f5730844bb4de455 +size 90958460 diff --git a/kicad-doc-8.0.4.tar.bz2 b/kicad-doc-8.0.4.tar.bz2 new file mode 100644 index 0000000..2380e90 --- /dev/null +++ b/kicad-doc-8.0.4.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6d0e77b9eb7a2bd83f74b34f1aae83d15c509b1e0c4f534bdab75d7ec1f8e42d +size 91098101 diff --git a/kicad-doc-notimestamp.patch b/kicad-doc-notimestamp.patch new file mode 100644 index 0000000..3c1c0f0 --- /dev/null +++ b/kicad-doc-notimestamp.patch @@ -0,0 +1,14 @@ +Index: CMakeLists.txt +=================================================================== +--- CMakeLists.txt.orig 2017-04-13 10:18:48.656747496 +0200 ++++ CMakeLists.txt 2017-04-13 13:10:55.648428778 +0200 +@@ -31,6 +31,9 @@ include( AsciidocHelpers ) + # Add the common asciidoc options + add_adoc_option( -b html5 ) + add_adoc_option( -a toc2 ) ++add_adoc_option( -a footer-style=none ) ++add_adoc_option( --verbose ) ++add_a2x_option( --verbose ) + add_adoc_option( --section-numbers ) + if( NOT "${ADOC_TOOLCHAIN}" MATCHES "ASCIIDOCTOR" ) + # --theme parameter not supported by asciidoctor diff --git a/kicad-doc.changes b/kicad-doc.changes new file mode 100644 index 0000000..fb9c555 --- /dev/null +++ b/kicad-doc.changes @@ -0,0 +1,361 @@ +------------------------------------------------------------------- +Mon Jul 29 08:21:59 UTC 2024 - Stefan Brüns + +- update to 8.0.4: + See https://www.kicad.org/blog/2024/07/KiCad-8.0.4-Release/ for details + +------------------------------------------------------------------- +Wed Jun 12 00:04:12 UTC 2024 - Stefan Brüns + +- update to 8.0.3: + See https://www.kicad.org/blog/2024/06/KiCad-8.0.3-Release/ for details + +------------------------------------------------------------------- +Mon May 6 13:48:13 UTC 2024 - Stefan Brüns + +- update to 8.0.2: + See https://www.kicad.org/blog/2024/04/KiCad-8.0.2-Release/ for details + +------------------------------------------------------------------- +Fri Mar 15 11:10:26 UTC 2024 - Stefan Brüns + +- update to 8.0.1: + See https://www.kicad.org/blog/2024/03/KiCad-8.0.1-Release/ for details + +------------------------------------------------------------------- +Sun Feb 25 07:41:33 UTC 2024 - Stefan Brüns + +- update to 8.0.0: + See https://www.kicad.org/blog/2024/02/KiCad-8.0.0-Release/ for details + +------------------------------------------------------------------- +Thu Feb 22 12:49:36 UTC 2024 - Dominique Leuenberger + +- Use %autosetup macro. Allows to eliminate the usage of deprecated + %patchN + +------------------------------------------------------------------- +Mon Jan 1 07:29:52 UTC 2024 - Stefan Brüns + +- update to 7.0.10: + See https://www.kicad.org/blog/2023/12/KiCad-7.0.10-Release/ for details + +------------------------------------------------------------------- +Thu Dec 7 21:23:17 UTC 2023 - Stefan Brüns + +- update to 7.0.9: + See https://www.kicad.org/blog/2023/11/KiCad-7.0.9-Release/ for details +- update to 7.0.8: + See https://www.kicad.org/blog/2023/09/KiCad-7.0.8-Release/ for details +- Update asciidoc fixups/workarounds + +------------------------------------------------------------------- +Mon Sep 11 11:03:21 UTC 2023 - Stefan Brüns + +- update to 7.0.7: + See https://www.kicad.org/blog/2023/08/KiCad-7.0.7-Release/ for details. + +------------------------------------------------------------------- +Mon Aug 14 11:49:28 UTC 2023 - Stefan Brüns + +- update to 7.0.6: + See https://www.kicad.org/blog/2023/07/KiCad-7.0.6-Release/ for details. + +------------------------------------------------------------------- +Sat Jun 3 14:48:29 UTC 2023 - Stefan Brüns + +- update to 7.0.5: + See https://www.kicad.org/blog/2023/05/KiCad-7.0.5-Release/ for details. + +------------------------------------------------------------------- +Tue Apr 25 02:01:48 UTC 2023 - Stefan Brüns + +- update to 7.0.2: + See https://www.kicad.org/blog/2023/04/KiCad-7.0.2-Release/ for details. + +------------------------------------------------------------------- +Sat Mar 11 03:59:46 UTC 2023 - Stefan Brüns + +- update to 7.0.1: + See https://www.kicad.org/blog/2023/03/KiCad-7.0.1-Release/ for details. + +------------------------------------------------------------------- +Tue Feb 14 18:34:09 UTC 2023 - Stefan Brüns + +- update to 7.0.0: + See https://www.kicad.org/blog/2023/02/Version-7.0.0-Released/ for details. +- Disabled pdf generation, PDF generation using asciidoc+dblatex + is no longer supported by upstream and fails to build. + +------------------------------------------------------------------- +Thu Jan 26 03:34:50 UTC 2023 - Stefan Brüns + +- update to 6.0.11: + See https://www.kicad.org/blog/2023/01/KiCad-6.0.11-Release/ for details. + +------------------------------------------------------------------- +Sat Nov 5 22:40:52 UTC 2022 - Stefan Brüns + +- Update to version 6.0.9 + See https://www.kicad.org/blog/2022/10/KiCad-6.0.9-Release/ for details. + +------------------------------------------------------------------- +Fri Oct 28 23:52:23 UTC 2022 - Stefan Brüns + +- Update to version 6.0.8 + See https://www.kicad.org/blog/2022/09/KiCad-6.0.8-Release/ for details. + +------------------------------------------------------------------- +Sun Aug 28 18:06:16 UTC 2022 - Stefan Brüns + +- Update to version 6.0.7 + See https://www.kicad.org/blog/2022/07/KiCad-6.0.7-Release/ for details. + +------------------------------------------------------------------- +Tue Jun 21 19:10:44 UTC 2022 - Stefan Brüns + +- Update to version 6.0.6 + See https://www.kicad.org/blog/2022/06/KiCad-6.0.6-Release/ for details. + +------------------------------------------------------------------- +Fri May 13 19:39:26 UTC 2022 - Stefan Brüns + +- Update to version 6.0.5 + See https://www.kicad.org/blog/2022/05/KiCad-6.0.5-Release/ for details. + +------------------------------------------------------------------- +Sat Mar 19 03:17:58 UTC 2022 - Stefan Brüns + +- Update to version 6.0.4 + See https://www.kicad.org/blog/2022/03/KiCad-6.0.4-Release/ for details. + +------------------------------------------------------------------- +Fri Feb 11 04:35:48 UTC 2022 - Stefan Brüns + +- Update to version 6.0.2 + See https://www.kicad.org/blog/2022/02/KiCad-6.0.2-Release/ for details. + +------------------------------------------------------------------- +Tue Jan 25 05:17:01 UTC 2022 - Stefan Brüns + +- Update to version 6.0.1 + See https://www.kicad.org/blog/2022/01/KiCad-6.0.1-Release/ for details. + +------------------------------------------------------------------- +Sat Dec 25 16:56:09 UTC 2021 - Stefan Brüns + +- Update to version 6.0.0 + See https://www.kicad.org/blog/2021/12/KiCad-6.0.0-Release/ for details. + +------------------------------------------------------------------- +Thu Nov 18 03:32:50 UTC 2021 - Stefan Brüns + +- Update to version 5.1.12 + See https://kicad.org/blog/2021/11/KiCad-5.1.12-Release/ for details. + +------------------------------------------------------------------- +Sat Oct 30 13:13:23 UTC 2021 - Stefan Brüns + +- Update to version 5.1.11 + See https://kicad.org/blog/2021/11/KiCad-5.1.11-Release/ for details. +- Replace references to old domain (hijacked) with kicad.org + https://www.kicad.org/blog/2021/10/Avoid-links-to-former-kicad-domain/ + +------------------------------------------------------------------- +Tue Apr 27 17:51:44 UTC 2021 - Stefan Brüns + +- Update to version 5.1.10 + See https://kicad.org/blog/2021/05/KiCad-5.1.10-Release/ for details. + +------------------------------------------------------------------- +Wed Dec 30 18:28:50 UTC 2020 - Stefan Brüns + +- Update to version 5.1.9 + See https://kicad.org/blog/2020/12/KiCad-5.1.9-Release/ for details. + +------------------------------------------------------------------- +Fri Nov 6 12:20:49 UTC 2020 - Stefan Brüns + +- Update to version 5.1.8 + See https://kicad.org/blog/2020/11/KiCad-5.1.8-Release/ for details. + +------------------------------------------------------------------- +Mon Sep 28 20:09:37 UTC 2020 - Stefan Brüns + +- Update to minor release 5.1.7, no changelog provided + +------------------------------------------------------------------- +Fri May 29 12:00:53 UTC 2020 - Stefan Brüns + +- Update to minor release 5.1.6 + * Various smaller changes to the manuals and its translations +- Adjust dependencies and language provides + +------------------------------------------------------------------- +Mon Nov 18 22:01:57 UTC 2019 - Stefan Brüns + +- Update to minor release 5.1.5 + * Various smaller changes to the manuals and its translations + +------------------------------------------------------------------- +Wed Aug 7 18:06:26 UTC 2019 - Stefan Brüns + +- Update to minor release 5.1.4 + * Various smaller changes to the manuals and its translations + +------------------------------------------------------------------- +Thu Apr 25 19:43:37 UTC 2019 - Stefan Brüns + +- Update to minor release 5.1.2 + * Updates to chinese and italian translations + +------------------------------------------------------------------- +Tue Apr 16 15:46:57 UTC 2019 - Stefan Brüns + +- Update to minor release 5.1.1 + * Various smaller changes and translation updates + +------------------------------------------------------------------- +Tue Mar 12 22:45:18 UTC 2019 - Stefan Brüns + +- Update to minor release 5.1.0 + * Various smaller changes and translation updates + * (Empty) nl translation package removed +- Build PDF and HTML documentation as _multibuild + * Remove dblatex BuildRequires for HTML build + +------------------------------------------------------------------- +Thu Dec 6 09:56:38 UTC 2018 - davejplater@gmail.com + +- Update to release 5.0.2 in line with kicad update. + +------------------------------------------------------------------- +Sat Oct 13 14:23:22 UTC 2018 - Stefan Brüns + +- Update to bugfix release 5.0.1 + * Various smaller changes and translation updates +- Remove verbose-a2x-debug.patch, no longer needed + +------------------------------------------------------------------- +Sat Sep 29 23:45:52 UTC 2018 - Stefan Brüns + +- Require kicad-doc-en from other translation subpackages + to provide a fallback for incomplete translations. + +------------------------------------------------------------------- +Sun Aug 5 00:24:13 UTC 2018 - stefan.bruens@rwth-aachen.de + +- Cleanup spec file: + * Remove unused BuildRequires: git + * Reduce BuildRequires:, use only required TeX packages instead of + the collection metapackages + * Remove commented out commands + * Drop default %defattr + * Use %_docdir instead of %_datadir +- Make build reproducible: + * Fix randomly selected Warning symbol image + * Force SOURCE_DATE_EPOCH usage in TeX +- Disable PDF generation on old distributions only, which + fail to build due to a XeTeX bug +- Fix zh subpackage: + * set correct language in locale(kicad-doc:zh) Provides + * include in fdupes run + +------------------------------------------------------------------- +Sun Jul 22 15:32:43 UTC 2018 - davejplater@gmail.com + +- 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. + +------------------------------------------------------------------- +Mon Sep 4 14:04:53 UTC 2017 - davejplater@gmail.com + +- Update to version 4.0.7 +- Link requires to the same kicad version + +------------------------------------------------------------------- +Thu Apr 13 11:29:41 UTC 2017 - davejplater@gmail.com + +- Removed time stamp from pages with kicad-doc-notimestamp.patch + +------------------------------------------------------------------- +Thu Mar 23 12:14:14 UTC 2017 - xxxxxmichl@googlemail.com + +- update to version 4.0.6 +- Enabled indonesian language + +------------------------------------------------------------------- +Thu Jan 12 09:50:34 UTC 2017 - davejplater@gmail.com + +- Update to version 4.0.5 +- Disabled problematic pdf builds, html is needed for kicad help. +- Enabled Japanese and 42.x Italian packages html builds ok. + +------------------------------------------------------------------- +Mon Sep 12 08:24:41 UTC 2016 - davejplater@gmail.com + +- Update to version 4.0.4 +- Added new packages for Catalan, Russian, Spanish and German. +- Added verbose-a2x-debug.patch for verbose a2x output. + +------------------------------------------------------------------- +Mon Mar 21 09:10:54 UTC 2016 - dmitry_r@opensuse.org + +- Update to version 4.0.2 + +------------------------------------------------------------------- +Wed Dec 2 15:39:50 UTC 2015 - dmitry_r@opensuse.org + +- Update to version 4.0.0 + +------------------------------------------------------------------- +Fri Sep 25 21:40:12 UTC 2015 - dmitry_r@opensuse.org + +- Update to version 4.0.0~20150925 + +------------------------------------------------------------------- +Wed Jul 31 20:26:57 UTC 2013 - dmitry_r@opensuse.org + +- Update to version 20130728 + +------------------------------------------------------------------- +Tue Apr 9 16:06:15 UTC 2013 - werner.ho@gmx.de + +- update to version 20130409 + +------------------------------------------------------------------- +Fri Jan 25 13:38:32 UTC 2013 - dmitry_r@opensuse.org + +- Update to version 20130120 +- Change license to SUSE-OldFSFDocLicense [bnc#796377] + +------------------------------------------------------------------- +Fri Dec 28 13:05:24 UTC 2012 - dmitry_r@opensuse.org + +- spec file cleanup + +------------------------------------------------------------------ +Fri May 27 21:00:00 UTC 2011 - werner.ho@gmx.de + +- new version 2011-04-29 + +------------------------------------------------------------------- +Tue Apr 13 15:43:10 UTC 2010 - mhopf@novell.com + +- Update to 2010-04-06-SVN2508 + +------------------------------------------------------------------- +Thu Dec 16 21:00:00 UTC 2008 - werner.ho@gmx.de + +- directory fix for openSUSE 11.1 + +------------------------------------------------------------------- +Sat Oct 04 21:00:00 UTC 2008 - werner.ho@gmx.de + +- new version 1.1 + +------------------------------------------------------------------ +Thu Mar 25 21:00:00 UTC 2008 - werner.ho@gmx.de + +- initial build of the kicad documentation package version 1.0 diff --git a/kicad-doc.spec b/kicad-doc.spec new file mode 100644 index 0000000..a3484b2 --- /dev/null +++ b/kicad-doc.spec @@ -0,0 +1,283 @@ +# +# spec file for package kicad-doc +# +# Copyright (c) 2024 SUSE LLC +# +# 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 https://bugs.opensuse.org/ +# + + +%global flavor @BUILD_FLAVOR@%{nil} +%define sname kicad-doc + +%if "%flavor" == "" +ExclusiveArch: do_not_build +%endif + +%if "%flavor" == "pdf" +%define pkg_suffix -pdf +%bcond_without pdf +# Disabled, fails to build, asciidoc+dblatex no longer supported by upstream +# E.g. https://gitlab.com/kicad/services/kicad-doc/-/issues/808 +ExclusiveArch: do_not_build +%endif + +%if "%flavor" == "html" +%bcond_with pdf +%endif + +Name: kicad-doc%{?pkg_suffix} +Version: 8.0.4 +Release: 0 +Summary: Documentation and tutorials for KiCad +License: CC-BY-SA-3.0 AND GPL-3.0-or-later +Group: Documentation/HTML +URL: https://www.kicad.org +Source: https://gitlab.com/kicad/services/%{sname}/-/archive/%{version}/%{sname}-%{version}.tar.bz2#/%{sname}-%{version}.tar.bz2 +# PATCH-FIX-OPENSUSE kicad-doc-notimestamp.patch davejplater@gmail.com -- Remove time stamped footer from html pages. +Patch0: kicad-doc-notimestamp.patch +BuildRequires: asciidoc >= 8.6.9 +BuildRequires: cmake +BuildRequires: fdupes +BuildRequires: gettext >= 0.18 +BuildRequires: libxslt-tools +BuildRequires: po4a >= 0.45 +BuildRequires: source-highlight +BuildRequires: perl(Unicode::LineBreak) +%if %{with pdf} +BuildRequires: dblatex >= 0.3.4 +BuildRequires: texlive-babel-catalan +BuildRequires: texlive-babel-dutch +BuildRequires: texlive-babel-french +BuildRequires: texlive-babel-german +BuildRequires: texlive-babel-italian +BuildRequires: texlive-babel-polish +BuildRequires: texlive-babel-russian +BuildRequires: texlive-babel-spanish +BuildRequires: texlive-fandol +BuildRequires: texlive-gnu-freefont +BuildRequires: texlive-xetex +BuildRequires: vlgothic-fonts +BuildRequires: tex(8r.enc) +BuildRequires: tex(bahasa.ldf) +BuildRequires: tex(cmap.sty) +BuildRequires: tex(eu1enc.def) +BuildRequires: tex(fancybox.sty) +BuildRequires: tex(japanese.ldf) +BuildRequires: tex(mathptmx.sty) +BuildRequires: tex(mathrsfs.sty) +BuildRequires: tex(pcrr8t.tfm) +BuildRequires: tex(phvb8t.tfm) +BuildRequires: tex(psyr.tfm) +BuildRequires: tex(ptmr8t.tfm) +BuildRequires: tex(pzdr.tfm) +BuildRequires: tex(upquote.sty) +BuildRequires: tex(xeCJK.sty) +BuildRequires: tex(xltxtra.sty) +# kicad-doc owns the directories +BuildRequires: kicad-doc +%endif +BuildArch: noarch +Recommends: 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 ca +Summary: Catalan documentation and tutorials for KiCad +Group: Documentation/Other +Provides: locale(%{name}:ca) +Requires: %{name}-en = %{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(%{name}:de) +Requires: %{name}-en = %{version} + +%description de +This package contains German documentation and tutorials for KiCad + +%package en +Summary: English documentation and tutorials for KiCad +Group: Documentation/Other +Provides: locale(%{name}:en) +Requires: kicad = %{version} +Requires: kicad-doc = %{version} + +%description en +This package contains English documentation and tutorials for KiCad + +%package es +Summary: Spanish documentation and tutorials for KiCad +Group: Documentation/Other +Provides: locale(%{name}:es) +Requires: %{name}-en = %{version} + +%description es +This package contains Spanish documentation and tutorials for KiCad + +%package fr +Summary: French documentation and tutorials for KiCad +Group: Documentation/Other +Provides: locale(%{name}:fr) +Requires: %{name}-en = %{version} + +%description fr +This package contains French documentation and tutorials for KiCad + +%package id +Summary: Indonesian documentation and tutorials for KiCad +Group: Documentation/Other +Provides: locale(%{name}:id) +Requires: %{name}-en = %{version} + +%description id +This package contains Indonesian documentation and tutorials for KiCad + +%package it +Summary: Italian documentation and tutorials for KiCad +Group: Documentation/Other +Provides: locale(%{name}:it) +Requires: %{name}-en = %{version} + +%description it +This package contains Italian documentation and tutorials for KiCad + +%package ja +Summary: Japanese documentation and tutorials for KiCad +Group: Documentation/Other +Provides: locale(%{name}:ja) +Requires: %{name}-en = %{version} + +%description ja +This package contains Japanese documentation and tutorials for KiCad + +%package pl +Summary: Polish documentation and tutorials for KiCad +Group: Documentation/Other +Provides: locale(%{name}:pl) +Requires: %{name}-en = %{version} + +%description pl +This package contains Polish documentation and tutorials for KiCad + +%package ru +Summary: Russian documentation and tutorials for KiCad +Group: Documentation/Other +Provides: locale(%{name}:ru) +Requires: %{name}-en = %{version} + +%description ru +This package contains Russian documentation and tutorials for KiCad + +%package zh +Summary: Chinese documentation and tutorials for KiCad +Group: Documentation/Other +Provides: locale(%{name}:zh) +Requires: %{name}-en = %{version} + +%description zh +This package contains Chinese documentation and tutorials for KiCad + +%prep +%autosetup -p0 -n %{sname}-%{version} + +# asciidoc errors out if the `[code]` style is used with an unknown language +# https://gitlab.com/kicad/services/kicad-doc/-/issues/851 +find . -iname \*adoc -exec sed -i -e 's/\[code/\[source/' '{}' \; +# Fix incorrect column with specifiers +# https://gitlab.com/kicad/services/kicad-doc/-/issues/852 +find . -iname \*adoc -exec sed -i -e '/\[.*cols=/ { :m s/\(cols=.*\)\([0-9]\)%/\1\2/g ; t m }' '{}' \; +# asciidoc interprets the '[--...]' on a new line as a style name +find . -iname cli.adoc -exec sed -i -e 's/^\[--/ \[--/' '{}' \; + +# These files are actually GIFs, https://gitlab.com/kicad/services/kicad-doc/-/issues/822 +mv src/gerbview/images/zh/gerbview_x2_attribute.{png,gif} +mv src/gerbview/images/zh/gerbview_x2_component.{png,gif} +mv src/gerbview/images/zh/gerbview_x2_net.{png,gif} + +%if %{with pdf} +# Workaround for dblatex bug #117 - randomly selected warning symbol +cp /usr/share/dblatex/latex/graphics/warning.pdf CMakeSupport/ +%endif + +%build +# Supported output formats: html;pdf;epub; +%if %{with pdf} +# SOURCE_DATE_EPOCH affirmation variable used by TeX +export FORCE_SOURCE_DATE=1 +# Do not build PL translations, bad interaction of po4a, asciidoc and xetex (gh#KiCad/kicad-doc#697) +# RU also fails, "Undefined control sequence \cyrchar." +%cmake -DKICAD_DOC_PATH=%{_docdir}/kicad/help -DADOC_TOOLCHAIN=asciidoc -DPDF_GENERATOR=dblatex -DBUILD_FORMATS='pdf;' -DLANGUAGES='ca;de;en;es;fr;id;it;ja;zh' +%else +%cmake -DKICAD_DOC_PATH=%{_docdir}/kicad/help -DADOC_TOOLCHAIN=asciidoc -DBUILD_FORMATS='html;' +%endif +%{make_jobs} + +%install +%cmake_install + +for lang in ca de en es fr id it ja pl ru zh ; do + %fdupes %{buildroot}%{_docdir}/kicad/help/$lang +done + +%if %{without pdf} +%files +%dir %{_docdir}/kicad/ +%dir %{_docdir}/kicad/help/ +%doc AUTHORS_README.adoc CHEATSHEET.adoc README.adoc +%license LICENSE.adoc +%endif + +%files ca +%{_docdir}/kicad/help/ca/ + +%files de +%{_docdir}/kicad/help/de/ + +%files en +%{_docdir}/kicad/help/en/ + +%files es +%{_docdir}/kicad/help/es/ + +%files fr +%{_docdir}/kicad/help/fr/ + +%files id +%{_docdir}/kicad/help/id/ + +%files it +%{_docdir}/kicad/help/it/ + +%files ja +%{_docdir}/kicad/help/ja/ + +%if %{without pdf} +%files pl +%{_docdir}/kicad/help/pl/ + +%files ru +%{_docdir}/kicad/help/ru/ +%endif + +%files zh +%{_docdir}/kicad/help/zh/ + +%changelog