From c367a19869720f7c0b80bd28ef56fc66ef83561b Mon Sep 17 00:00:00 2001 From: Var Bhat Date: Sun, 12 Mar 2023 18:45:33 +0530 Subject: [PATCH 1/6] Add io.httpie.HTTPie --- flathub.json | 3 ++ io.httpie.HTTPie.appdata.xml | 29 ++++++++++++++ io.httpie.HTTPie.yml | 75 ++++++++++++++++++++++++++++++++++++ 3 files changed, 107 insertions(+) create mode 100644 flathub.json create mode 100644 io.httpie.HTTPie.appdata.xml create mode 100644 io.httpie.HTTPie.yml diff --git a/flathub.json b/flathub.json new file mode 100644 index 0000000000..637604e82e --- /dev/null +++ b/flathub.json @@ -0,0 +1,3 @@ +{ + "only-arches": ["x86_64"] +} diff --git a/io.httpie.HTTPie.appdata.xml b/io.httpie.HTTPie.appdata.xml new file mode 100644 index 0000000000..1bc3fd1ffd --- /dev/null +++ b/io.httpie.HTTPie.appdata.xml @@ -0,0 +1,29 @@ + + + io.httpie.HTTPie + io.httpie.HTTPie.desktop + HTTPie + HTTPie + Cross-platform API testing client for Humans + LicenseRef-proprietary + CC0-1.0 + https://httpie.io/desktop/ + https://github.com/httpie/desktop/issues + +

+ HTTPie is cross-platform API testing client for humans. Painlessly test REST, GraphQL, and HTTP APIs. +

+
+ + + + https://raw.githubusercontent.com/httpie/desktop/master/.github/httpie-desktop.png + + + + + + + + +
\ No newline at end of file diff --git a/io.httpie.HTTPie.yml b/io.httpie.HTTPie.yml new file mode 100644 index 0000000000..87e0cb8dde --- /dev/null +++ b/io.httpie.HTTPie.yml @@ -0,0 +1,75 @@ +app-id: io.httpie.HTTPie +runtime: org.freedesktop.Platform +runtime-version: '22.08' +sdk: org.freedesktop.Sdk +base: org.electronjs.Electron2.BaseApp +base-version: '22.08' +separate-locales: false +tags: + - proprietary +command: httpie +rename-icon: httpie +rename-desktop-file: httpie.desktop +finish-args: + - --socket=x11 + - --socket=wayland + - --share=network +modules: + - name: unappimage + buildsystem: simple + build-commands: + - make -C squashfs-tools -j ${FLATPAK_BUILDER_N_JOBS} install INSTALL_DIR=/app/bin + sources: + - type: git + url: https://github.com/refi64/unappimage + commit: d7f86f2a0d7ec3a69211125207d5f127386b849a + - name: httpie + buildsystem: simple + build-commands: + - unappimage httpie.AppImage + - rm httpie.AppImage + + - install -Dm755 httpie.sh /app/bin/httpie + - install -dm755 /app/share/applications + - sed -e 's|Exec=AppRun|Exec=/app/bin/httpie|' squashfs-root/httpie.desktop + > /app/share/applications/httpie.desktop + - install -Dm644 squashfs-root/usr/share/icons/hicolor/512x512/apps/httpie.png + -t /app/share/icons/hicolor/512x512/apps + - install -Dm644 squashfs-root/usr/share/icons/hicolor/256x256/apps/httpie.png + -t /app/share/icons/hicolor/256x256/apps + - install -Dm644 squashfs-root/usr/share/icons/hicolor/128x128/apps/httpie.png + -t /app/share/icons/hicolor/128x128/apps + - install -Dm644 squashfs-root/usr/share/icons/hicolor/64x64/apps/httpie.png + -t /app/share/icons/hicolor/64x64/apps + - install -Dm644 squashfs-root/usr/share/icons/hicolor/32x32/apps/httpie.png + -t /app/share/icons/hicolor/32x32/apps + - install -Dm644 squashfs-root/usr/share/icons/hicolor/16x16/apps/httpie.png + -t /app/share/icons/hicolor/16x16/apps + + - install -Dm644 io.httpie.HTTPie.appdata.xml -t /app/share/metainfo/ + - mv squashfs-root /app/main/ + sources: + - type: file + dest-filename: httpie.AppImage + only-arches: + - x86_64 + url: https://github.com/httpie/desktop/releases/download/v2023.1.2/HTTPie-2023.1.2.AppImage + sha256: 5eb2ec0e5d4865966ed32ffc3891b90f40215134cb01b6590ef07c467c23d6b5 + x-checker-data: + type: json + url: https://api.github.com/repos/httpie/desktop/releases + version-query: map(select(.prerelease == false)) | map(select(.tag_name + | startswith("core@"))) | first | .tag_name | sub("core@"; "") + timestamp-query: map(select(.prerelease == false)) | map(select(.tag_name + | startswith("core@"))) | first | .published_at + url-query: '"https://github.com/httpie/desktop/releases/download/"+ $version + "/HTTPie-" + $version + ".AppImage"' + - type: script + dest-filename: httpie.sh + commands: + # Share a TMPDIR, so that multiple instance can figure out there's + # already one running. + - export TMPDIR="$XDG_RUNTIME_DIR/app/$FLATPAK_ID" + # This script is required to work around a lack of SUID sandbox helper: + - exec zypak-wrapper /app/main/httpie "$@" + - type: file + path: io.httpie.HTTPie.appdata.xml From 15a8a0a95a48c29267a45fd4a2961d4fa2e337c1 Mon Sep 17 00:00:00 2001 From: Var Bhat Date: Sun, 12 Mar 2023 20:49:31 +0530 Subject: [PATCH 2/6] Update io.httpie.HTTPie.appdata.xml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Hubert Figuière --- io.httpie.HTTPie.appdata.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/io.httpie.HTTPie.appdata.xml b/io.httpie.HTTPie.appdata.xml index 1bc3fd1ffd..1c3e003a77 100644 --- a/io.httpie.HTTPie.appdata.xml +++ b/io.httpie.HTTPie.appdata.xml @@ -21,8 +21,7 @@ - - + From 2f8eb2d8bdcea7ab9461ddbf271a66f91adce27a Mon Sep 17 00:00:00 2001 From: Var Bhat Date: Sun, 12 Mar 2023 20:56:06 +0530 Subject: [PATCH 3/6] remove --socket=wayland --- io.httpie.HTTPie.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/io.httpie.HTTPie.yml b/io.httpie.HTTPie.yml index 87e0cb8dde..d15c84d488 100644 --- a/io.httpie.HTTPie.yml +++ b/io.httpie.HTTPie.yml @@ -12,8 +12,8 @@ rename-icon: httpie rename-desktop-file: httpie.desktop finish-args: - --socket=x11 - - --socket=wayland - --share=network + - --share=ipc modules: - name: unappimage buildsystem: simple From 1f0c5c600521f2fc9be942b742b85416475f6890 Mon Sep 17 00:00:00 2001 From: Var Bhat Date: Sun, 12 Mar 2023 21:11:58 +0530 Subject: [PATCH 4/6] use desktop-file-edit --- io.httpie.HTTPie.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/io.httpie.HTTPie.yml b/io.httpie.HTTPie.yml index d15c84d488..0318bb1279 100644 --- a/io.httpie.HTTPie.yml +++ b/io.httpie.HTTPie.yml @@ -31,8 +31,8 @@ modules: - install -Dm755 httpie.sh /app/bin/httpie - install -dm755 /app/share/applications - - sed -e 's|Exec=AppRun|Exec=/app/bin/httpie|' squashfs-root/httpie.desktop - > /app/share/applications/httpie.desktop + - desktop-file-edit --set-key=Exec --set-value="/app/bin/httpie %U" squashfs-root/httpie.desktop + - install -Dm644 squashfs-root/httpie.desktop -t /app/share/applications - install -Dm644 squashfs-root/usr/share/icons/hicolor/512x512/apps/httpie.png -t /app/share/icons/hicolor/512x512/apps - install -Dm644 squashfs-root/usr/share/icons/hicolor/256x256/apps/httpie.png From 64d01c84c932385475d2668929b2229787d71798 Mon Sep 17 00:00:00 2001 From: Var Bhat Date: Sun, 12 Mar 2023 21:15:33 +0530 Subject: [PATCH 5/6] don't use absolute path name in desktop file --- io.httpie.HTTPie.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/io.httpie.HTTPie.yml b/io.httpie.HTTPie.yml index 0318bb1279..17545758b1 100644 --- a/io.httpie.HTTPie.yml +++ b/io.httpie.HTTPie.yml @@ -7,7 +7,7 @@ base-version: '22.08' separate-locales: false tags: - proprietary -command: httpie +command: httpie-desktop rename-icon: httpie rename-desktop-file: httpie.desktop finish-args: @@ -29,9 +29,9 @@ modules: - unappimage httpie.AppImage - rm httpie.AppImage - - install -Dm755 httpie.sh /app/bin/httpie + - install -Dm755 httpie.sh /app/bin/httpie-desktop - install -dm755 /app/share/applications - - desktop-file-edit --set-key=Exec --set-value="/app/bin/httpie %U" squashfs-root/httpie.desktop + - desktop-file-edit --set-key=Exec --set-value="httpie-desktop %U" squashfs-root/httpie.desktop - install -Dm644 squashfs-root/httpie.desktop -t /app/share/applications - install -Dm644 squashfs-root/usr/share/icons/hicolor/512x512/apps/httpie.png -t /app/share/icons/hicolor/512x512/apps From 13fd1516b3259f234dfdf8293079eed4b9df0ce6 Mon Sep 17 00:00:00 2001 From: Var Bhat Date: Sun, 12 Mar 2023 21:43:09 +0530 Subject: [PATCH 6/6] add aarch64 support and correct x-checker-data --- flathub.json | 3 --- io.httpie.HTTPie.yml | 20 +++++++++++++++----- 2 files changed, 15 insertions(+), 8 deletions(-) delete mode 100644 flathub.json diff --git a/flathub.json b/flathub.json deleted file mode 100644 index 637604e82e..0000000000 --- a/flathub.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "only-arches": ["x86_64"] -} diff --git a/io.httpie.HTTPie.yml b/io.httpie.HTTPie.yml index 17545758b1..882755faf0 100644 --- a/io.httpie.HTTPie.yml +++ b/io.httpie.HTTPie.yml @@ -58,11 +58,21 @@ modules: x-checker-data: type: json url: https://api.github.com/repos/httpie/desktop/releases - version-query: map(select(.prerelease == false)) | map(select(.tag_name - | startswith("core@"))) | first | .tag_name | sub("core@"; "") - timestamp-query: map(select(.prerelease == false)) | map(select(.tag_name - | startswith("core@"))) | first | .published_at - url-query: '"https://github.com/httpie/desktop/releases/download/"+ $version + "/HTTPie-" + $version + ".AppImage"' + version-query: map(select(.prerelease == false)) | map(select(.tag_name | startswith("v"))) | first | .tag_name | sub("v"; "") + timestamp-query: map(select(.prerelease == false)) | map(select(.tag_name | startswith("v"))) | first | .published_at + url-query: '"https://github.com/httpie/desktop/releases/download/v"+ $version + "/HTTPie-" + $version + ".AppImage"' + - type: file + dest-filename: httpie.AppImage + only-arches: + - aarch64 + url: https://github.com/httpie/desktop/releases/download/v2023.1.2/HTTPie-2023.1.2-arm64.AppImage + sha256: 5376827848dcedec97295493bfeeaedb6c18e73b1cf6625bb2a2ea8208fb2a6c + x-checker-data: + type: json + url: https://api.github.com/repos/httpie/desktop/releases + version-query: map(select(.prerelease == false)) | map(select(.tag_name | startswith("v"))) | first | .tag_name | sub("v"; "") + timestamp-query: map(select(.prerelease == false)) | map(select(.tag_name | startswith("v"))) | first | .published_at + url-query: '"https://github.com/httpie/desktop/releases/download/v"+ $version + "/HTTPie-" + $version + "-arm64.AppImage"' - type: script dest-filename: httpie.sh commands: