# Rawhide uses coinstallable LLVM 22 and Binaryen 125 compatibility tools. Source900: ../zotero.spec#/zotero-common.inc # The submission selects the target; Fedora-review initially parses on its host. %global gecko_version 140.15.0 %global source_commit 80bc5565e000c3f24c37e0020713a41ec9f42e09 %global __provides_exclude_from ^%{_libdir}/zotero/.*$ %global __requires_exclude ^(libclearkey|liblgpllibs|libmozavcodec|libmozavutil|libmozgtk|libmozsandbox|libmozsqlite3|libmozwayland|libxul|libgkcodecs)\.so.*$ Name: zotero-src Version: 10.0.3 Release: 2%{?dist} Summary: Zotero desktop application License: AGPL-3.0-only AND GPL-3.0-only AND MPL-2.0 AND LGPL-2.1-only AND MIT AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND BSL-1.0 AND Zlib AND W3C AND Unicode-3.0 AND Unicode-DFS-2016 AND CC-BY-4.0 AND CC-BY-SA-3.0 AND CC0-1.0 AND OFL-1.1 AND Knuth-CTAN AND LicenseRef-Rsfs AND LicenseRef-Liberation AND (Apache-2.0 WITH LLVM-exception) URL: https://www.zotero.org # Exported at source_commit with sources/prepare-zotero-source.py; # source-commits.txt records the recursively pinned submodules. Source0: zotero-%{version}-source.tar.xz Source1: https://archive.mozilla.org/pub/firefox/releases/%{gecko_version}esr/source/firefox-%{gecko_version}esr.source.tar.xz # Prepared from the exported lockfiles with sources/prepare-npm-sources.py. Source2: zotero-%{version}-npm-sources.tar.xz Source3: scripts/prepare-source.py Source4: scripts/install-npm-offline.py Source5: scripts/prepare-gecko.py Source6: config/gecko.mozconfig Source7: scripts/prepare-application.py Source8: config/zotero.desktop Source9: scripts/check-citeproc-preview.cjs Source10: scripts/editor-source-inputs.py Source11: https://github.com/ProseMirror/prosemirror-tables/archive/a99f70855f2b3e2433bc77451fedd884305fda5b/prosemirror-tables-a99f70855f2b3e2433bc77451fedd884305fda5b.tar.gz # The registry gitHead is unreachable; all four implementation files match its # published source-map sourcesContent byte-for-byte at this upstream commit. Source12: https://github.com/atlassian/prosemirror-utils/archive/d34dac47b291da9a8a74aeca25ef57b0450fd133/prosemirror-utils-d34dac47b291da9a8a74aeca25ef57b0450fd133.tar.gz Source13: scripts/check-editor-dependencies.cjs Source14: https://github.com/liberationfonts/liberation-1.7-fonts/archive/dbeb786b4ede1eaec2ec5cb8d3b75d21641e2a35/liberation-1.7-fonts-dbeb786b4ede1eaec2ec5cb8d3b75d21641e2a35.tar.gz # Retain original Liberation 1.07.4 TTFs. FontsPolicy source generation is a # conditional SHOULD, not the program-binary MUST. Current FontForge changes # glyph count/order used by PDF.js scaling and annotation embedding; avoid a # renamed font fork. Source14 supplies corresponding editable sources/notices. # Policy: packaging/guidelines commit 721795c3754e16b157d14de00d89789708498f87, # FontsPolicy.adoc (Building), what-can-be-packaged.adoc (content binaries). # Original TypeScript inputs omitted from the npm distributions in Source2. # Keep the tested readable generated modules; supplying generator inputs does # not require another compiler pipeline (what-can-be-packaged.adoc). Source15: https://github.com/projectfluent/fluent.js/archive/88582193c29a689241a4f7b2ca7086c802840264/fluent.js-88582193c29a689241a4f7b2ca7086c802840264.tar.gz Source16: https://github.com/projectfluent/fluent.js/archive/f07305556f92bf19acfccc9621adf99dd8f434d8/fluent.js-f07305556f92bf19acfccc9621adf99dd8f434d8.tar.gz Source17: https://github.com/darkreader/darkreader/archive/52e1169ce25da2a08fce86a05fc6d70b923f9dfd/darkreader-52e1169ce25da2a08fce86a05fc6d70b923f9dfd.tar.gz Source18: https://github.com/AbeJellinek/sentencex-ts/archive/b70514b1bafc81215f6defc37265df9a7b0c8520/sentencex-ts-b70514b1bafc81215f6defc37265df9a7b0c8520.tar.gz Source19: https://github.com/101arrowz/fflate/archive/d3243651cb142e3e04f3e4bc037b9e985878f444/fflate-d3243651cb142e3e04f3e4bc037b9e985878f444.tar.gz Source20: https://github.com/ka-weihe/fastest-levenshtein/archive/03d621ba324d0f665b3b7f557429ca622560d9a3/fastest-levenshtein-03d621ba324d0f665b3b7f557429ca622560d9a3.tar.gz # Registry gitHead identifies this snapshot. Its manifest still says 1.8.0; # both tracked JS implementations match npm 1.8.1 except CRLF line endings. Source21: https://github.com/qwertie/btree-typescript/archive/e54ffd3c042fd066be55262751691b271413794c/btree-typescript-e54ffd3c042fd066be55262751691b271413794c.tar.gz Source22: https://github.com/tinymce/tinymce/archive/54c877e17a350900c795ba939f7b2bf24411cb90/tinymce-54c877e17a350900c795ba939f7b2bf24411cb90.tar.gz # Zotero intentionally retains the 4.6.7 paste plugin (upstream c7d05ad2f9ec). # Readable release files replace minified desktop code, not compiler inputs. Source23: https://registry.npmjs.org/tinymce/-/tinymce-4.9.4.tgz Source24: https://registry.npmjs.org/tinymce/-/tinymce-4.6.7.tgz Source25: https://github.com/tinymce/tinymce/archive/6b1c354e63ef0c01314b44a7c7115c433a1b8fb3/tinymce-6b1c354e63ef0c01314b44a7c7115c433a1b8fb3.tar.gz Source26: scripts/prepare-tinymce.py # Upstream blocks automated downloads. Verbatim retained template; provenance and # checksum are recorded in sources/OFL-PROVENANCE.md. Source27: sources/OFL.txt Source28: scripts/collect-mathjax-notices.py Source29: https://raw.githubusercontent.com/JedWatson/react-select/1d9f5c8335eff27ec8be71de588528f552f422f9/LICENSE#/react-select-LICENSE Source30: https://raw.githubusercontent.com/nodejs/node/v7.0.0/LICENSE#/node-v7-LICENSE Source31: scripts/deduplicate-licenses.py Source32: spec/components-sources.inc Source33: spec/components-metadata.inc Source34: spec/components-prep.inc Source35: spec/components-build.inc Source36: spec/components-check.inc # GPL version 3 is selected for GPL-2.0-or-later/GPL-3.0-or-later translators. Source37: https://raw.githubusercontent.com/spdx/license-list-data/v3.27.0/text/GPL-3.0-only.txt # Pinned sources for private build stages; no component RPM hand-off. Source40: https://codeload.github.com/microsoft/TypeScript/tar.gz/3ec598c947cdcda4349f7f8615d6344c9673235f#/typescript-3ec598c947cdcda4349f7f8615d6344c9673235f.tar.gz Source41: packages/typescript-source-js/build.py#/typescript-source-js-build.py Source42: packages/typescript-source-js/check.cjs#/typescript-source-js-check.cjs Source43: https://github.com/facebook/react/archive/f1338f8080abd1386454a10bbf93d67bfe37ce85/react-f1338f8080abd1386454a10bbf93d67bfe37ce85.tar.gz Source44: react-18.3.1-npm-sources.tar.xz Source45: packages/react-js/build.py#/react-js-build.py Source46: packages/react-js/esbuild-plugin.cjs#/react-js-esbuild-plugin.cjs Source47: packages/react-js/check.cjs#/react-js-check.cjs Source48: packages/react-js/package.json#/react-js-package.json Source49: packages/react-js/package-lock.json#/react-js-package-lock.json Source50: scripts/install-npm-offline.py#/react-js-install-npm-offline.py Source51: https://codeload.github.com/facebook/prop-types/tar.gz/70330a4430ba74467b41b8b4aa8c97a4814327a9#/prop-types-70330a4430ba74467b41b8b4aa8c97a4814327a9.tar.gz Source52: https://codeload.github.com/sindresorhus/object-assign/tar.gz/a89774b252c91612203876984bbd6addbe3b5a0e#/object-assign-a89774b252c91612203876984bbd6addbe3b5a0e.tar.gz Source53: packages/prop-types-js/build.py#/prop-types-js-build.py Source54: packages/prop-types-js/check.cjs#/prop-types-js-check.cjs Source55: https://github.com/moroshko/react-autosuggest/archive/a1ebd7d29aa60a355898664c45916d581abd1b4e/react-autosuggest-a1ebd7d29aa60a355898664c45916d581abd1b4e.tar.gz Source56: https://github.com/markdalgleish/react-themeable/archive/0f15ce521684303b00e749148c5947a03093c522/react-themeable-0f15ce521684303b00e749148c5947a03093c522.tar.gz Source57: https://github.com/moroshko/section-iterator/archive/7f4a37aa714535d0ef4e5888b0a21e42db934573/section-iterator-7f4a37aa714535d0ef4e5888b0a21e42db934573.tar.gz Source58: https://github.com/moroshko/shallow-equal/archive/0a70685ec379d9064df1e12c4c0855809ccaeff8/shallow-equal-0a70685ec379d9064df1e12c4c0855809ccaeff8.tar.gz Source59: https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz Source60: https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz Source61: packages/react-autosuggest-js/react-themeable-LICENSE#/react-autosuggest-js-react-themeable-LICENSE Source62: packages/react-autosuggest-js/build.py#/react-autosuggest-js-build.py Source63: packages/react-autosuggest-js/check.cjs#/react-autosuggest-js-check.cjs Source64: https://github.com/bvaughn/react-virtualized/archive/14fcf1d446eb9fd6e20cfb94a9e35bb577914925/react-virtualized-14fcf1d446eb9fd6e20cfb94a9e35bb577914925.tar.gz Source65: https://github.com/lukeed/clsx/archive/c5b2b21ab8aea48ff0b48649f386a2c7280fabf2/clsx-c5b2b21ab8aea48ff0b48649f386a2c7280fabf2.tar.gz Source66: https://github.com/react-bootstrap/dom-helpers/archive/4ed47d44ee45815f668c26c771dd6114a3e7740a/dom-helpers-4ed47d44ee45815f668c26c771dd6114a3e7740a.tar.gz Source67: https://github.com/reactjs/react-lifecycles-compat/archive/f457b78edcf85e44285ce8a840d133917de160da/react-lifecycles-compat-f457b78edcf85e44285ce8a840d133917de160da.tar.gz Source69: react-virtualized-9.22.4-npm-sources.tar.xz Source70: packages/react-virtualized-js/build.py#/react-virtualized-js-build.py Source71: packages/react-virtualized-js/strip-flow.cjs#/react-virtualized-js-strip-flow.cjs Source72: packages/react-virtualized-js/check.cjs#/react-virtualized-js-check.cjs Source73: packages/react-virtualized-js/package.json#/react-virtualized-js-package.json Source74: packages/react-virtualized-js/package-lock.json#/react-virtualized-js-package-lock.json Source75: scripts/install-npm-offline.py#/react-virtualized-js-install-npm-offline.py Source76: https://github.com/formatjs/formatjs/archive/01fda982e6472f97260ea3035cb0a546cc903f9a/formatjs-01fda982e6472f97260ea3035cb0a546cc903f9a.tar.gz Source77: https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-7.8.4.tgz Source78: https://registry.npmjs.org/intl-messageformat-parser/-/intl-messageformat-parser-3.6.4.tgz Source79: https://github.com/formatjs/formatjs/archive/3b26952abcbb1fa625ac8b465ef6ed6136ca19d3/formatjs-3b26952abcbb1fa625ac8b465ef6ed6136ca19d3.tar.gz Source80: https://github.com/formatjs/formatjs/archive/5b218606c3ec03e332f472706fffd04153c20dae/formatjs-5b218606c3ec03e332f472706fffd04153c20dae.tar.gz Source81: https://github.com/mridgway/hoist-non-react-statics/archive/1b5fb0b06856f196544ff2dda54c9a15e451522e/hoist-non-react-statics-1b5fb0b06856f196544ff2dda54c9a15e451522e.tar.gz Source83: react-intl-3.12.1-npm-sources.tar.xz Source84: packages/react-intl-js/build.py#/react-intl-js-build.py Source85: packages/react-intl-js/generate-parser.cjs#/react-intl-js-generate-parser.cjs Source86: packages/react-intl-js/check.cjs#/react-intl-js-check.cjs Source87: packages/react-intl-js/package.json#/react-intl-js-package.json Source88: packages/react-intl-js/package-lock.json#/react-intl-js-package-lock.json Source89: scripts/install-npm-offline.py#/react-intl-js-install-npm-offline.py Source90: https://github.com/ajaxorg/ace/archive/2ccda8c1ba350415de0e949abd50888abb6645fe/ace-2ccda8c1ba350415de0e949abd50888abb6645fe.tar.gz Source91: ace-1.4.12-npm-sources.tar.xz Source92: packages/ace-js/build.py#/ace-js-build.py Source93: packages/ace-js/check.cjs#/ace-js-check.cjs Source94: packages/ace-js/package.json#/ace-js-package.json Source95: packages/ace-js/package-lock.json#/ace-js-package-lock.json Source96: scripts/install-npm-offline.py#/ace-js-install-npm-offline.py Source97: https://raw.githubusercontent.com/codemirror/codemirror5/5.58.1/LICENSE#/CodeMirror-LICENSE Source98: https://codeload.github.com/nodeca/pako/tar.gz/3c06216518c259b569a5168dee867e6dabbe5160#/pako-3c06216518c259b569a5168dee867e6dabbe5160.tar.gz Source99: packages/pako-js/build.py#/pako-js-build.py Source100: packages/pako-js/check.cjs#/pako-js-check.cjs Source101: https://github.com/KaTeX/KaTeX/archive/613c3da85b083f602c0d5265da0f735ddb728dbb/KaTeX-613c3da85b083f602c0d5265da0f735ddb728dbb.tar.gz Source102: katex-0.16.22-npm-sources.tar.xz Source103: packages/katex-js/build.py#/katex-js-build.py Source104: packages/katex-js/check.mjs#/katex-js-check.mjs Source105: packages/react-virtualized-js/strip-flow.cjs#/katex-js-strip-flow.cjs Source106: packages/katex-js/package.json#/katex-js-package.json Source107: packages/katex-js/package-lock.json#/katex-js-package-lock.json Source108: scripts/install-npm-offline.py#/katex-js-install-npm-offline.py Source109: packages/katex-js/build-fonts.py#/katex-js-build-fonts.py Source110: packages/katex-js/check-fonts.py#/katex-js-check-fonts.py Source111: https://mirrors.ctan.org/fonts/amsfonts.zip Source112: https://mirrors.ctan.org/fonts/rsfs.zip Source113: packages/katex-js/collect-font-notices.py#/katex-js-collect-font-notices.py Source114: https://github.com/mathjax/MathJax-src/archive/ad8f5c21cb810236551da8c6512ba733e67357ee/MathJax-src-ad8f5c21cb810236551da8c6512ba733e67357ee.tar.gz Source115: https://github.com/mhchem/mhchemParser/archive/2159346e2bb45ec6beaf64b617e0e5a049b4d200/mhchemParser-2159346e2bb45ec6beaf64b617e0e5a049b4d200.tar.gz Source116: packages/mathjax-chtml-js/build.cjs#/mathjax-chtml-js-build.cjs Source117: packages/mathjax-chtml-js/check.cjs#/mathjax-chtml-js-check.cjs Source118: https://github.com/microsoft/monaco-editor/archive/69991d66135e4a1fc1cf0b1ac4ad25d429866a0d/monaco-editor-69991d66135e4a1fc1cf0b1ac4ad25d429866a0d.tar.gz Source119: https://github.com/microsoft/vscode/archive/1e790d77f81672c49be070e04474901747115651/vscode-1e790d77f81672c49be070e04474901747115651.tar.gz Source120: https://github.com/microsoft/TypeScript/archive/763b5ebfd4bbf2531f46bc086b87a378119cb293/typescript-763b5ebfd4bbf2531f46bc086b87a378119cb293.tar.gz Source121: https://github.com/microsoft/vscode-loader/archive/1ff7dd122a9215d39e75544074868a6a1cd354f0/vscode-loader-1ff7dd122a9215d39e75544074868a6a1cd354f0.tar.gz Source122: https://github.com/microsoft/vscode-codicons/archive/8840a98867406d447a88bb7085fd3dd9b9ccc5cb/vscode-codicons-8840a98867406d447a88bb7085fd3dd9b9ccc5cb.tar.gz Source123: https://github.com/microsoft/vscode-css-languageservice/archive/5ff24b3deee44e5566d8629d21ee23fe4d2a8b0d/vscode-css-languageservice-5ff24b3deee44e5566d8629d21ee23fe4d2a8b0d.tar.gz Source124: https://github.com/microsoft/vscode-html-languageservice/archive/88d46217c2b4d34f84a728e142884fc7cca0d684/vscode-html-languageservice-88d46217c2b4d34f84a728e142884fc7cca0d684.tar.gz Source125: https://github.com/microsoft/vscode-json-languageservice/archive/5775d0e1b6c77b9787bd5aed2542ca51dbcc1dc1/vscode-json-languageservice-5775d0e1b6c77b9787bd5aed2542ca51dbcc1dc1.tar.gz Source126: https://github.com/microsoft/vscode-languageserver-node/archive/3cf8fabc2af1ed4e3c963493af3518043b034c16/vscode-languageserver-textdocument-3cf8fabc2af1ed4e3c963493af3518043b034c16.tar.gz Source127: https://github.com/microsoft/vscode-languageserver-node/archive/894a6b508186a96fb2ddc9e1538161ad53154f25/vscode-languageserver-types-894a6b508186a96fb2ddc9e1538161ad53154f25.tar.gz Source128: https://github.com/microsoft/vscode-uri/archive/48d2d95cf1f793b66f349401050c48b8fc73637e/vscode-uri-48d2d95cf1f793b66f349401050c48b8fc73637e.tar.gz Source129: https://github.com/microsoft/node-jsonc-parser/archive/d9b2655bbe4730a27e405063896af94f17d5b22e/jsonc-parser-d9b2655bbe4730a27e405063896af94f17d5b22e.tar.gz Source130: codicon-0.0.35-npm-sources.tar.xz Source132: packages/monaco-editor-js/build-core.cjs#/monaco-editor-js-build-core.cjs Source133: packages/monaco-editor-js/build-languages.py#/monaco-editor-js-build-languages.py Source134: packages/monaco-editor-js/build-font.py#/monaco-editor-js-build-font.py Source135: packages/monaco-editor-js/build-font.cjs#/monaco-editor-js-build-font.cjs Source136: packages/monaco-editor-js/check.cjs#/monaco-editor-js-check.cjs Source137: packages/monaco-editor-js/check-font.py#/monaco-editor-js-check-font.py Source138: packages/typescript-source-js/build.py#/monaco-editor-js-build-typescript.py Source139: scripts/install-npm-offline.py#/monaco-editor-js-install-npm-offline.py Source140: packages/monaco-editor-js/font-package.json#/monaco-editor-js-font-package.json Source141: packages/monaco-editor-js/font-package-lock.json#/monaco-editor-js-font-package-lock.json Source142: https://github.com/arshad-yaseen/monacopilot/archive/589916b428ebab80f54deb9f0f498ff205ffb630/monacopilot-589916b428ebab80f54deb9f0f498ff205ffb630.tar.gz Source143: packages/monacopilot-js/build.py#/monacopilot-js-build.py Source144: packages/monacopilot-js/check.mjs#/monacopilot-js-check.mjs Source145: https://github.com/mozilla/source-map/archive/6cc15e15ffa9e042c7add5e16ce128d1e0b08115/source-map-6cc15e15ffa9e042c7add5e16ce128d1e0b08115.tar.gz Source146: source-map-mappings-wasm-0.5.0-vendor.tar.xz Source147: packages/source-map-mappings-wasm/Cargo.lock#/source-map-mappings-wasm-Cargo.lock Source148: packages/source-map-mappings-wasm/check.mjs#/source-map-mappings-wasm-check.mjs Source149: packages/source-map-mappings-wasm/bundled-licenses.txt#/source-map-mappings-wasm-bundled-licenses.txt Source150: packages/source-map-mappings-wasm/bundled-provides.inc#/source-map-mappings-wasm-bundled-provides.inc Source151: packages/source-map-mappings-wasm/explicit-callback-import.patch#/source-map-mappings-wasm-explicit-callback-import.patch Source152: https://github.com/cormacrelf/citeproc-rs/archive/2ab195a1e6f84f0ff284813ece61dc62096abbfe/citeproc-rs-2ab195a1e6f84f0ff284813ece61dc62096abbfe.tar.gz Source153: citeproc-rs-wasm-0.2.0-vendor.tar.xz Source154: packages/citeproc-rs-wasm/Cargo.lock#/citeproc-rs-wasm-Cargo.lock Source155: packages/citeproc-rs-wasm/build-bindings.py#/citeproc-rs-wasm-build-bindings.py Source156: packages/citeproc-rs-wasm/check-bindings.cjs#/citeproc-rs-wasm-check-bindings.cjs Source157: packages/citeproc-rs-wasm/bundled-licenses.txt#/citeproc-rs-wasm-bundled-licenses.txt Source158: packages/citeproc-rs-wasm/bundled-provides.inc#/citeproc-rs-wasm-bundled-provides.inc Source159: https://static.crates.io/crates/lazy-transform-str/lazy-transform-str-0.0.6.crate Source160: packages/citeproc-rs-wasm/modern-rust.patch#/citeproc-rs-wasm-modern-rust.patch Source161: packages/citeproc-rs-wasm/smartstring-compat.patch#/citeproc-rs-wasm-smartstring-compat.patch Source162: https://github.com/AbeJellinek/csl-validator-wasm/archive/4a671b4478b2022be2f77065bf7245b3d93bdf48/csl-validator-wasm-4a671b4478b2022be2f77065bf7245b3d93bdf48.tar.gz Source163: https://github.com/citation-style-language/schema/archive/e3ce254a72c4470a5ed3b9d23b428017d25674e9/schema-e3ce254a72c4470a5ed3b9d23b428017d25674e9.tar.gz Source165: packages/csl-validator-wasm/check-validator.mjs#/csl-validator-wasm-check-validator.mjs Source166: https://github.com/mozilla/pdf.js.openjpeg/archive/8bb19dc1aeecb104ce2ed3493d41fe131fc681e0/pdf.js.openjpeg-8bb19dc1aeecb104ce2ed3493d41fe131fc681e0.tar.gz Source167: https://github.com/uclouvain/openjpeg/archive/6c4a29b00211eb0430fa0e5e890f1ce5c80f409f/openjpeg-6c4a29b00211eb0430fa0e5e890f1ce5c80f409f.tar.gz Source168: https://github.com/mozilla/pdf.js.jbig2/archive/15f6f9357c5e5e30285eb83aa08e5fe1a16ab77a/pdf.js.jbig2-15f6f9357c5e5e30285eb83aa08e5fe1a16ab77a.tar.gz Source169: pdfium-bb1f9f71e7b15afdd5937adf8cfe5807522b882f.tar.gz Source170: https://github.com/mozilla/pdf.js.quickjs/archive/e2c5bfc8194b16f5973eea5e4e025b67be3c1015/pdf.js.quickjs-e2c5bfc8194b16f5973eea5e4e025b67be3c1015.tar.gz Source171: https://github.com/bellard/quickjs/archive/3d5e064e9dd67c70f7962836505a7fa067bf0a4e/quickjs-3d5e064e9dd67c70f7962836505a7fa067bf0a4e.tar.gz Source172: https://github.com/mozilla/pdf.js.qcms/archive/bddcbcb3c2184c900620680751044ba42ece86ad/pdf.js.qcms-bddcbcb3c2184c900620680751044ba42ece86ad.tar.gz Source173: pdfjs-qcms-vendor.tar.xz Source174: packages/pdfjs-codecs/Cargo.lock#/pdfjs-codecs-Cargo.lock Source176: packages/pdfjs-codecs/bundled-licenses.txt#/pdfjs-codecs-bundled-licenses.txt Source177: packages/pdfjs-codecs/bundled-provides.inc#/pdfjs-codecs-bundled-provides.inc Source178: packages/pdfjs-codecs/check-codecs.mjs#/pdfjs-codecs-check-codecs.mjs Source179: https://github.com/microsoft/onnxruntime/archive/refs/tags/v1.27.0/onnxruntime-1.27.0.tar.gz Source180: onnxruntime-web-1.27.0-sources.tar.xz Source181: packages/onnxruntime-web-wasm/prepare-offline.py#/onnxruntime-web-wasm-prepare-offline.py Source183: packages/onnxruntime-web-wasm/check-runtime.mjs#/onnxruntime-web-wasm-check-runtime.mjs Source184: packages/onnxruntime-web-wasm/identity.prototxt#/onnxruntime-web-wasm-identity.prototxt Source185: packages/onnxruntime-web-wasm/prepare-bindings.py#/onnxruntime-web-wasm-prepare-bindings.py Source186: packages/onnxruntime-web-wasm/check-bindings.mjs#/onnxruntime-web-wasm-check-bindings.mjs Source187: https://github.com/zotero/zotero-libreoffice-integration/archive/227551c1644c6cb1156226d4db5d1b293fdb271d/zotero-libreoffice-integration-227551c1644c6cb1156226d4db5d1b293fdb271d.tar.gz Source188: packages/zotero-libreoffice-integration/prepare-extension.py#/zotero-libreoffice-integration-prepare-extension.py # Build requirements for the private source stages. Runtime bundled Provides # remain scoped to the shipped inventory in zotero.spec, not whole vendor trees. %if 0%{?fedora} > 44 BuildRequires: binaryen125 %else BuildRequires: binaryen >= 125 %endif BuildRequires: bzip2 BuildRequires: cargo >= 1.88 BuildRequires: cmake BuildRequires: emscripten-core = 4.0.22 BuildRequires: fontforge BuildRequires: fonttools BuildRequires: gcc BuildRequires: java-devel >= 17 BuildRequires: javapackages-filesystem BuildRequires: libreoffice-ure-common >= 26.2 BuildRequires: mftrace BuildRequires: mvn(com.fasterxml.jackson.core:jackson-annotations) BuildRequires: mvn(com.fasterxml.jackson.core:jackson-core) BuildRequires: mvn(com.fasterxml.jackson.core:jackson-databind) BuildRequires: mvn(net.java.dev.jna:jna) BuildRequires: patch BuildRequires: perl(JSON) BuildRequires: potrace BuildRequires: python3-brotli BuildRequires: python3-zopfli BuildRequires: rust >= 1.88 BuildRequires: rust-std-static-wasm32-unknown-unknown BuildRequires: t1utils BuildRequires: tar BuildRequires: texlive-amsfonts BuildRequires: texlive-cm BuildRequires: texlive-dvips BuildRequires: texlive-metafont BuildRequires: texlive-rsfs BuildRequires: texlive-texlive-scripts BuildRequires: ttfautohint BuildRequires: wasm-bindgen-cli = 0.2.129 BuildRequires: which ExclusiveArch: x86_64 # Build tools. RPM stages consume only the declared sources and buildroot. BuildRequires: python3 BuildRequires: python3-fonttools BuildRequires: python3.11-devel BuildRequires: gcc-c++ %if 0%{?fedora} > 44 BuildRequires: clang22 BuildRequires: clang22-libs BuildRequires: llvm22 BuildRequires: lld22 %else BuildRequires: clang >= 22 BuildRequires: clang < 23 BuildRequires: clang-libs BuildRequires: llvm BuildRequires: lld %endif BuildRequires: rust BuildRequires: cargo BuildRequires: cbindgen BuildRequires: autoconf213 BuildRequires: make BuildRequires: nasm BuildRequires: m4 BuildRequires: perl BuildRequires: pkgconf-pkg-config BuildRequires: nodejs >= 22 BuildRequires: npm >= 10 BuildRequires: golang-github-evanw-esbuild BuildRequires: zip BuildRequires: unzip BuildRequires: xz BuildRequires: rsync BuildRequires: openssl BuildRequires: findutils BuildRequires: desktop-file-utils BuildRequires: wasi-cxx-runtime = 22.1.8 BuildRequires: pkgconfig(gtk+-3.0) BuildRequires: pkgconfig(dbus-glib-1) BuildRequires: pkgconfig(xt) BuildRequires: pkgconfig(x11-xcb) BuildRequires: pkgconfig(ice) BuildRequires: pkgconfig(sm) BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(libpulse) BuildRequires: pkgconfig(nss) BuildRequires: pkgconfig(nspr) BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(libffi) BuildRequires: pkgconfig(libjpeg) BuildRequires: pkgconfig(vpx) BuildRequires: pkgconfig(libwebp) BuildRequires: pkgconfig(pixman-1) BuildRequires: pkgconfig(libevent) BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(gbm) BuildRequires: pkgconfig(libpipewire-0.3) # Native shared-library requirements are generated from ELF dependencies. Conflicts: zotero Provides: zotero = %{version}-%{release} Requires: hicolor-icon-theme Requires: %{name}-libreoffice-integration = %{version}-%{release} Provides: bundled(gecko) = %{gecko_version} Provides: bundled(source-map-mappings) = 0.5.0 Provides: bundled(crate(rand)) = 0.4.6 Provides: bundled(crate(vlq)) = 0.5.1 Provides: bundled(onnxruntime) = 1.27.0 # Static link inputs of the copied ONNX Runtime WASM, not its build tools. Provides: bundled(onnx) = 1.21.0 Provides: bundled(protobuf) = 3.21.12 Provides: bundled(re2) = 20240702 Provides: bundled(abseil-cpp) = 20250814.0 # These implementations are copied into Zotero's WASM payloads; the build # prerequisite RPMs' Provides do not describe the resulting application RPM. Provides: bundled(expat) = 2.7.1 Provides: bundled(rnv) = 1.7.11 Provides: bundled(csl-schema) = 0^e3ce254a72c4470a5ed3b9d23b428017d25674e9 Provides: bundled(openjpeg) = 0^6c4a29b00211eb0430fa0e5e890f1ce5c80f409f Provides: bundled(pdfium) = 0^bb1f9f71e7b15afdd5937adf8cfe5807522b882f Provides: bundled(quickjs) = 0^3d5e064e9dd67c70f7962836505a7fa067bf0a4e Provides: bundled(crate(qcms)) = 0.3.0 Provides: bundled(monacopilot) = 1.1.15 Provides: bundled(monacopilot-core) = 1.1.15 Provides: bundled(react) = 18.3.1 Provides: bundled(react-dom) = 18.3.1 Provides: bundled(scheduler) = 0.23.2 Provides: bundled(ace) = 1.4.12 Provides: bundled(jshint) = 2.13.6 Provides: bundled(lodash) = 4.17.23 Provides: bundled(events) = 3.3.0 Provides: bundled(react-autosuggest) = 10.1.0 Provides: bundled(react-themeable) = 1.1.0 Provides: bundled(section-iterator) = 2.0.0 Provides: bundled(shallow-equal) = 1.2.1 Provides: bundled(prop-types) = 15.8.1 Provides: bundled(@benrbray/prosemirror-math) = 1.0.0 Provides: bundled(object-assign) = 3.0.0 Provides: bundled(object-assign) = 4.1.1 Provides: bundled(pako) = 2.1.0 Provides: bundled(katex) = 0.16.22 Provides: bundled(mathjax) = 3.2.2 Provides: bundled(liberation-fonts) = 1.07.4 Provides: bundled(mhchemparser) = 4.2.1 Provides: bundled(classnames) = 2.2.6 Provides: bundled(jspath) = 0.4.0 Provides: bundled(react-virtualized) = 9.22.4 Provides: bundled(clsx) = 1.1.1 Provides: bundled(dom-helpers) = 5.2.0 Provides: bundled(react-lifecycles-compat) = 3.0.4 Provides: bundled(react-intl) = 3.12.1 Provides: bundled(intl-messageformat) = 7.8.4 Provides: bundled(intl-messageformat-parser) = 3.6.4 Provides: bundled(intl-format-cache) = 4.3.1 Provides: bundled(@formatjs/intl-utils) = 2.3.0 Provides: bundled(hoist-non-react-statics) = 3.3.2 Provides: bundled(react-is) = 18.3.1 Provides: bundled(monaco-editor) = 0.47.0 Provides: bundled(monaco-editor-core) = 0.47.0 Provides: bundled(typescript) = 5.0.2 Provides: bundled(vscode-css-languageservice) = 5.4.1 Provides: bundled(vscode-html-languageservice) = 4.2.4 Provides: bundled(vscode-json-languageservice) = 4.2.1 Provides: bundled(vscode-languageserver-textdocument) = 1.0.4 Provides: bundled(vscode-languageserver-types) = 3.16.0 Provides: bundled(vscode-uri) = 3.0.3 Provides: bundled(jsonc-parser) = 3.0.0 Provides: bundled(vscode-loader) = 1.0.0 Provides: bundled(vscode-codicons) = 0.0.35 Provides: bundled(prosemirror-commands) = 1.7.1 Provides: bundled(prosemirror-dropcursor) = 1.8.2 Provides: bundled(prosemirror-gapcursor) = 1.3.2 Provides: bundled(prosemirror-history) = 1.4.1 Provides: bundled(prosemirror-inputrules) = 1.5.0 Provides: bundled(prosemirror-keymap) = 1.2.3 Provides: bundled(prosemirror-markdown) = 1.13.2 Provides: bundled(prosemirror-model) = 1.25.2 Provides: bundled(prosemirror-schema-basic) = 1.2.4 Provides: bundled(prosemirror-schema-list) = 1.5.1 Provides: bundled(prosemirror-state) = 1.4.3 Provides: bundled(prosemirror-tables) = 1.7.1 Provides: bundled(prosemirror-transform) = 1.10.4 Provides: bundled(prosemirror-utils) = 1.2.2 Provides: bundled(prosemirror-view) = 1.40.1 Provides: bundled(tinymce) = 4.9.4 Provides: bundled(tinymce) = 4.6.7 Provides: bundled(react-select) = 3.1.0 Provides: bundled(@fluent/bundle) = 0.19.1 Provides: bundled(@fluent/react) = 0.15.2 Provides: bundled(darkreader) = 4.9.83 Provides: bundled(fflate) = 0.8.2 Provides: bundled(fastest-levenshtein) = 1.0.16 Provides: bundled(sentencex-ts) = 0.1.13~ts Provides: bundled(sorted-btree) = 1.8.1 # Additional runtime module sections in the reader, editor and worker bundles. # Build-only webpack loaders and entire development lockfiles are not included. Provides: bundled(@babel/runtime) = 7.23.8 Provides: bundled(@babel/runtime) = 7.24.8 Provides: bundled(@fluent/sequence) = 0.8.0 Provides: bundled(cached-iterable) = 0.3.0 Provides: bundled(classnames) = 2.3.2 Provides: bundled(classnames) = 2.5.1 Provides: bundled(eld) = 2.0.2 Provides: bundled(event-emitter) = 0.3.5 Provides: bundled(jszip) = 3.10.1 Provides: bundled(luaparse) = 0.3.1 Provides: bundled(pako) = 1.0.11 Provides: bundled(path-webpack) = 0.0.3 Provides: bundled(postcss-selector-parser) = 6.0.13 Provides: bundled(queue) = 6.0.2 Provides: bundled(inherits) = 2.0.4 Provides: bundled(d) = 1.0.1 Provides: bundled(es5-ext) = 0.10.62 Provides: bundled(util-deprecate) = 1.0.2 Provides: bundled(cssesc) = 3.0.0 Provides: bundled(entities) = 4.5.0 Provides: bundled(linkify-it) = 5.0.0 Provides: bundled(markdown-it) = 14.1.0 Provides: bundled(mdurl) = 2.0.0 Provides: bundled(orderedmap) = 2.1.1 Provides: bundled(punycode.js) = 2.3.1 Provides: bundled(rope-sequence) = 1.3.4 Provides: bundled(uc.micro) = 2.1.0 Provides: bundled(w3c-keyname) = 2.2.8 Provides: bundled(dom-serializer) = 2.0.0 Provides: bundled(domelementtype) = 2.3.0 Provides: bundled(domhandler) = 5.0.3 Provides: bundled(domutils) = 3.2.2 Provides: bundled(htmlparser2) = 9.1.0 Provides: bundled(@babel/runtime) = 7.12.1 Provides: bundled(@emotion/cache) = 10.0.29 Provides: bundled(@emotion/core) = 10.0.35 Provides: bundled(@emotion/css) = 10.0.27 Provides: bundled(@emotion/hash) = 0.8.0 Provides: bundled(@emotion/memoize) = 0.7.4 Provides: bundled(@emotion/serialize) = 0.11.16 Provides: bundled(@emotion/sheet) = 0.9.4 Provides: bundled(@emotion/stylis) = 0.8.5 Provides: bundled(@emotion/unitless) = 0.7.5 Provides: bundled(@emotion/utils) = 0.11.3 Provides: bundled(@emotion/weak-memoize) = 0.2.5 Provides: bundled(memoize-one) = 5.1.1 Provides: bundled(react-input-autosize) = 2.2.2 Provides: bundled(react-is) = 16.13.1 Provides: bundled(process) = 0.11.10 Provides: bundled(punycode) = 1.3.2 Provides: bundled(querystring) = 0.2.0 Provides: bundled(url) = 0.11.0 %description Zotero is a free, easy-to-use tool to help you collect, organize, cite, and share research. %package libreoffice-integration Summary: LibreOffice citation integration for Zotero License: AGPL-3.0-only BuildArch: noarch Provides: zotero-libreoffice-integration = %{version}-%{release} Obsoletes: zotero-libreoffice-integration < 10.0.3-2 Requires: java-headless >= 17 Requires: libreoffice-ure >= 26.2 Requires: mvn(net.java.dev.jna:jna) Requires: mvn(com.fasterxml.jackson.core:jackson-core) Requires: mvn(com.fasterxml.jackson.core:jackson-databind) Requires: mvn(com.fasterxml.jackson.core:jackson-annotations) %description libreoffice-integration LibreOffice citation integration built from Zotero's pinned integration sources, using Fedora's Java libraries rather than copies embedded in the extension. %prep %setup -q -n zotero-%{version} -b 1 -a 2 mkdir -p .rpm-original-sources/{fluent-bundle,fluent-react,darkreader,sentencex-ts,fflate,fastest-levenshtein,sorted-btree,tinymce} tar -xf %{SOURCE15} --strip-components=1 -C .rpm-original-sources/fluent-bundle tar -xf %{SOURCE16} --strip-components=1 -C .rpm-original-sources/fluent-react tar -xf %{SOURCE17} --strip-components=1 -C .rpm-original-sources/darkreader tar -xf %{SOURCE18} --strip-components=1 -C .rpm-original-sources/sentencex-ts tar -xf %{SOURCE19} --strip-components=1 -C .rpm-original-sources/fflate tar -xf %{SOURCE20} --strip-components=1 -C .rpm-original-sources/fastest-levenshtein tar -xf %{SOURCE21} --strip-components=1 -C .rpm-original-sources/sorted-btree tar -xf %{SOURCE22} --strip-components=1 -C .rpm-original-sources/tinymce mkdir -p .rpm-original-sources/tinymce-paste tar -xf %{SOURCE25} --strip-components=1 -C .rpm-original-sources/tinymce-paste %{__python3} %{SOURCE26} . %{SOURCE23} %{SOURCE24} # RPM's unique debugsource collector is rooted at this build subdirectory. # Keep Gecko beneath it so debugedit can collect its sources and generated files. # A hidden directory is excluded from upstream's application-source rsync. mkdir .rpm-gecko mv ../firefox-%{gecko_version} .rpm-gecko/ # Gecko supports system libffi directly; do not retain its unused private copy. rm -rf .rpm-gecko/firefox-%{gecko_version}/js/src/ctypes/libffi grep -Fqx '.;%{source_commit}' source-commits.txt mkdir -p .rpm-editor-sources/{prosemirror-tables,prosemirror-utils} tar -xf %{SOURCE11} --strip-components=1 -C .rpm-editor-sources/prosemirror-tables tar -xf %{SOURCE12} --strip-components=1 -C .rpm-editor-sources/prosemirror-utils mkdir -p .rpm-font-sources/liberation tar -xf %{SOURCE14} --strip-components=1 -C .rpm-font-sources/liberation for style in Bold BoldItalic Italic Regular; do cmp reader/pdfjs/pdf.js/external/standard_fonts/LiberationSans-$style.ttf \ document-worker/pdf.js/external/standard_fonts/LiberationSans-$style.ttf done for project in reader/pdfjs/pdf.js document-worker/pdf.js; do cp .rpm-font-sources/liberation/License.txt "$project/external/standard_fonts/LICENSE_LIBERATION" done %{__python3} %{SOURCE5} .rpm-gecko/firefox-%{gecko_version} component_sources="$PWD/.rpm-components/sources" component_tools="$PWD/.rpm-components/tools" mkdir -p "$component_sources" "$component_tools" # typescript-source-js mkdir -p "$component_tools/typescript-source-js" cp %{SOURCE41} "$component_tools/typescript-source-js/build.py" cp %{SOURCE42} "$component_tools/typescript-source-js/check.cjs" ( mkdir -p "$component_sources/typescript-source-js" cd "$component_sources/typescript-source-js" tar -xf %{SOURCE40} --strip-components=1 ) # react-js mkdir -p "$component_tools/react-js" cp %{SOURCE45} "$component_tools/react-js/build.py" cp %{SOURCE46} "$component_tools/react-js/esbuild-plugin.cjs" cp %{SOURCE47} "$component_tools/react-js/check.cjs" cp %{SOURCE48} "$component_tools/react-js/package.json" cp %{SOURCE49} "$component_tools/react-js/package-lock.json" cp %{SOURCE50} "$component_tools/react-js/install-npm-offline.py" ( mkdir -p "$component_sources/react-js" cd "$component_sources/react-js" tar -xf %{SOURCE43} --strip-components=1 tar -xf %{SOURCE44} mkdir rpm-dependencies cp "$component_tools/react-js/package.json" rpm-dependencies/package.json cp "$component_tools/react-js/package-lock.json" rpm-dependencies/package-lock.json ) # prop-types-js mkdir -p "$component_tools/prop-types-js" cp %{SOURCE53} "$component_tools/prop-types-js/build.py" cp %{SOURCE54} "$component_tools/prop-types-js/check.cjs" ( mkdir -p "$component_sources/prop-types-js" cd "$component_sources/prop-types-js" tar -xf %{SOURCE51} --strip-components=1 mkdir rpm-object-assign tar -xf %{SOURCE52} -C rpm-object-assign --strip-components=1 ) # react-autosuggest-js mkdir -p "$component_tools/react-autosuggest-js" cp %{SOURCE61} "$component_tools/react-autosuggest-js/react-themeable-LICENSE" cp %{SOURCE62} "$component_tools/react-autosuggest-js/build.py" cp %{SOURCE63} "$component_tools/react-autosuggest-js/check.cjs" ( mkdir -p "$component_sources/react-autosuggest-js" cd "$component_sources/react-autosuggest-js" tar -xf %{SOURCE55} --strip-components=1 mkdir -p rpm-dependencies/{react-themeable,section-iterator,shallow-equal,prop-types,object-assign} tar -xf %{SOURCE56} --strip-components=1 -C rpm-dependencies/react-themeable tar -xf %{SOURCE57} --strip-components=1 -C rpm-dependencies/section-iterator tar -xf %{SOURCE58} --strip-components=1 -C rpm-dependencies/shallow-equal tar -xf %{SOURCE59} --strip-components=1 -C rpm-dependencies/prop-types tar -xf %{SOURCE60} --strip-components=1 -C rpm-dependencies/object-assign ) # react-virtualized-js mkdir -p "$component_tools/react-virtualized-js" cp %{SOURCE70} "$component_tools/react-virtualized-js/build.py" cp %{SOURCE71} "$component_tools/react-virtualized-js/strip-flow.cjs" cp %{SOURCE72} "$component_tools/react-virtualized-js/check.cjs" cp %{SOURCE73} "$component_tools/react-virtualized-js/package.json" cp %{SOURCE74} "$component_tools/react-virtualized-js/package-lock.json" cp %{SOURCE75} "$component_tools/react-virtualized-js/install-npm-offline.py" ( mkdir -p "$component_sources/react-virtualized-js" cd "$component_sources/react-virtualized-js" tar -xf %{SOURCE64} --strip-components=1 tar -xf %{SOURCE69} mkdir -p rpm-dependencies/{clsx,dom-helpers,react-lifecycles-compat,prop-types} tar -xf %{SOURCE65} --strip-components=1 -C rpm-dependencies/clsx tar -xf %{SOURCE66} --strip-components=1 -C rpm-dependencies/dom-helpers tar -xf %{SOURCE67} --strip-components=1 -C rpm-dependencies/react-lifecycles-compat tar -xf %{SOURCE59} --strip-components=1 -C rpm-dependencies/prop-types mkdir rpm-build-dependencies cp "$component_tools/react-virtualized-js/package.json" rpm-build-dependencies/package.json cp "$component_tools/react-virtualized-js/package-lock.json" rpm-build-dependencies/package-lock.json ) # react-intl-js mkdir -p "$component_tools/react-intl-js" cp %{SOURCE84} "$component_tools/react-intl-js/build.py" cp %{SOURCE85} "$component_tools/react-intl-js/generate-parser.cjs" cp %{SOURCE86} "$component_tools/react-intl-js/check.cjs" cp %{SOURCE87} "$component_tools/react-intl-js/package.json" cp %{SOURCE88} "$component_tools/react-intl-js/package-lock.json" cp %{SOURCE89} "$component_tools/react-intl-js/install-npm-offline.py" ( mkdir -p "$component_sources/react-intl-js" cd "$component_sources/react-intl-js" tar -xf %{SOURCE76} --strip-components=1 tar -xf %{SOURCE83} mkdir -p rpm-dependencies/{intl-messageformat,intl-messageformat-parser,intl-format-cache,intl-utils,hoist-non-react-statics,shallow-equal} tar -xf %{SOURCE77} --strip-components=1 -C rpm-dependencies/intl-messageformat tar -xf %{SOURCE78} --strip-components=1 -C rpm-dependencies/intl-messageformat-parser tar -xf %{SOURCE79} --strip-components=3 -C rpm-dependencies/intl-format-cache formatjs-3b26952abcbb1fa625ac8b465ef6ed6136ca19d3/packages/intl-format-cache tar -xf %{SOURCE80} --strip-components=3 -C rpm-dependencies/intl-utils formatjs-5b218606c3ec03e332f472706fffd04153c20dae/packages/intl-utils tar -xf %{SOURCE81} --strip-components=1 -C rpm-dependencies/hoist-non-react-statics tar -xf %{SOURCE58} --strip-components=1 -C rpm-dependencies/shallow-equal mkdir rpm-build-dependencies cp "$component_tools/react-intl-js/package.json" rpm-build-dependencies/package.json cp "$component_tools/react-intl-js/package-lock.json" rpm-build-dependencies/package-lock.json ) # ace-js mkdir -p "$component_tools/ace-js" cp %{SOURCE92} "$component_tools/ace-js/build.py" cp %{SOURCE93} "$component_tools/ace-js/check.cjs" cp %{SOURCE94} "$component_tools/ace-js/package.json" cp %{SOURCE95} "$component_tools/ace-js/package-lock.json" cp %{SOURCE96} "$component_tools/ace-js/install-npm-offline.py" ( mkdir -p "$component_sources/ace-js" cd "$component_sources/ace-js" tar -xf %{SOURCE90} --strip-components=1 tar -xf %{SOURCE91} mkdir rpm-dependencies cp "$component_tools/ace-js/package.json" rpm-dependencies/package.json cp "$component_tools/ace-js/package-lock.json" rpm-dependencies/package-lock.json ) # pako-js mkdir -p "$component_tools/pako-js" cp %{SOURCE99} "$component_tools/pako-js/build.py" cp %{SOURCE100} "$component_tools/pako-js/check.cjs" ( mkdir -p "$component_sources/pako-js" cd "$component_sources/pako-js" tar -xf %{SOURCE98} --strip-components=1 ) # katex-js mkdir -p "$component_tools/katex-js" cp %{SOURCE103} "$component_tools/katex-js/build.py" cp %{SOURCE104} "$component_tools/katex-js/check.mjs" cp %{SOURCE105} "$component_tools/katex-js/strip-flow.cjs" cp %{SOURCE106} "$component_tools/katex-js/package.json" cp %{SOURCE107} "$component_tools/katex-js/package-lock.json" cp %{SOURCE108} "$component_tools/katex-js/install-npm-offline.py" cp %{SOURCE109} "$component_tools/katex-js/build-fonts.py" cp %{SOURCE110} "$component_tools/katex-js/check-fonts.py" cp %{SOURCE113} "$component_tools/katex-js/collect-font-notices.py" ( mkdir -p "$component_sources/katex-js" cd "$component_sources/katex-js" tar -xf %{SOURCE101} --strip-components=1 tar -xf %{SOURCE102} mkdir rpm-build-dependencies cp "$component_tools/katex-js/package.json" rpm-build-dependencies/package.json cp "$component_tools/katex-js/package-lock.json" rpm-build-dependencies/package-lock.json rm -rf dist fonts %{__python3} - <<'PY' from pathlib import Path from zipfile import ZipFile directory = Path('rpm-input-font-licenses') directory.mkdir() with ZipFile('%{SOURCE111}') as archive: (directory / 'AMS-OFL.txt').write_bytes(archive.read('amsfonts/doc/OFL.txt')) with ZipFile('%{SOURCE112}') as archive: (directory / 'RSFS-README').write_bytes(archive.read('rsfs/README')) PY ) # mathjax-chtml-js mkdir -p "$component_tools/mathjax-chtml-js" cp %{SOURCE116} "$component_tools/mathjax-chtml-js/build.cjs" cp %{SOURCE117} "$component_tools/mathjax-chtml-js/check.cjs" ( mkdir -p "$component_sources/mathjax-chtml-js" cd "$component_sources/mathjax-chtml-js" tar -xf %{SOURCE114} --strip-components=1 mkdir rpm-chemistry tar -xf %{SOURCE115} -C rpm-chemistry --strip-components=1 rm -rf js es5 rpm-chemistry/dist rpm-chemistry/esm ) # monaco-editor-js mkdir -p "$component_tools/monaco-editor-js" cp %{SOURCE132} "$component_tools/monaco-editor-js/build-core.cjs" cp %{SOURCE133} "$component_tools/monaco-editor-js/build-languages.py" cp %{SOURCE134} "$component_tools/monaco-editor-js/build-font.py" cp %{SOURCE135} "$component_tools/monaco-editor-js/build-font.cjs" cp %{SOURCE136} "$component_tools/monaco-editor-js/check.cjs" cp %{SOURCE137} "$component_tools/monaco-editor-js/check-font.py" cp %{SOURCE138} "$component_tools/monaco-editor-js/build-typescript.py" cp %{SOURCE139} "$component_tools/monaco-editor-js/install-npm-offline.py" cp %{SOURCE140} "$component_tools/monaco-editor-js/font-package.json" cp %{SOURCE141} "$component_tools/monaco-editor-js/font-package-lock.json" ( mkdir -p "$component_sources/monaco-editor-js" cd "$component_sources/monaco-editor-js" tar -xf %{SOURCE118} --strip-components=1 mkdir -p rpm-sources/dependencies rpm-font-dependencies for pair in 'vscode %{SOURCE119}' 'typescript %{SOURCE120}' 'loader %{SOURCE121}' 'codicons %{SOURCE122}' \ 'vscode-css-languageservice %{SOURCE123}' 'vscode-html-languageservice %{SOURCE124}' \ 'vscode-json-languageservice %{SOURCE125}' 'textdocument %{SOURCE126}' 'types %{SOURCE127}' \ 'vscode-uri %{SOURCE128}' 'jsonc-parser %{SOURCE129}'; do set -- $pair mkdir rpm-sources/$1 tar -xf "$2" -C rpm-sources/$1 --strip-components=1 done for package in vscode-css-languageservice vscode-html-languageservice vscode-json-languageservice vscode-uri jsonc-parser; do ln -s ../$package rpm-sources/dependencies/$package done ln -s ../textdocument/textDocument rpm-sources/dependencies/vscode-languageserver-textdocument ln -s ../types/types rpm-sources/dependencies/vscode-languageserver-types tar -xf %{SOURCE130} cp "$component_tools/monaco-editor-js/font-package.json" rpm-font-dependencies/package.json cp "$component_tools/monaco-editor-js/font-package-lock.json" rpm-font-dependencies/package-lock.json cp "$component_tools/monaco-editor-js/build-core.cjs" build-core.cjs cp "$component_tools/monaco-editor-js/build-languages.py" build-languages.py cp "$component_tools/monaco-editor-js/build-font.py" build-font.py cp "$component_tools/monaco-editor-js/build-font.cjs" build-font.cjs cp "$component_tools/monaco-editor-js/build-typescript.py" build-typescript.py ) # monacopilot-js mkdir -p "$component_tools/monacopilot-js" cp %{SOURCE143} "$component_tools/monacopilot-js/build.py" cp %{SOURCE144} "$component_tools/monacopilot-js/check.mjs" ( mkdir -p "$component_sources/monacopilot-js" cd "$component_sources/monacopilot-js" tar -xf %{SOURCE142} --strip-components=1 ) # source-map-mappings-wasm mkdir -p "$component_tools/source-map-mappings-wasm" cp %{SOURCE147} "$component_tools/source-map-mappings-wasm/Cargo.lock" cp %{SOURCE148} "$component_tools/source-map-mappings-wasm/check.mjs" cp %{SOURCE149} "$component_tools/source-map-mappings-wasm/bundled-licenses.txt" cp %{SOURCE150} "$component_tools/source-map-mappings-wasm/bundled-provides.inc" cp %{SOURCE151} "$component_tools/source-map-mappings-wasm/explicit-callback-import.patch" ( mkdir -p "$component_sources/source-map-mappings-wasm" cd "$component_sources/source-map-mappings-wasm" tar -xf %{SOURCE145} --strip-components=1 patch -p1 < "$component_tools/source-map-mappings-wasm/explicit-callback-import.patch" tar -xf %{SOURCE146} rm -f lib/mappings.wasm cp "$component_tools/source-map-mappings-wasm/Cargo.lock" wasm-mappings/source-map-mappings-wasm-api/Cargo.lock mkdir -p .cargo cp vendor-config.toml .cargo/config.toml find vendor -type f -name '*.rs' -exec chmod a-x {} + ) # citeproc-rs-wasm mkdir -p "$component_tools/citeproc-rs-wasm" cp %{SOURCE154} "$component_tools/citeproc-rs-wasm/Cargo.lock" cp %{SOURCE155} "$component_tools/citeproc-rs-wasm/build-bindings.py" cp %{SOURCE156} "$component_tools/citeproc-rs-wasm/check-bindings.cjs" cp %{SOURCE157} "$component_tools/citeproc-rs-wasm/bundled-licenses.txt" cp %{SOURCE158} "$component_tools/citeproc-rs-wasm/bundled-provides.inc" cp %{SOURCE160} "$component_tools/citeproc-rs-wasm/modern-rust.patch" cp %{SOURCE161} "$component_tools/citeproc-rs-wasm/smartstring-compat.patch" ( mkdir -p "$component_sources/citeproc-rs-wasm" cd "$component_sources/citeproc-rs-wasm" tar -xf %{SOURCE152} --strip-components=1 mkdir rpm-lazy-transform-str tar -xf %{SOURCE159} -C rpm-lazy-transform-str --strip-components=1 patch -p1 < "$component_tools/citeproc-rs-wasm/modern-rust.patch" patch -p1 < "$component_tools/citeproc-rs-wasm/smartstring-compat.patch" tar -xf %{SOURCE153} cp "$component_tools/citeproc-rs-wasm/Cargo.lock" Cargo.lock mkdir -p .cargo cp vendor-config.toml .cargo/config.toml rm .cargo/config ) # csl-validator-wasm mkdir -p "$component_tools/csl-validator-wasm" cp %{SOURCE165} "$component_tools/csl-validator-wasm/check-validator.mjs" ( mkdir -p "$component_sources/csl-validator-wasm" cd "$component_sources/csl-validator-wasm" tar -xf %{SOURCE162} --strip-components=1 tar -xf %{SOURCE163} rm -rf src/schema dist mv schema-e3ce254a72c4470a5ed3b9d23b428017d25674e9 src/schema tar -xjf src/libs/expat-2.7.1.tar.bz2 -C src/libs tar -xjf src/libs/rnv-1.7.11.tar.bz2 -C src/libs find . -type f \( -name '*.wasm' -o -name '*.o' -o -name '*.a' \) -delete ) # pdfjs-codecs mkdir -p "$component_tools/pdfjs-codecs" cp %{SOURCE174} "$component_tools/pdfjs-codecs/Cargo.lock" cp %{SOURCE176} "$component_tools/pdfjs-codecs/bundled-licenses.txt" cp %{SOURCE177} "$component_tools/pdfjs-codecs/bundled-provides.inc" cp %{SOURCE178} "$component_tools/pdfjs-codecs/check-codecs.mjs" ( mkdir -p "$component_sources/pdfjs-codecs" cd "$component_sources/pdfjs-codecs" tar -xf %{SOURCE166} tar -xf %{SOURCE167} tar -xf %{SOURCE168} tar -xf %{SOURCE169} tar -xf %{SOURCE170} tar -xf %{SOURCE171} tar -xf %{SOURCE172} mv pdf.js.openjpeg-8bb19dc1aeecb104ce2ed3493d41fe131fc681e0 openjpeg-wrapper mv openjpeg-6c4a29b00211eb0430fa0e5e890f1ce5c80f409f openjpeg mv pdf.js.jbig2-15f6f9357c5e5e30285eb83aa08e5fe1a16ab77a jbig2-wrapper mv pdfium-bb1f9f71e7b15afdd5937adf8cfe5807522b882f pdfium mv pdf.js.quickjs-e2c5bfc8194b16f5973eea5e4e025b67be3c1015 quickjs-wrapper mv quickjs-3d5e064e9dd67c70f7962836505a7fa067bf0a4e quickjs mv pdf.js.qcms-bddcbcb3c2184c900620680751044ba42ece86ad qcms-wrapper patch -d openjpeg -p1 < openjpeg-wrapper/0001-Add-support-for-buffer-based-stream-see-https-github.patch patch -d quickjs -p1 < quickjs-wrapper/0001-Extra-stuff-for-use-with-PDF.js.patch # Use the caller's writable cache and omit optional Closure minification. sed -i 's|export EM_CACHE=.*|export EM_CACHE|' openjpeg-wrapper/compile*.sh sed -i 's/--closure 1/--closure 0/' quickjs-wrapper/compile.sh tar -xJf %{SOURCE173} -C qcms-wrapper cp "$component_tools/pdfjs-codecs/Cargo.lock" qcms-wrapper/Cargo.lock mkdir -p qcms-wrapper/.cargo cp qcms-wrapper/vendor-config.toml qcms-wrapper/.cargo/config.toml find . -type f \( -name '*.wasm' -o -name '*.o' -o -name '*.a' \) -delete ) # onnxruntime-web-wasm mkdir -p "$component_tools/onnxruntime-web-wasm" cp %{SOURCE181} "$component_tools/onnxruntime-web-wasm/prepare-offline.py" cp %{SOURCE183} "$component_tools/onnxruntime-web-wasm/check-runtime.mjs" cp %{SOURCE184} "$component_tools/onnxruntime-web-wasm/identity.prototxt" cp %{SOURCE185} "$component_tools/onnxruntime-web-wasm/prepare-bindings.py" cp %{SOURCE186} "$component_tools/onnxruntime-web-wasm/check-bindings.mjs" ( mkdir -p "$component_sources/onnxruntime-web-wasm" cd "$component_sources/onnxruntime-web-wasm" tar -xf %{SOURCE179} --strip-components=1 tar -xf %{SOURCE180} %{__python3} "$component_tools/onnxruntime-web-wasm/prepare-offline.py" . onnx-sources ) # zotero-libreoffice-integration mkdir -p "$component_tools/zotero-libreoffice-integration" cp %{SOURCE188} "$component_tools/zotero-libreoffice-integration/prepare-extension.py" ( mkdir -p "$component_sources/zotero-libreoffice-integration" cd "$component_sources/zotero-libreoffice-integration" tar -xf %{SOURCE187} --strip-components=1 # Rebuild the extension and use Fedora's Java libraries. rm -rf build/lib build/bin find . -type f \( -name '*.jar' -o -name '*.class' -o -name '*.oxt' \) -delete ) %build %if 0%{?fedora} > 44 export PATH="%{_libdir}/llvm22/bin:%{_libdir}/binaryen125/bin:$PATH" export LIBCLANG_PATH="%{_libdir}/llvm22/lib64" %endif export CARGO_NET_OFFLINE=true CARGO_BUILD_JOBS=%{_smp_build_ncpus} RAYON_NUM_THREADS=%{_smp_build_ncpus} export MAKEFLAGS=-j%{_smp_build_ncpus} CMAKE_BUILD_PARALLEL_LEVEL=%{_smp_build_ncpus} export EMCC_CORES=%{_smp_build_ncpus} BINARYEN_CORES=%{_smp_build_ncpus} GOMAXPROCS=%{_smp_build_ncpus} export TMPDIR="$PWD/rpm-tmp" mkdir -p "$TMPDIR" # Private dependency stages share this SRPM, not installed intermediate RPMs. component_sources="$PWD/.rpm-components/sources" component_tools="$PWD/.rpm-components/tools" component_data="$PWD/.rpm-components/data" component_licenses="$PWD/.rpm-components/licenses" mkdir -p "$component_data" "$component_licenses" # typescript-source-js ( cd "$component_sources/typescript-source-js" python3 "$component_tools/typescript-source-js/build.py" "$PWD" --esbuild %{_bindir}/esbuild install -Dpm0644 dist/typescript.js "$component_data/typescript-source-js"/typescript.js install -pm0644 dist/*.d.ts "$component_data/typescript-source-js"/ mkdir -p "$component_licenses/typescript-source-js" cp -a LICENSE.txt ThirdPartyNoticeText.txt "$component_licenses/typescript-source-js"/ ) # react-js ( cd "$component_sources/react-js" %{__python3} "$component_tools/react-js/install-npm-offline.py" rpm-dependencies "$PWD/npm-sources" %{__python3} "$component_tools/react-js/build.py" . rpm-dependencies/node_modules "$component_tools/react-js/esbuild-plugin.cjs" mkdir -p "$component_data/react-js" for package in react react-dom react-is scheduler; do cp -a build/node_modules/$package "$component_data/react-js"/ done mkdir -p "$component_licenses/react-js" cp -a LICENSE "$component_licenses/react-js"/ ) # prop-types-js ( cd "$component_sources/prop-types-js" %{__python3} "$component_tools/prop-types-js/build.py" . rpm-object-assign --esbuild %{_bindir}/esbuild --react "$component_data/react-js" install -Dpm 0644 rpm-dist/prop-types.js "$component_data/prop-types-js"/prop-types.js cp -a "$component_licenses/react-js" rpm-licenses/react-is mkdir -p "$component_licenses/prop-types-js" cp -a LICENSE rpm-licenses "$component_licenses/prop-types-js"/ ) # react-autosuggest-js ( cd "$component_sources/react-autosuggest-js" %{__python3} "$component_tools/react-autosuggest-js/build.py" . rpm-dependencies cp "$component_tools/react-autosuggest-js/react-themeable-LICENSE" rpm-licenses/react-themeable-LICENSE install -Dpm 0644 rpm-dist/autosuggest.min.js "$component_data/react-autosuggest-js"/autosuggest.min.js mkdir -p "$component_licenses/react-autosuggest-js" cp -a LICENSE rpm-licenses "$component_licenses/react-autosuggest-js"/ ) # react-virtualized-js ( cd "$component_sources/react-virtualized-js" %{__python3} "$component_tools/react-virtualized-js/install-npm-offline.py" rpm-build-dependencies "$PWD/npm-sources" %{__python3} "$component_tools/react-virtualized-js/build.py" . rpm-dependencies rpm-build-dependencies/node_modules install -Dpm 0644 rpm-dist/react-virtualized.js "$component_data/react-virtualized-js"/react-virtualized.js mkdir -p "$component_licenses/react-virtualized-js" cp -a LICENSE rpm-licenses "$component_licenses/react-virtualized-js"/ ) # react-intl-js ( cd "$component_sources/react-intl-js" %{__python3} "$component_tools/react-intl-js/install-npm-offline.py" rpm-build-dependencies "$PWD/npm-sources" %{__python3} "$component_tools/react-intl-js/build.py" . rpm-dependencies rpm-build-dependencies "$component_data/react-js" install -Dpm 0644 dist/react-intl.min.js "$component_data/react-intl-js"/react-intl.min.js mkdir -p "$component_licenses/react-intl-js" cp -a LICENSE.md rpm-licenses "$component_licenses/react-intl-js"/ ) # ace-js ( cd "$component_sources/ace-js" %{__python3} "$component_tools/ace-js/install-npm-offline.py" rpm-dependencies "$PWD/npm-sources" %{__python3} "$component_tools/ace-js/build.py" . rpm-dependencies/node_modules cp %{SOURCE97} rpm-licenses/CodeMirror-LICENSE mkdir -p "$component_data/ace-js" for module in ace ext-searchbox keybinding-emacs keybinding-vim mode-javascript theme-chrome theme-monokai worker-javascript; do install -pm 0644 build/src/$module.js "$component_data/ace-js"/ done mkdir -p "$component_licenses/ace-js" cp -a LICENSE rpm-licenses "$component_licenses/ace-js"/ ) # pako-js ( cd "$component_sources/pako-js" %{__python3} "$component_tools/pako-js/build.py" . --esbuild %{_bindir}/esbuild install -Dpm 0644 rpm-dist/pako.min.js "$component_data/pako-js"/pako.min.js mkdir -p "$component_licenses/pako-js" cp -a LICENSE ZLIB-LICENSE "$component_licenses/pako-js"/ ) # katex-js ( cd "$component_sources/katex-js" export GOMAXPROCS=1 UV_THREADPOOL_SIZE=1 NODE_OPTIONS=--max-old-space-size=1400 %{__python3} "$component_tools/katex-js/build-fonts.py" . %{__python3} "$component_tools/katex-js/install-npm-offline.py" rpm-build-dependencies "$PWD/npm-sources" %{__python3} "$component_tools/katex-js/build.py" . rpm-build-dependencies/node_modules --esbuild %{_bindir}/esbuild mkdir -p "$component_data/katex-js" cp rpm-dist/katex.js rpm-dist/katex.mjs "$component_data/katex-js"/ cp -a fonts "$component_data/katex-js"/ mkdir rpm-font-licenses cp rpm-input-font-licenses/* rpm-font-licenses/ %{__python3} "$component_tools/katex-js/collect-font-notices.py" rpm-font-licenses cp %{_licensedir}/texlive-amsfonts/ofl.txt rpm-font-licenses/ cp %{_licensedir}/texlive-cm/knuth.txt rpm-font-licenses/ cp %{_licensedir}/texlive-rsfs/other-free.txt rpm-font-licenses/ %{__python3} - <<'PY' from pathlib import Path from fontTools.ttLib import TTFont notices = set() for filename in sorted(Path('fonts').glob('*.ttf')): for record in TTFont(filename)['name'].names: if record.nameID in (0, 13, 14): notices.add(record.toUnicode().strip()) Path('rpm-font-licenses/font-notices.txt').write_text('\n\n'.join(sorted(notices)) + '\n') PY mkdir -p "$component_licenses/katex-js" cp -a LICENSE rpm-font-licenses "$component_licenses/katex-js"/ ) # mathjax-chtml-js ( cd "$component_sources/mathjax-chtml-js" export UV_THREADPOOL_SIZE=1 NODE_OPTIONS=--max-old-space-size=1400 node "$component_tools/mathjax-chtml-js/build.cjs" . rpm-chemistry "$component_data/typescript-source-js"/typescript.js mkdir -p "$component_data/mathjax-chtml-js" cp -a rpm-dist/. "$component_data/mathjax-chtml-js"/ mkdir -p rpm-licenses/mhchemparser cp rpm-chemistry/LICENSE.txt rpm-licenses/mhchemparser/ mkdir -p "$component_licenses/mathjax-chtml-js" cp -a LICENSE rpm-licenses "$component_licenses/mathjax-chtml-js"/ ) # monaco-editor-js ( cd "$component_sources/monaco-editor-js" export GOMAXPROCS=1 UV_THREADPOOL_SIZE=1 export NODE_OPTIONS=--max-old-space-size=4096 %{__python3} "$component_tools/monaco-editor-js/install-npm-offline.py" rpm-font-dependencies npm-sources mkdir -p dev %{__python3} build-typescript.py rpm-sources/typescript --source-version 5.4.0 --esbuild %{_bindir}/esbuild %{__python3} build-font.py rpm-sources/codicons rpm-sources/vscode \ dev/vs/base/browser/ui/codicons/codicon/codicon.ttf rpm-font-dependencies node build-core.cjs rpm-sources/vscode dev rpm-sources/typescript/dist/typescript.js rpm-sources/loader %{__python3} build-languages.py . rpm-sources/dependencies \ "$component_data/typescript-source-js" dev --esbuild %{_bindir}/esbuild --vscode rpm-sources/vscode for pair in 'vscode LICENSE.txt' 'vscode ThirdPartyNotices.txt' \ 'typescript LICENSE.txt' 'typescript ThirdPartyNoticeText.txt' \ 'loader License.txt' 'loader ThirdPartyNotices.txt' \ 'codicons LICENSE' 'codicons LICENSE-CODE'; do set -- $pair cp "rpm-sources/$1/$2" "rpm-licenses/$1-$2" done mkdir -p "$component_data/monaco-editor-js" cp -a dev/. "$component_data/monaco-editor-js"/ # Preserve the embedded compiler and library declarations' license notices. cp -a "$component_licenses/typescript-source-js" rpm-licenses/typescript-runtime mkdir -p "$component_licenses/monaco-editor-js" cp -a LICENSE.txt rpm-licenses "$component_licenses/monaco-editor-js"/ ) # monacopilot-js ( cd "$component_sources/monacopilot-js" %{__python3} "$component_tools/monacopilot-js/build.py" . mkdir -p "$component_data/monacopilot-js"/{core,monacopilot} for component in core monacopilot; do install -pm 0644 dist/$component/*.js dist/$component/*.mjs \ "$component_data/monacopilot-js"/$component/ done mkdir -p "$component_licenses/monacopilot-js" cp -a LICENSE "$component_licenses/monacopilot-js"/ ) # source-map-mappings-wasm ( cd "$component_sources/source-map-mappings-wasm" export CARGO_HOME="$PWD/cargo-home" export CARGO_NET_OFFLINE=true export CARGO_BUILD_JOBS=%{_smp_build_ncpus} export CARGO_TARGET_DIR="$PWD/target" # Native RPM link arguments are not valid for wasm32-unknown-unknown. export RUSTFLAGS='-C opt-level=2 -C panic=abort' cargo build --frozen --release --target wasm32-unknown-unknown \ --manifest-path wasm-mappings/source-map-mappings-wasm-api/Cargo.toml install -Dpm 0644 target/wasm32-unknown-unknown/release/source_map_mappings_wasm_api.wasm \ "$component_data/source-map-mappings-wasm"/mappings.wasm cp "$component_tools/source-map-mappings-wasm/bundled-licenses.txt" bundled-licenses.txt mkdir -p "$component_licenses/source-map-mappings-wasm" cp -a LICENSE bundled-licenses.txt "$component_licenses/source-map-mappings-wasm"/ ) # citeproc-rs-wasm ( cd "$component_sources/citeproc-rs-wasm" # Native RPM linker flags do not apply to WASM; retain upstream's target flags. unset RUSTFLAGS CARGO_ENCODED_RUSTFLAGS export CARGO_HOME="$PWD/cargo-home" export CARGO_NET_OFFLINE=true export CARGO_BUILD_JOBS=%{_smp_build_ncpus} export BINARYEN_CORES=1 export CARGO_TARGET_DIR="$PWD/target" # Build in this directory to retain upstream's 8 MiB WASM stack setting. pushd crates/wasm cargo build --frozen --release --target wasm32-unknown-unknown --features console,zotero popd %{__python3} "$component_tools/citeproc-rs-wasm/build-bindings.py" target/wasm32-unknown-unknown/release/wasm.wasm bindings install -d "$component_data/citeproc-rs-wasm" install -pm 0644 bindings/citeproc_rs_wasm.js bindings/citeproc_rs_wasm_include.js \ bindings/citeproc_rs_wasm_bg.wasm "$component_data/citeproc-rs-wasm"/ install -pm 0644 "$component_tools/citeproc-rs-wasm/bundled-licenses.txt" bundled-licenses.txt mkdir -p "$component_licenses/citeproc-rs-wasm" cp -a LICENSE.md bundled-licenses.txt rpm-lazy-transform-str/LICENSE-* "$component_licenses/citeproc-rs-wasm"/ ) # csl-validator-wasm ( cd "$component_sources/csl-validator-wasm" export EM_CACHE="$PWD/emscripten-cache" export EMCC_CORES=%{_smp_build_ncpus} root="$PWD" export CFLAGS=-O2 CXXFLAGS=-O2 CPPFLAGS= LDFLAGS= ( cd src/libs/expat-2.7.1 emconfigure ./configure --host=wasm32-unknown-emscripten \ --disable-shared --without-xmlwf --without-docbook --without-tests --without-examples CFLAGS=-O2 emmake make -j%{_smp_build_ncpus} ) ( cd src/libs/rnv-1.7.11 mkdir -p schema cp "$root"/src/schema/schemas/styles/*.rnc schema/ emconfigure ./configure --host=wasm32-unknown-emscripten \ --with-expat-inc=../expat-2.7.1/lib --with-expat-lib=../expat-2.7.1/lib/.libs \ ac_cv_lib_expat_XML_SetDoctypeDeclHandler=yes emmake make -j%{_smp_build_ncpus} rnv AR=emar CFLAGS=-O2 \ LDFLAGS='-L../expat-2.7.1/lib/.libs -sMODULARIZE -sEXPORT_ES6 -sEXPORT_NAME=RNV -sEXPORTED_RUNTIME_METHODS=FS -sWASM_ASYNC_COMPILATION=0 --embed-file schema/' mkdir -p "$root/dist" install -m 0644 rnv "$root/dist/rnv.mjs" install -m 0644 rnv.wasm "$root/dist/rnv.wasm" ) install -d "$component_data/csl-validator-wasm" install -pm 0644 csl-validator.mjs worker.mjs dist/rnv.mjs dist/rnv.wasm \ "$component_data/csl-validator-wasm"/ mkdir -p "$component_licenses/csl-validator-wasm" cp -a LICENSE.txt LICENSE_LIBS.txt "$component_licenses/csl-validator-wasm"/ ) # pdfjs-codecs ( cd "$component_sources/pdfjs-codecs" root="$PWD" export EM_CACHE="$PWD/emscripten-cache" CARGO_HOME="$PWD/cargo-home" for component in openjpeg jbig2 quickjs qcms; do ( cd "$root/$component-wrapper" export INPUT="$PWD/src" OUTPUT="$root/dist/$component" mkdir -p "$OUTPUT" if test "$component" = qcms; then unset RUSTFLAGS CARGO_ENCODED_RUSTFLAGS export CARGO_TARGET_DIR="$root/qcms-target" cargo build --frozen --release --target wasm32-unknown-unknown wasm-bindgen "$CARGO_TARGET_DIR/wasm32-unknown-unknown/release/qcms_pdf_js.wasm" \ --target web --no-typescript --omit-default-module-path --out-name qcms --out-dir "$OUTPUT" wasm-opt -O "$OUTPUT/qcms_bg.wasm" -o "$OUTPUT/qcms_bg.wasm" cp js/*.js "$OUTPUT/" else export OPENJPEG="$root/openjpeg" PDFIUM="$root/pdfium" QUICKJS="$root/quickjs" for BUILD_TYPE in wasm js; do export BUILD_TYPE if test "$component" = quickjs && test "$BUILD_TYPE" = js; then continue; fi if test "$component" = openjpeg; then sh compile_lib.sh; fi sh compile.sh done fi ) done install -d "$component_data/pdfjs-codecs" cp -pr dist/* "$component_data/pdfjs-codecs"/ mkdir -p licenses for component in openjpeg-wrapper openjpeg jbig2-wrapper pdfium quickjs-wrapper quickjs qcms-wrapper; do install -pm 0644 "$component/LICENSE" "licenses/$component-LICENSE" done install -pm 0644 "$component_tools/pdfjs-codecs/bundled-licenses.txt" licenses/bundled-licenses.txt mkdir -p "$component_licenses/pdfjs-codecs" cp -a licenses "$component_licenses/pdfjs-codecs"/ ) # onnxruntime-web-wasm ( cd "$component_sources/onnxruntime-web-wasm" export EM_CACHE="$PWD/emscripten-cache" mkdir host-sources unzip -q onnx-sources/protobuf.zip -d host-sources cmake -S host-sources/protobuf-21.12/cmake -B native-protobuf \ -DCMAKE_BUILD_TYPE=Release -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_WITH_ZLIB=OFF \ -Dprotobuf_BUILD_SHARED_LIBS=OFF -DCMAKE_POLICY_VERSION_MINIMUM=3.5 cmake --build native-protobuf --target protoc --parallel %{_smp_build_ncpus} unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS emcmake cmake -S cmake -B wasm-build \ -DCMAKE_BUILD_TYPE=Release '-DCMAKE_C_FLAGS_RELEASE=-O2 -DNDEBUG' \ '-DCMAKE_CXX_FLAGS_RELEASE=-O2 -DNDEBUG -Wno-error=pass-failed' \ -DCMAKE_COMPILE_WARNING_AS_ERROR=OFF -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ -DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=NEVER -DFETCHCONTENT_UPDATES_DISCONNECTED=ON \ -DONNX_CUSTOM_PROTOC_EXECUTABLE="$PWD/native-protobuf/protoc" \ -Donnxruntime_BUILD_UNIT_TESTS=OFF -Donnxruntime_BUILD_BENCHMARKS=OFF \ -Donnxruntime_ENABLE_CPUINFO=OFF -Donnxruntime_USE_XNNPACK=OFF \ -Donnxruntime_USE_JSEP=OFF -Donnxruntime_USE_WEBGPU=OFF -Donnxruntime_USE_WEBNN=OFF \ -Donnxruntime_ENABLE_TRAINING=OFF -Donnxruntime_ENABLE_LTO=OFF \ -Donnxruntime_ENABLE_WEBASSEMBLY_SIMD=ON -Donnxruntime_ENABLE_WEBASSEMBLY_THREADS=ON \ -Donnxruntime_ENABLE_WEBASSEMBLY_API_EXCEPTION_CATCHING=ON -Donnxruntime_BUILD_SHARED_LIB=OFF cmake --build wasm-build --target onnxruntime_webassembly --parallel %{_smp_build_ncpus} %{__python3} "$component_tools/onnxruntime-web-wasm/prepare-bindings.py" prepare . %{_bindir}/esbuild js/web/lib/index.ts --bundle --format=esm --platform=browser \ --target=es2022 --tree-shaking=true --minify-syntax \ --alias:onnxruntime-common="$PWD/js/common/lib/index.ts" \ --outfile=wasm-build/ort.wasm.mjs --metafile=wasm-build/bindings-inputs.json \ '--external:node:*' --external:module --external:worker_threads \ --define:process=undefined --define:ENVIRONMENT_IS_NODE=false --define:isNode=false \ --define:BUILD_DEFS.DISABLE_WEBGL=true --define:BUILD_DEFS.DISABLE_JSEP=true \ --define:BUILD_DEFS.DISABLE_WASM=false --define:BUILD_DEFS.DISABLE_WASM_PROXY=true \ --define:BUILD_DEFS.ENABLE_JSPI=false --define:BUILD_DEFS.ENABLE_BUNDLE_WASM_JS=true \ --define:BUILD_DEFS.DISABLE_WEBGPU=true --define:BUILD_DEFS.DISABLE_WEBNN=true \ --define:BUILD_DEFS.IS_ESM=true --define:BUILD_DEFS.ESM_IMPORT_META_URL=import.meta.url \ '--define:BUILD_DEFS.BUNDLE_FILENAME="ort.wasm.mjs"' %{__python3} "$component_tools/onnxruntime-web-wasm/prepare-bindings.py" check . install -d "$component_data/onnxruntime-web-wasm" install -pm 0644 wasm-build/ort-wasm-simd-threaded.{mjs,wasm} \ "$component_data/onnxruntime-web-wasm"/ install -pm 0644 wasm-build/ort.wasm.mjs "$component_data/onnxruntime-web-wasm"/ mkdir -p "$component_licenses/onnxruntime-web-wasm" cp -a rpm-licenses "$component_licenses/onnxruntime-web-wasm"/ ) # zotero-libreoffice-integration ( cd "$component_sources/zotero-libreoffice-integration" %{__python3} "$component_tools/zotero-libreoffice-integration/prepare-extension.py" prepare classpath= for library in jackson-core jackson-databind jackson-annotations jna libreoffice/libreoffice; do test -f "%{_javadir}/$library.jar" classpath="${classpath:+$classpath:}%{_javadir}/$library.jar" done javac --release 8 -encoding UTF-8 -cp "$classpath" -d build/bin @build/java-sources.list epoch=${SOURCE_DATE_EPOCH:-315532802} if test "$epoch" -lt 315532802; then epoch=315532802; fi stamp=$(date -u -d "@$epoch" +%%Y-%%m-%%dT%%H:%%M:%%SZ) jar --create --file build/oxt/Zotero.jar --manifest build/system-manifest.mf \ --date "$stamp" -C build/bin . %{__python3} "$component_tools/zotero-libreoffice-integration/prepare-extension.py" archive install -Dpm 0644 install/Zotero_LibreOffice_Integration.oxt \ "$component_data/zotero-libreoffice-integration"/Zotero_LibreOffice_Integration.oxt mkdir -p "$component_licenses/zotero-libreoffice-integration" cp -a COPYING "$component_licenses/zotero-libreoffice-integration"/ ) %{__python3} %{SOURCE3} . --data "$component_data" cp "$component_data/source-map-mappings-wasm/mappings.wasm" \ .rpm-gecko/firefox-%{gecko_version}/devtools/client/shared/vendor/source-map/lib/mappings.wasm for project in . reader reader/pdfjs/pdf.js document-worker document-worker/pdf.js note-editor resource/SingleFile; do %{__python3} %{SOURCE4} "$project" "$PWD/npm-sources" done # These readable modules are byte-identical to their pinned upstream source, # not npm-generated bundles (classnames 30bd487, JSPath e845ea9). sha256sum -c <<'EOF' aebabda87b88551787e5ea7126013a60e6c0f08d732bb95cc79654059af03171 node_modules/classnames/index.js 6133088a5b0c7f755d20d08cc3f5bbeade16a1d14852fe5e3b4ecdef18f7013c node_modules/jspath/lib/jspath.js EOF # Level 1: compile and package Gecko using its upstream build system. ( application="$PWD" cd .rpm-gecko/firefox-%{gecko_version} cp %{SOURCE6} rpm.mozconfig cat >> rpm.mozconfig < rpm-editor-build-plan.tsv while IFS="$(printf '\t')" read -r source entry format output; do mkdir -p "$(dirname "$output")" ( cd "$source" %{_bindir}/esbuild "src/$entry" --bundle --packages=external \ --platform=browser --target=firefox140 \ --tsconfig-raw='{"compilerOptions":{"useDefineForClassFields":false}}' \ --format="$format" --outfile="$output" --metafile="$output.inputs.json" ) done < rpm-editor-build-plan.tsv %{__python3} %{SOURCE10} . --collect ( cd note-editor/node_modules/@benrbray/prosemirror-math %{_bindir}/esbuild lib/main.ts --bundle --format=esm --platform=browser \ --packages=external --outfile=dist/prosemirror-math.js cp public/prosemirror-math.css dist/prosemirror-math.css ) (cd resource/SingleFile && npm run build) (cd reader && npm run build:zotero) ( cd document-worker node node_modules/webpack/bin/webpack.js --mode production bash scripts/build-assets node scripts/build-metadata.js %{_bindir}/esbuild structured-document-text/src/read.js --bundle \ --platform=browser --target=firefox140 --format=cjs \ --outfile=build/structured-document-text.js ) (cd note-editor && npm run build:zotero) # Upstream copy merges directories; discard only checked generated outputs. %{__python3} %{SOURCE7} . --clear-outputs npm run build %{__python3} %{SOURCE7} . --check rm -rf build/resource/document-worker/{cmaps,standard_fonts} # Level 3: assemble the distribution from the source-built modules and Gecko. mkdir -p rpm-prepared %{__python3} app/scripts/prepare_build --source-dir "$PWD/build" \ --output-dir "$PWD/rpm-prepared" --channel release bash app/build.sh -d "$PWD/rpm-prepared" -p l -a x64 -c release -s mkdir -p app/staging/Zotero_linux-x86_64/distribution cp app/policies.json app/staging/Zotero_linux-x86_64/distribution/policies.json test ! -e app/staging/Zotero_linux-x86_64/updater %install # Preserve both debugsource header paths as one stored file. cpio dereferences # Gecko's exported symlink but does not deduplicate it against the source path. cmp .rpm-gecko/firefox-%{gecko_version}/third_party/zstd/lib/zstd.h \ .rpm-gecko/firefox-%{gecko_version}/obj-rpm/dist/include/zstd/zstd.h ln -f .rpm-gecko/firefox-%{gecko_version}/third_party/zstd/lib/zstd.h \ .rpm-gecko/firefox-%{gecko_version}/obj-rpm/dist/include/zstd/zstd.h # These prerequisites are copied into the application, so their license files # must also travel with Zotero rather than only with the buildroot packages. mkdir -p rpm-licenses/gecko for project in reader note-editor document-worker; do mkdir -p "rpm-licenses/$project" cp "$project/COPYING" "rpm-licenses/$project/" done mkdir -p rpm-licenses/pdf-liberation-fonts cp .rpm-font-sources/liberation/{COPYING,License.txt,AUTHORS} rpm-licenses/pdf-liberation-fonts/ mkdir -p rpm-licenses/pdf-foxit-fonts cmp reader/pdfjs/pdf.js/external/standard_fonts/LICENSE_FOXIT \ document-worker/pdf.js/external/standard_fonts/LICENSE_FOXIT cp reader/pdfjs/pdf.js/external/standard_fonts/LICENSE_FOXIT rpm-licenses/pdf-foxit-fonts/ %{__python3} %{SOURCE28} reader/node_modules/mathjax-full/es5/output/chtml/fonts/woff-v2 \ %{SOURCE27} rpm-licenses/mathjax-tex-fonts cp -a .rpm-gecko/firefox-%{gecko_version}/LICENSE rpm-licenses/gecko/ cp -a .rpm-gecko/firefox-%{gecko_version}/toolkit/content/license.html rpm-licenses/gecko/ cp -a %{_licensedir}/wasi-cxx-runtime rpm-licenses/ cp -a .rpm-components/licenses/. rpm-licenses/ for package in classnames jspath; do mkdir -p rpm-licenses/$package cp -a node_modules/$package/LICENSE rpm-licenses/$package/ done mkdir -p rpm-licenses/prosemirror-math cp -a note-editor/node_modules/@benrbray/prosemirror-math/LICENSE \ rpm-licenses/prosemirror-math/ mkdir -p rpm-licenses/tinymce mkdir -p rpm-licenses/csl-locales cp chrome/content/zotero/locale/csl/README.md rpm-licenses/csl-locales/ mkdir -p rpm-licenses/pdf-icc cmp reader/pdfjs/pdf.js/external/iccs/LICENSE document-worker/pdf.js/external/iccs/LICENSE cp reader/pdfjs/pdf.js/external/iccs/LICENSE rpm-licenses/pdf-icc/ # Keep the original CSS grants/copyrights that preprocessing may remove. # Select LGPL version 2.1 from their MPL/GPL/LGPL alternatives; its full text # is also retained in tinymce/license.txt below. for platform in unix win mac; do directory="rpm-licenses/legacy-preferences/$platform" mkdir -p "$directory" if test "$platform" = mac; then cp app/assets/mac/chrome/skin/preferences/preferences.css "$directory/" else cp "app/assets/$platform/skin/preferences/preferences.css" "$directory/" fi done # Translator grants and individual attribution remain in the shipped scripts. mkdir -p rpm-licenses/translators cp %{SOURCE37} rpm-licenses/translators/GPL-3.0.txt mkdir -p rpm-licenses/tabulator-rdf cp chrome/content/zotero/xpcom/translate/src/rdf/rdfparser.js rpm-licenses/tabulator-rdf/ cp resource/tinymce/license.txt rpm-licenses/tinymce/ cp .rpm-original-sources/tinymce-paste/LICENSE.TXT rpm-licenses/tinymce/paste-LICENSE.TXT for package in fluent-bundle fluent-react; do mkdir -p rpm-licenses/$package cp .rpm-original-sources/$package/{LICENSE,NOTICE} rpm-licenses/$package/ done cp reader/node_modules/@fluent/react/vendor/LICENSE rpm-licenses/fluent-react/vendor-LICENSE mkdir -p rpm-licenses/react-select rpm-licenses/path-webpack rpm-licenses/cached-iterable cp %{SOURCE29} rpm-licenses/react-select/LICENSE cp %{SOURCE30} rpm-licenses/path-webpack/LICENSE # This package's pinned manifest is its explicit Apache-2.0 declaration. cp reader/node_modules/cached-iterable/package.json rpm-licenses/cached-iterable/ cp .rpm-original-sources/fluent-bundle/LICENSE rpm-licenses/cached-iterable/Apache-2.0.txt for package in @babel/runtime @emotion/cache @emotion/core @emotion/css @emotion/hash \ @emotion/memoize @emotion/serialize @emotion/sheet @emotion/stylis @emotion/unitless \ @emotion/utils @emotion/weak-memoize memoize-one react-input-autosize react-is process \ punycode querystring url; do directory="rpm-licenses/runtime/root/$package" mkdir -p "$directory" find "node_modules/$package" -maxdepth 1 -type f -iname 'license*' \ -exec cp -t "$directory" {} + test -n "$(ls -A "$directory")" done for package in darkreader sentencex-ts sorted-btree; do mkdir -p rpm-licenses/$package cp reader/node_modules/$package/LICENSE rpm-licenses/$package/ done for package in fflate fastest-levenshtein; do mkdir -p rpm-licenses/$package cp document-worker/node_modules/$package/LICENSE* rpm-licenses/$package/ done for entry in reader:@babel/runtime reader:classnames reader:eld reader:event-emitter \ reader:jszip reader:luaparse reader:pako reader:postcss-selector-parser reader:queue \ reader:inherits reader:d reader:es5-ext reader:util-deprecate reader:cssesc \ note-editor:@babel/runtime note-editor:classnames note-editor:entities \ note-editor:linkify-it note-editor:markdown-it note-editor:mdurl note-editor:orderedmap \ note-editor:punycode.js note-editor:rope-sequence note-editor:uc.micro note-editor:w3c-keyname \ document-worker:dom-serializer document-worker:domelementtype document-worker:domhandler \ document-worker:domutils document-worker:entities document-worker:htmlparser2; do project=${entry%%:*} package=${entry#*:} directory="rpm-licenses/runtime/$project/$package" mkdir -p "$directory" cp "$project/node_modules/$package"/LICENSE* "$directory/" done # Preserve every component's notice path without storing identical texts twice. %{__python3} %{SOURCE31} rpm-licenses install -d %{buildroot}%{_bindir} %{buildroot}%{_libdir}/zotero cp -a app/staging/Zotero_linux-x86_64/. %{buildroot}%{_libdir}/zotero/ rm -f %{buildroot}%{_libdir}/zotero/{zotero.desktop,set_launcher_icon} ln -s ../%{_lib}/zotero/zotero %{buildroot}%{_bindir}/zotero ln -sf ../../../../share/zotero-libreoffice-integration/Zotero_LibreOffice_Integration.oxt \ %{buildroot}%{_libdir}/zotero/integration/libreoffice/Zotero_LibreOffice_Integration.oxt desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE8} install -Dpm 0644 .rpm-components/data/zotero-libreoffice-integration/Zotero_LibreOffice_Integration.oxt \ %{buildroot}%{_datadir}/zotero-libreoffice-integration/Zotero_LibreOffice_Integration.oxt for size in 32 64 128; do install -Dpm 0644 app/linux/icons/icon${size}.png \ %{buildroot}%{_datadir}/icons/hicolor/${size}x${size}/apps/zotero.png done install -Dpm 0644 app/linux/icons/symbolic.svg \ %{buildroot}%{_datadir}/icons/hicolor/symbolic/apps/zotero-symbolic.svg %check component_sources="$PWD/.rpm-components/sources" component_tools="$PWD/.rpm-components/tools" component_data="$PWD/.rpm-components/data" # typescript-source-js ( cd "$component_sources/typescript-source-js" node "$component_tools/typescript-source-js/check.cjs" "$component_data/typescript-source-js" ) # react-js ( cd "$component_sources/react-js" node "$component_tools/react-js/check.cjs" build/node_modules ) # prop-types-js ( cd "$component_sources/prop-types-js" node "$component_tools/prop-types-js/check.cjs" "$component_data/prop-types-js" ) # react-autosuggest-js ( cd "$component_sources/react-autosuggest-js" node "$component_tools/react-autosuggest-js/check.cjs" "$component_data/react-autosuggest-js"/autosuggest.min.js "$component_data/react-js" ) # react-virtualized-js ( cd "$component_sources/react-virtualized-js" node "$component_tools/react-virtualized-js/check.cjs" "$component_data/react-virtualized-js"/react-virtualized.js "$component_data/react-js" ) # react-intl-js ( cd "$component_sources/react-intl-js" node "$component_tools/react-intl-js/check.cjs" "$component_data/react-intl-js" "$component_data/react-js" ) # ace-js ( cd "$component_sources/ace-js" node "$component_tools/ace-js/check.cjs" "$component_data/ace-js" ) # pako-js ( cd "$component_sources/pako-js" node "$component_tools/pako-js/check.cjs" "$component_data/pako-js" ) # katex-js ( cd "$component_sources/katex-js" node "$component_tools/katex-js/check.mjs" "$component_data/katex-js" %{__python3} "$component_tools/katex-js/check-fonts.py" "$component_data/katex-js"/fonts ) # mathjax-chtml-js ( cd "$component_sources/mathjax-chtml-js" node "$component_tools/mathjax-chtml-js/check.cjs" "$component_data/mathjax-chtml-js" ) # monaco-editor-js ( cd "$component_sources/monaco-editor-js" node "$component_tools/monaco-editor-js/check.cjs" "$component_data/monaco-editor-js" %{__python3} "$component_tools/monaco-editor-js/check-font.py" "$component_data/monaco-editor-js"/vs/base/browser/ui/codicons/codicon/codicon.ttf ) # monacopilot-js ( cd "$component_sources/monacopilot-js" node "$component_tools/monacopilot-js/check.mjs" dist ) # source-map-mappings-wasm ( cd "$component_sources/source-map-mappings-wasm" node "$component_tools/source-map-mappings-wasm/check.mjs" "$component_data/source-map-mappings-wasm"/mappings.wasm ) # citeproc-rs-wasm ( cd "$component_sources/citeproc-rs-wasm" node "$component_tools/citeproc-rs-wasm/check-bindings.cjs" bindings ) # csl-validator-wasm ( cd "$component_sources/csl-validator-wasm" cp csl-validator.mjs worker.mjs "$component_tools/csl-validator-wasm/check-validator.mjs" dist/ node dist/check-validator.mjs ) # pdfjs-codecs ( cd "$component_sources/pdfjs-codecs" node "$component_tools/pdfjs-codecs/check-codecs.mjs" dist ) # onnxruntime-web-wasm ( cd "$component_sources/onnxruntime-web-wasm" native-protobuf/protoc --proto_path=wasm-build/_deps/onnx-src \ --encode=onnx.ModelProto onnx/onnx.proto < "$component_tools/onnxruntime-web-wasm/identity.prototxt" > identity.onnx node "$component_tools/onnxruntime-web-wasm/check-runtime.mjs" wasm-build identity.onnx node "$component_tools/onnxruntime-web-wasm/check-bindings.mjs" wasm-build identity.onnx ) # zotero-libreoffice-integration ( cd "$component_sources/zotero-libreoffice-integration" %{__python3} "$component_tools/zotero-libreoffice-integration/prepare-extension.py" check ) %{__python3} %{SOURCE26} . %{SOURCE23} %{SOURCE24} --check %{__python3} - <<'PY' import json from pathlib import Path sources = Path('.rpm-original-sources') for directory, manifest, version, implementation in ( ('fluent-bundle', 'fluent-bundle/package.json', '0.19.1', 'fluent-bundle/src/bundle.ts'), ('fluent-react', 'fluent-react/package.json', '0.15.2', 'fluent-react/src/index.ts'), ('darkreader', 'package.json', '4.9.83', 'src/api/index.ts'), ('sentencex-ts', 'package.json', '0.1.13-ts', 'src/index.ts'), ('fflate', 'package.json', '0.8.2', 'src/index.ts'), ('fastest-levenshtein', 'package.json', '1.0.16', 'mod.ts'), ('sorted-btree', 'package.json', '1.8.0', 'b+tree.ts'), ('tinymce', 'package.json', '4.9.4', 'src/core/main/ts/api/Editor.ts'), ('tinymce-paste', 'package.json', '4.6.7', 'src/plugins/paste/src/main/js/Plugin.js'), ): source = sources / directory assert json.loads((source / manifest).read_text())['version'] == version, directory assert (source / implementation).is_file(), directory for name in ('b+tree.js', 'sorted-array.js'): original = (sources / 'sorted-btree' / name).read_text() assert original == (Path('reader/node_modules/sorted-btree') / name).read_text(), name assert Path('resource/tinymce/license.txt').read_bytes() == Path('rpm-licenses/tinymce/license.txt').read_bytes() assert (sources / 'tinymce-paste/LICENSE.TXT').read_bytes() == Path('rpm-licenses/tinymce/paste-LICENSE.TXT').read_bytes() PY node %{SOURCE13} . node - <<'JS' const assert = require('node:assert/strict'); const configurations = require('./note-editor/webpack.config.js'); const editor = configurations.find(configuration => configuration.name === 'zotero'); assert.equal(editor.optimization.minimize, false); assert.deepEqual(editor.optimization.minimizer, []); JS node %{SOURCE9} chrome/content/zotero/xpcom/citeprocRsBridge.js cmp note-editor/node_modules/@benrbray/prosemirror-math/LICENSE \ rpm-licenses/prosemirror-math/LICENSE %{__python3} - <<'PY' from pathlib import Path from zipfile import ZipFile import hashlib with ZipFile("%{buildroot}%{_libdir}/zotero/app/omni.ja") as archive: packaged = archive.read("chrome/devtools/modules/devtools/client/shared/vendor/source-map/lib/mappings.wasm") assert packaged == Path(".rpm-components/data/source-map-mappings-wasm/mappings.wasm").read_bytes() fonts = {path.name: path.read_bytes() for path in Path(".rpm-components/data/katex-js/fonts").glob("*.woff2")} assert len(fonts) == 20 names = [name for name in archive.namelist() if name.startswith("resource/note-editor/assets/fonts/KaTeX_") and name.endswith(".woff2")] assert len(names) == len(fonts), "Obsolete or missing note-editor fonts" for name in names: original = Path(name).name.split(".")[0] + ".woff2" assert archive.read(name) == fonts[original], name pdf_fonts = list(Path("reader/pdfjs/pdf.js/external/standard_fonts").glob("LiberationSans-*.ttf")) assert not any("/RPMPDFSans-" in name for name in archive.namelist()) assert len(pdf_fonts) == 4 original_hashes = { "Bold": "361c61b82d575c5c35fd9157fda8b0194bcfcd0d88ea8521a4fb5dd53d33dddc", "BoldItalic": "a224075ac17495ad0a3af3bc0a419ac0704a8b3fd1095456201fb9b095fc281d", "Italic": "832b4406dbef23628800d3aaad21048534ac84d7e3ad955be83b8172ed8ef512", "Regular": "f8ace1f892b2bd9dc1792ba7f097fa7588f84fed48321480e04de5390828221f", } for path in pdf_fonts: style = path.stem.removeprefix("LiberationSans-") assert hashlib.sha256(path.read_bytes()).hexdigest() == original_hashes[style], path assert archive.read("resource/reader/pdf/web/standard_fonts/" + path.name) == path.read_bytes(), path assert archive.read("resource/reader/pdf/web/standard_fonts/LICENSE_LIBERATION") == \ Path(".rpm-font-sources/liberation/License.txt").read_bytes() PY desktop-file-validate %{buildroot}%{_datadir}/applications/zotero.desktop test ! -e %{buildroot}%{_libdir}/zotero/updater %{__python3} -c 'import json; assert json.load(open("%{buildroot}%{_libdir}/zotero/distribution/policies.json"))["policies"]["DisableAppUpdate"]' %files %license COPYING rpm-licenses %doc source-commits.txt %doc rpm-editor-source-inputs.json %{_bindir}/zotero %{_libdir}/zotero %{_datadir}/applications/zotero.desktop %{_datadir}/icons/hicolor/*/apps/zotero.png %{_datadir}/icons/hicolor/symbolic/apps/zotero-symbolic.svg %files libreoffice-integration %license .rpm-components/sources/zotero-libreoffice-integration/COPYING %{_datadir}/zotero-libreoffice-integration/ %changelog * Sat Oct 24 2026 Matrew File - 10.0.3-2 - Separate source and binary-repack packages with target-specific entry points. - Select coinstallable LLVM and Binaryen toolchains on Rawhide. - Remove duplicate source declarations and use relative application links. * Tue Oct 06 2026 Matrew File - 10.0.3-1 - Build Zotero and Gecko from pinned sources with offline prerequisites. * Sat Jan 24 2026 Matrew File - 8.0 - Upstream update to Zotero 8. * Sun Oct 13 2024 Matrew File - 7.0.7 - Upstream update to Zotero 7. - Fix Spec error. * Mon Nov 13 2023 Matrew File - 6.0.30 - Upstream update. * Wed Mar 22 2023 Matrew File - 6.0.23 - Initial package.