forked from Mirror/frr
debian: fix sphinx docs
- use dh_sphinxdoc to get rid of embedded JS - add override.js/css files missing from dist tarball Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
parent
b62f9af6b6
commit
e1e2ea84ee
1
debian/.gitignore
vendored
1
debian/.gitignore
vendored
|
@ -5,6 +5,7 @@
|
|||
!/source
|
||||
!/patches/
|
||||
!/patches/xref_mips64el_pcrel.patch
|
||||
!/patches/sphinx-missing-overrides.patch
|
||||
|
||||
/*.log
|
||||
/*.substvars
|
||||
|
|
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -12,6 +12,7 @@ frr (8.4.1-1) UNRELEASED; urgency=medium
|
|||
* libyang-related pcre3 dep replaced with pcre2 (closes: #1000032)
|
||||
* disable ELF magic on mips64el
|
||||
* fixed texinfo figure installation directory
|
||||
* enable dh_sphinxdoc to get rid of embedded javascript in frr-doc
|
||||
|
||||
-- David Lamparter <equinox-debian@diac24.net> Mon, 02 Jan 2023 12:19:01 +0100
|
||||
|
||||
|
|
5
debian/control
vendored
5
debian/control
vendored
|
@ -104,9 +104,8 @@ Package: frr-doc
|
|||
Section: doc
|
||||
Architecture: all
|
||||
Multi-Arch: foreign
|
||||
Depends: libjs-jquery,
|
||||
libjs-underscore,
|
||||
${misc:Depends}
|
||||
Depends: ${misc:Depends},
|
||||
${sphinxdoc:Depends}
|
||||
Suggests: frr
|
||||
Conflicts: quagga-doc
|
||||
Description: FRRouting suite - user manual
|
||||
|
|
1
debian/patches/series
vendored
1
debian/patches/series
vendored
|
@ -1 +1,2 @@
|
|||
xref_mips64el_pcrel.patch
|
||||
sphinx-missing-overrides.patch
|
||||
|
|
314
debian/patches/sphinx-missing-overrides.patch
vendored
Normal file
314
debian/patches/sphinx-missing-overrides.patch
vendored
Normal file
|
@ -0,0 +1,314 @@
|
|||
--- /dev/null 2022-12-21 16:30:21.771894532 +0100
|
||||
+++ frr-8.4.1/doc/user/_static/overrides.js 2023-01-02 12:11:36.024597632 +0100
|
||||
@@ -0,0 +1,13 @@
|
||||
+/* special styling for the protocols vs. OS table in overview.rst
|
||||
+ *
|
||||
+ * unfortunately this can't be done in straight CSS because we're changing
|
||||
+ * the styling on the parent.
|
||||
+ */
|
||||
+$(document).ready(function() {
|
||||
+ $("span.mark:contains('Y')" ).addClass("mark-y" ).parent("td").addClass("mark");
|
||||
+ $("span.mark:contains('≥')" ).addClass("mark-geq").parent("td").addClass("mark");
|
||||
+ $("span.mark:contains('N')" ).addClass("mark-n" ).parent("td").addClass("mark");
|
||||
+ $("span.mark:contains('CP')").addClass("mark-cp" ).parent("td").addClass("mark");
|
||||
+ $("span.mark:contains('†')" ).addClass("mark-dag").parent("td").addClass("mark");
|
||||
+ $('td.mark').parents('table').addClass("mark").children('colgroup').remove();
|
||||
+});
|
||||
--- /dev/null 2022-12-21 16:30:21.771894532 +0100
|
||||
+++ frr-8.4.1/doc/user/_static/overrides.css 2023-01-02 12:11:36.024597632 +0100
|
||||
@@ -0,0 +1,295 @@
|
||||
+/* remove max-width restriction */
|
||||
+div.body {
|
||||
+ max-width: none;
|
||||
+}
|
||||
+
|
||||
+/* styling for the protocols vs. OS table in overview.rst */
|
||||
+/* first, general bits */
|
||||
+div.body td.mark {
|
||||
+ text-align: center;
|
||||
+ border-left: 1px solid #ccc;
|
||||
+}
|
||||
+table.mark th {
|
||||
+ text-align: center;
|
||||
+}
|
||||
+table.mark td {
|
||||
+ vertical-align: middle;
|
||||
+}
|
||||
+table.mark cite {
|
||||
+ font-weight: bold;
|
||||
+}
|
||||
+
|
||||
+/* individual Y/N/... cells */
|
||||
+td.mark {
|
||||
+ width: 4.5em;
|
||||
+}
|
||||
+table.mark strong {
|
||||
+ display:block;
|
||||
+ text-align: center;
|
||||
+ margin:auto;
|
||||
+ padding-top: 8pt;
|
||||
+ padding-bottom: 2pt;
|
||||
+}
|
||||
+td.mark span {
|
||||
+ display: block;
|
||||
+ padding: 3px 1px;
|
||||
+ border: 1px dotted #666;
|
||||
+ width: 36pt;
|
||||
+ margin:auto;
|
||||
+ text-align:center;
|
||||
+}
|
||||
+table.mark tr td:first-child {
|
||||
+ padding-left:1.5em;
|
||||
+}
|
||||
+table.mark tr td:first-child cite {
|
||||
+ margin-left:-1.5em;
|
||||
+}
|
||||
+span.mark-y { background-color: #77ffaa; }
|
||||
+span.mark-geq { background-color: #aaff77; }
|
||||
+span.mark-cp { background-color: #ffbb55; }
|
||||
+span.mark-n { background-color: #ff8877; }
|
||||
+span.mark-dag { background-color: #ffee99; font-size: 8pt; padding:0px 1px; border-top:0px; }
|
||||
+
|
||||
+/* for the legend below */
|
||||
+li span.mark {
|
||||
+ display: inline-block;
|
||||
+ padding: 3px 1px;
|
||||
+ border: 1px dotted #666;
|
||||
+ width: 36pt;
|
||||
+ text-align: center;
|
||||
+}
|
||||
+
|
||||
+/* Palette URL: http://paletton.com/#uid=70p0p0kt6uvcDRAlhBavokxLJ6w */
|
||||
+
|
||||
+:root {
|
||||
+--primary-0: #F36F16; /* Main Primary color */
|
||||
+--primary-1: #FFC39A;
|
||||
+--primary-2: #FF9A55;
|
||||
+--primary-3: #A34403;
|
||||
+--primary-4: #341500;
|
||||
+--primary-9: #FFF3EB;
|
||||
+
|
||||
+--secondary-1-0: #F39C16; /* Main Secondary color (1) */
|
||||
+--secondary-1-1: #FFD79A;
|
||||
+--secondary-1-2: #FFBC55;
|
||||
+--secondary-1-3: #A36403;
|
||||
+--secondary-1-4: #341F00;
|
||||
+--secondary-1-9: #FFF7EB;
|
||||
+
|
||||
+--secondary-2-0: #1A599F; /* Main Secondary color (2) */
|
||||
+--secondary-2-1: #92B9E5;
|
||||
+--secondary-2-2: #477CB8;
|
||||
+--secondary-2-3: #0A386B;
|
||||
+--secondary-2-4: #011122;
|
||||
+--secondary-2-9: #E3EBF4;
|
||||
+
|
||||
+--complement-0: #0E9A83; /* Main Complement color */
|
||||
+--complement-1: #8AE4D4;
|
||||
+--complement-2: #3CB4A0;
|
||||
+--complement-3: #026857;
|
||||
+--complement-4: #00211B;
|
||||
+--complement-9: #E0F4F0;
|
||||
+}
|
||||
+
|
||||
+/* new */
|
||||
+
|
||||
+body {
|
||||
+ font-family: "Fira Sans", Helvetica, Arial, sans-serif;
|
||||
+ font-weight:400;
|
||||
+}
|
||||
+h1, h2, h3, h4, h5, h6 {
|
||||
+ font-family: "Fira Sans", Helvetica, Arial, sans-serif;
|
||||
+ font-weight:500;
|
||||
+}
|
||||
+code, pre, tt {
|
||||
+ font-family: "Fira Mono";
|
||||
+}
|
||||
+h1 {
|
||||
+ background-color:var(--secondary-1-1);
|
||||
+ border-bottom:1px solid var(--secondary-1-0);
|
||||
+ font-weight:300;
|
||||
+}
|
||||
+h2 {
|
||||
+ margin-top:36pt;
|
||||
+}
|
||||
+
|
||||
+a,
|
||||
+a:hover,
|
||||
+a:visited,
|
||||
+.code-block-caption a.headerlink:hover,
|
||||
+.rst-content dl:not(.docutils) dt .headerlink {
|
||||
+ color: var(--complement-0);
|
||||
+}
|
||||
+.code-block-caption a.headerlink {
|
||||
+ visibility:hidden;
|
||||
+}
|
||||
+
|
||||
+/* admonitions */
|
||||
+
|
||||
+.admonition.warning {
|
||||
+ border:1px dashed var(--primary-2);
|
||||
+}
|
||||
+.admonition.warning .admonition-title {
|
||||
+ color: var(--primary-3);
|
||||
+ background-color: var(--primary-1);
|
||||
+}
|
||||
+.admonition.note,
|
||||
+.admonition.hint {
|
||||
+ border:1px dashed var(--complement-2);
|
||||
+}
|
||||
+.admonition.note .admonition-title,
|
||||
+.admonition.hint .admonition-title {
|
||||
+ color: var(--complement-3);
|
||||
+ background-color: var(--complement-1);
|
||||
+}
|
||||
+.admonition.seealso,
|
||||
+div.seealso {
|
||||
+ background-color:var(--complement-9);
|
||||
+}
|
||||
+.admonition.seealso .admonition-title {
|
||||
+ color: var(--complement-3);
|
||||
+ background-color:var(--complement-1);
|
||||
+ border-bottom:1px solid var(--complement-2);
|
||||
+}
|
||||
+.admonition.admonition-todo .admonition-title {
|
||||
+ background-image: repeating-linear-gradient(
|
||||
+ 135deg,
|
||||
+ #ffa,
|
||||
+ #ffa 14.14213452px,
|
||||
+ #bbb 14.14213452px,
|
||||
+ #bbb 28.28427124px
|
||||
+ );
|
||||
+ color:#000;
|
||||
+}
|
||||
+.admonition.admonition-todo {
|
||||
+ background-image: repeating-linear-gradient(
|
||||
+ 135deg,
|
||||
+ #ffd,
|
||||
+ #ffd 14.14213452px,
|
||||
+ #eed 14.14213452px,
|
||||
+ #eed 28.28427124px
|
||||
+ );
|
||||
+}
|
||||
+
|
||||
+.rst-content dl .admonition p.last {
|
||||
+ margin-bottom:0 !important;
|
||||
+}
|
||||
+
|
||||
+/* file block */
|
||||
+
|
||||
+.code-block-caption {
|
||||
+/* border-radius: 4px; */
|
||||
+ font-style:italic;
|
||||
+ font-weight:300;
|
||||
+ border-bottom: 1px solid var(--secondary-2-1);
|
||||
+ background-color: var(--secondary-2-9);
|
||||
+ padding:2px 8px;
|
||||
+}
|
||||
+
|
||||
+/* navbar */
|
||||
+
|
||||
+.wy-nav-side {
|
||||
+ background-color: var(--secondary-1-4);
|
||||
+ border-right:2px solid var(--primary-3);
|
||||
+}
|
||||
+.wy-menu-vertical a,
|
||||
+.wy-menu-vertical a:visited,
|
||||
+.wy-menu-vertical a:hover,
|
||||
+.wy-side-nav-search>a,
|
||||
+.wy-side-nav-search .wy-dropdown>a {
|
||||
+ color: var(--primary-0);
|
||||
+}
|
||||
+
|
||||
+nav div.wy-side-nav-search {
|
||||
+ background-color: #eee;
|
||||
+}
|
||||
+nav div.wy-side-scroll {
|
||||
+ background-color: var(--secondary-1-4);
|
||||
+}
|
||||
+nav .wy-menu-vertical a:hover {
|
||||
+ background-color:var(--primary-0);
|
||||
+ color:var(--primary-4);
|
||||
+}
|
||||
+nav .wy-menu-vertical li.current ul a:hover {
|
||||
+ background-color:var(--secondary-1-2);
|
||||
+ color:var(--primary-4);
|
||||
+}
|
||||
+nav .wy-menu-vertical li.current ul a {
|
||||
+ background-color:var(--secondary-1-1);
|
||||
+ color:var(--primary-3);
|
||||
+}
|
||||
+nav .wy-menu-vertical li.on a:hover,
|
||||
+nav .wy-menu-vertical li.current>a:hover {
|
||||
+ background-color:#fcfcfc;
|
||||
+}
|
||||
+.wy-side-nav-search input[type=text] {
|
||||
+ border-color:var(--primary-2);
|
||||
+}
|
||||
+.wy-menu-vertical li.toctree-l1.current>a {
|
||||
+ border-top:1px solid var(--secondary-1-3);
|
||||
+ border-bottom:1px solid var(--secondary-1-3);
|
||||
+}
|
||||
+.wy-menu-vertical li.toctree-l2.current>a {
|
||||
+ background-color:var(--secondary-1-2);
|
||||
+}
|
||||
+.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a {
|
||||
+ background-color:var(--secondary-1-9);
|
||||
+}
|
||||
+
|
||||
+.wy-nav-content {
|
||||
+ padding: 25pt 40pt;
|
||||
+}
|
||||
+div[role=navigation] > hr {
|
||||
+ display:none;
|
||||
+}
|
||||
+div[role=navigation] {
|
||||
+ margin-bottom:15pt;
|
||||
+}
|
||||
+h1 {
|
||||
+ margin-left:-40pt;
|
||||
+ margin-right:-40pt;
|
||||
+ padding:5pt 40pt 5pt 40pt;
|
||||
+}
|
||||
+
|
||||
+.rst-content pre.literal-block, .rst-content div[class^='highlight'] {
|
||||
+ border-color:var(--secondary-1-1);
|
||||
+}
|
||||
+
|
||||
+span.pre {
|
||||
+ color: var(--complement-3);
|
||||
+}
|
||||
+pre {
|
||||
+ background-color: var(--secondary-1-9);
|
||||
+ border-color: var(--secondary-1-1);
|
||||
+}
|
||||
+.highlight .p { color: var(--secondary-2-3); }
|
||||
+.highlight .k { color: var(--secondary-2-0); }
|
||||
+.highlight .kt { color: var(--complement-0); }
|
||||
+.highlight .cm { color: var(--primary-3); }
|
||||
+.highlight .ow { color: var(--primary-3); }
|
||||
+.highlight .na { color: var(--primary-2); }
|
||||
+.highlight .nv { color: var(--complement-0); }
|
||||
+
|
||||
+strong {
|
||||
+ font-weight:500;
|
||||
+}
|
||||
+.rst-content dl:not(.docutils) dt {
|
||||
+ font-family:Fira Mono;
|
||||
+ font-weight:600;
|
||||
+ background-color:var(--secondary-2-9);
|
||||
+ color:var(--secondary-2-3);
|
||||
+ border-top:2px solid var(--secondary-2-2);
|
||||
+}
|
||||
+dt code.descname {
|
||||
+ color: var(--secondary-2-4);
|
||||
+}
|
||||
+
|
||||
+@media (min-width: 1200px) {
|
||||
+ .container { width: auto; }
|
||||
+}
|
||||
+@media (min-width: 992px) {
|
||||
+ .container { width: auto; }
|
||||
+}
|
||||
+@media (min-width: 768px) {
|
||||
+ .container { width: auto; }
|
||||
+}
|
8
debian/rules
vendored
8
debian/rules
vendored
|
@ -36,7 +36,7 @@ endif
|
|||
export PYTHON=python3
|
||||
|
||||
%:
|
||||
dh $@ -Bbuild
|
||||
dh $@ -Bbuild --with=sphinxdoc
|
||||
|
||||
override_dh_auto_configure:
|
||||
$(shell dpkg-buildflags --export=sh); \
|
||||
|
@ -93,12 +93,6 @@ override_dh_auto_install:
|
|||
rm -rf debian/tmp/usr/include
|
||||
-rm debian/tmp/usr/lib/frr/ssd
|
||||
|
||||
# use installed js libraries
|
||||
-rm -f debian/tmp/usr/share/doc/frr/html/_static/jquery.js
|
||||
ln -s /usr/share/javascript/jquery/jquery.js debian/tmp/usr/share/doc/frr/html/_static/jquery.js
|
||||
-rm -f debian/tmp/usr/share/doc/frr/html/_static/underscore.js
|
||||
ln -s /usr/share/javascript/underscore/underscore.js debian/tmp/usr/share/doc/frr/html/_static/underscore.js
|
||||
|
||||
override_dh_auto_build:
|
||||
dh_auto_build -- $(MAKE_SILENT)
|
||||
|
||||
|
|
Loading…
Reference in a new issue