[gnome-build-meta/valentindavid/dev-docs] Add a develop documentation app for all GNOME OS and GNOME SDK



commit d5b36651fb8f99cdb2d0979c816e88e48bf159f8
Author: Valentin David <valentin david codethink co uk>
Date:   Mon Jun 22 15:58:33 2020 +0200

    Add a develop documentation app for all GNOME OS and GNOME SDK

 elements/vm/doc-app/doc-application.bst | 26 ++++++++++++++++++++++++++
 elements/vm/doc-app/extract-doc.bst     | 33 +++++++++++++++++++++++++++++++++
 elements/vm/doc-app/repo.bst            | 11 +++++++++++
 3 files changed, 70 insertions(+)
---
diff --git a/elements/vm/doc-app/doc-application.bst b/elements/vm/doc-app/doc-application.bst
new file mode 100644
index 00000000..36333d7d
--- /dev/null
+++ b/elements/vm/doc-app/doc-application.bst
@@ -0,0 +1,26 @@
+kind: flatpak_image
+
+build-depends:
+- vm/doc-app/extract-doc.bst
+- freedesktop-sdk.bst:integration/platform-integration.bst
+
+config:
+  directory: '/app'
+
+  metadata:
+    Application:
+      name: org.gnome.GnomeOSDoc
+      # We need Sdk to have man
+      runtime: org.gnome.Sdk/%{gcc_arch}/%{branch}
+      sdk: org.gnome.Sdk/%{gcc_arch}/%{branch}
+      command: yelp
+
+    Context:
+      sockets: "wayland;"
+      devices: "dri;"
+
+    Environment:
+      MANPATH: /app/share/man
+      INFOPATH: /app/share/info
+      XML_CATALOG_FILES: /app/etc/xml/catalog
+      #Should be already defined by SDK: XDG_DATA_DIRS: /app/share
diff --git a/elements/vm/doc-app/extract-doc.bst b/elements/vm/doc-app/extract-doc.bst
new file mode 100644
index 00000000..5ad7cf95
--- /dev/null
+++ b/elements/vm/doc-app/extract-doc.bst
@@ -0,0 +1,33 @@
+kind: script
+
+build-depends:
+- vm/common-deps.bst
+- sdk.bst
+- freedesktop-sdk.bst:bootstrap-import.bst
+
+config:
+  layout:
+  - element: vm/common-deps.bst
+    destination: "/sysroot"
+  - element: sdk.bst
+    destination: "/sysroot"
+  - element: bootstrap-import.bst
+    destination: "/"
+
+  commands:
+  - mkdir -p "%{install-root}/app/share"
+  - mkdir -p "%{install-root}/app/share/xml"
+  - mkdir -p "%{install-root}/app/share/gnome"
+  - mkdir -p "%{install-root}/etc"
+  - cp -r "/sysroot%{mandir}" "%{install-root}/app/share/man"
+  - cp -r "/sysroot%{infodir}" "%{install-root}/app/share/info"
+  - |
+    if [ -d "/sysroot%{datadir}/gnome/help" ]; then
+      cp -r "/sysroot%{datadir}/gnome/help" "%{install-root}/app/share/gnome/help"
+    fi
+  - cp -r "/sysroot%{datadir}/help" "%{install-root}/app/share/help"
+  - cp -r "/sysroot%{datadir}/doc" "%{install-root}/app/share/doc"
+  - cp -r "/sysroot%{datadir}/gtk-doc" "%{install-root}/app/share/gtk-doc"
+  - cp -r "/sysroot%{datadir}/xml/docbook" "%{install-root}/app/share/xml"
+  - cp -r "/sysroot/etc/xml" "%{install-root}/app/etc"
+  - sed -i 's,%{datadir},/app/share,g' "%{install-root}/app/etc"/*
diff --git a/elements/vm/doc-app/repo.bst b/elements/vm/doc-app/repo.bst
new file mode 100644
index 00000000..3b69e47c
--- /dev/null
+++ b/elements/vm/doc-app/repo.bst
@@ -0,0 +1,11 @@
+kind: flatpak_repo
+
+build-depends:
+- core-deps/flatpak.bst
+- vm/doc-app/doc-application.bst
+
+config:
+  environment:
+  - core-deps/flatpak.bst
+  arch: '%{gcc_arch}'
+  repo-mode: bare-user-only


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]