public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Yaakov Selkowitz <yselkowi@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/flatpak-app-config] f45: Add SDK extension scripts
Date: Thu, 10 Sep 2026 21:36:27 GMT	[thread overview]
Message-ID: <178907618792.1.10184767692103363640.rpms-flatpak-app-config-5b712c8cd411@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/flatpak-app-config
            Branch : f45
            Commit : 5b712c8cd4110196ac685f4b85f72a78304bdf24
            Author : Yaakov Selkowitz <yselkowi@redhat.com>
            Date   : 2025-03-25T21:45:01-04:00
            Stats  : +65/-10 in 12 file(s)
            URL    : https://src.fedoraproject.org/rpms/flatpak-app-config/c/5b712c8cd4110196ac685f4b85f72a78304bdf24?branch=f45

            Log:
            Add SDK extension scripts

Also, add the config for the node22 SDK extension.

---
diff --git a/enable.sh.golang b/enable.sh.golang
new file mode 100644
index 0000000..f3c023f
--- /dev/null
+++ b/enable.sh.golang
@@ -0,0 +1,3 @@
+#! /bin/sh
+export GOROOT=/usr/lib/sdk/golang
+export PATH="$PATH:/usr/lib/sdk/golang/bin"

diff --git a/enable.sh.java-21-openjdk b/enable.sh.java-21-openjdk
new file mode 100644
index 0000000..746663a
--- /dev/null
+++ b/enable.sh.java-21-openjdk
@@ -0,0 +1,3 @@
+#! /bin/sh
+export JAVA_HOME=/usr/lib/sdk/openjdk21/jvm/java-21-openjdk
+export PATH="$PATH:/usr/lib/sdk/openjdk21/bin"

diff --git a/enable.sh.llvm19 b/enable.sh.llvm19
new file mode 100644
index 0000000..7af092f
--- /dev/null
+++ b/enable.sh.llvm19
@@ -0,0 +1,2 @@
+#! /bin/sh
+export PATH="$PATH:/usr/lib/sdk/llvm19/bin"

diff --git a/enable.sh.llvm20 b/enable.sh.llvm20
new file mode 100644
index 0000000..bb9feba
--- /dev/null
+++ b/enable.sh.llvm20
@@ -0,0 +1,2 @@
+#! /bin/sh
+export PATH="$PATH:/usr/lib/sdk/llvm20/bin"

diff --git a/enable.sh.nodejs22 b/enable.sh.nodejs22
new file mode 100644
index 0000000..7718c92
--- /dev/null
+++ b/enable.sh.nodejs22
@@ -0,0 +1,3 @@
+#! /bin/sh
+export PATH="$PATH:/usr/lib/sdk/node22/bin"
+export npm_config_nodedir=/usr/lib/sdk/node22

diff --git a/enable.sh.pandoc b/enable.sh.pandoc
new file mode 100644
index 0000000..42a7d57
--- /dev/null
+++ b/enable.sh.pandoc
@@ -0,0 +1,3 @@
+#! /bin/sh
+export PATH="$PATH:/usr/lib/sdk/pandoc/bin"
+export pandoc_datadir=/usr/lib/sdk/pandoc/share/pandoc

diff --git a/enable.sh.rust b/enable.sh.rust
new file mode 100644
index 0000000..f518383
--- /dev/null
+++ b/enable.sh.rust
@@ -0,0 +1,2 @@
+#!/bin/sh
+export PATH="$PATH:/usr/lib/sdk/rust-stable/bin"

diff --git a/enable.sh.texlive b/enable.sh.texlive
new file mode 100644
index 0000000..0eba818
--- /dev/null
+++ b/enable.sh.texlive
@@ -0,0 +1,4 @@
+#! /bin/sh
+export PATH="$PATH:/usr/lib/sdk/texlive/bin"
+export TEXMFROOT=/usr/lib/sdk/texlive
+export ASYMPTOTE_DIR=/usr/lib/sdk/texlive/share/asymptote

diff --git a/flatpak-app-config.spec b/flatpak-app-config.spec
index d5dbf45..28b7769 100644
--- a/flatpak-app-config.spec
+++ b/flatpak-app-config.spec
@@ -23,20 +23,28 @@ applications during the building process.
 }
 %description %{_description}
 
-%define add_subpkg(n:i:r:) \
+%define add_subpkg(n:i:r:eI) \
 %global all_appdata %{?all_appdata} %{-i:%{-i*}.metainfo.xml}\
+%global all_enable_sh %{?all_enable_sh} %{-e:enable.sh.%{-n*}}\
+%global all_install_sh %{?all_install_sh} %{-I:install.sh.%{-n*}}\
 %define pkgname %{-n:%{-n*}}%{!-n:%{error:Package name not defined}}\
 %package -n %{pkgname}-flatpak-config\
 Summary: Flatpak configuration for %{pkgname}\
 Provides: %{name}-%{pkgname} = %{version}-%{release}\
 Supplements: (%{pkgname} and flatpak-runtime-config)\
+RemovePathPostfixes: .%{pkgname}\
 %{-r:Requires: %{-r*}}\
 %{-i:Source: %{-i*}.metainfo.xml}\
+%{-e:Source: enable.sh.%{pkgname}}\
+%{-I:Source: install.sh.%{pkgname}}\
 \
 %description -n %{pkgname}-flatpak-config %{_description}\
 \
 %files -n %{pkgname}-flatpak-config\
-%{-i:%{_metainfodir}/%{-i*}.metainfo.xml}
+%{-i:%{_metainfodir}/%{-i*}.metainfo.xml}\
+%{-e:%{_prefix}/enable.sh.%{pkgname}}\
+%{-I:%{_prefix}/install.sh.%{pkgname}}\
+%{nil}
 
 
 # runtime extensions
@@ -62,20 +70,21 @@ Supplements: (%{pkgname} and flatpak-runtime-config)\
 # common app extensions
 %add_subpkg -n yt-dlp -i %{plat_id}.YtDlp
 # SDK extensions
-%add_subpkg -n golang -i %{sdk_ext}.golang
-%add_subpkg -n java-21-openjdk -i %{sdk_ext}.openjdk21
-%add_subpkg -n llvm19 -i %{sdk_ext}.llvm19
-%add_subpkg -n llvm20 -i %{sdk_ext}.llvm20
-%add_subpkg -n pandoc -i %{sdk_ext}.pandoc
-%add_subpkg -n rust -i %{sdk_ext}.rust-stable
-%add_subpkg -n texlive -i %{sdk_ext}.texlive
+%add_subpkg -n golang -i %{sdk_ext}.golang -e
+%add_subpkg -n java-21-openjdk -i %{sdk_ext}.openjdk21 -e -I
+%add_subpkg -n llvm19 -i %{sdk_ext}.llvm19 -e
+%add_subpkg -n llvm20 -i %{sdk_ext}.llvm20 -e
+%add_subpkg -n nodejs22 -i %{sdk_ext}.node22 -e -I
+%add_subpkg -n pandoc -i %{sdk_ext}.pandoc -e
+%add_subpkg -n rust -i %{sdk_ext}.rust-stable -e
+%add_subpkg -n texlive -i %{sdk_ext}.texlive -e
 # CLI utilities for HW acceleration APIs
 %add_subpkg -n clinfo -i %{plat_id}.ClInfo
 %add_subpkg -n mesa-demos -i %{plat_id}.GlxInfo
 %add_subpkg -n libva-utils -i %{plat_id}.VaInfo
 %add_subpkg -n vdpauinfo -i %{plat_id}.VdpauInfo
 %add_subpkg -n vulkan-tools -i %{plat_id}.VulkanInfo
-# Desktop applications that need metdata
+# Desktop applications that need metadata
 %add_subpkg -n gnome-genius -i org.gnome.Genius
 # additional dependencies
 %add_subpkg -n ark -r arj,p7zip-plugins,unrar,unar
@@ -89,6 +98,11 @@ Supplements: (%{pkgname} and flatpak-runtime-config)\
 %build
 
 %install
+# Install extension scripts
+mkdir -p %{buildroot}%{_prefix}
+for e in %{all_enable_sh} %{all_install_sh}; do
+    install -t %{buildroot}%{_prefix} -p -m 0755 %{_sourcedir}/$e
+done
 # Install appdata
 mkdir -p %{buildroot}%{_metainfodir}
 for a in %{all_appdata}; do

diff --git a/install.sh.java-21-openjdk b/install.sh.java-21-openjdk
new file mode 100644
index 0000000..3484bf7
--- /dev/null
+++ b/install.sh.java-21-openjdk
@@ -0,0 +1,6 @@
+#! /bin/sh
+mkdir -p /app/jre/bin
+cd /usr/lib/sdk/openjdk21/jvm/java-21-openjdk
+cp -ra conf lib release /app/jre/
+rm -f /app/jre/lib/src.zip /app/jre/lib/ct.sym
+cp -ra bin/{java,keytool,rmiregistry} /app/jre/bin

diff --git a/install.sh.nodejs22 b/install.sh.nodejs22
new file mode 100644
index 0000000..49bde0e
--- /dev/null
+++ b/install.sh.nodejs22
@@ -0,0 +1,2 @@
+#! /bin/sh
+install -D -m0755 /usr/lib/sdk/node22/bin/node /app/node/bin/node

diff --git a/org.fedoraproject.Sdk.Extension.node22.metainfo.xml b/org.fedoraproject.Sdk.Extension.node22.metainfo.xml
new file mode 100644
index 0000000..c145352
--- /dev/null
+++ b/org.fedoraproject.Sdk.Extension.node22.metainfo.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component type="runtime">
+  <id>org.fedoraproject.Sdk.Extension.node22</id>
+  <metadata_license>CC0-1.0</metadata_license>
+  <name>Node.js 22 Sdk extension</name>
+  <summary>Node.js 22 interpreter and tools extension for the Fedora flatpak SDK</summary>
+  <developer id="org.fedoraproject">
+    <name>Fedora</name>
+  </developer>
+  <url type="homepage">https://nodejs.org/</url>
+</component>

                 reply	other threads:[~2026-09-10 21:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178907618792.1.10184767692103363640.rpms-flatpak-app-config-5b712c8cd411@fedoraproject.org \
    --to=yselkowi@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox