feat: add flatpak builds (#1230)

This commit is contained in:
Jabster28 2024-10-08 18:26:49 +01:00 committed by woodser
parent a53e6a0e3d
commit 662eaee7c3
9 changed files with 240 additions and 20 deletions

View file

@ -11,3 +11,4 @@ Terminal=false
Type=Application
MimeType=
X-AppImage-Name=Haveno
StartupWMClass=Haveno

View file

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>exchange.haveno.Haveno</id>
<!-- <icon type="stock">exchange.haveno.Haveno</icon> -->
<launchable type="desktop-id">exchange.haveno.Haveno.desktop</launchable>
<name>Haveno</name>
<summary>Decentralized P2P exchange built on Monero and Tor</summary>
<categories>
<category>Office</category>
<category>Finance</category>
<category>P2P</category>
</categories>
<keywords>
<keyword>cryptocurrency</keyword>
<keyword>monero</keyword>
</keywords>
<metadata_license>CC-BY-4.0</metadata_license>
<project_license>AGPL-3.0-only</project_license>
<branding>
<color type="primary" scheme_preference="light">#e5a29f</color>
<color type="primary" scheme_preference="dark">#562c63</color>
</branding>
<supports>
<control>pointing</control>
<control>keyboard</control>
<control>touch</control>
</supports>
<description>
<p>Haveno (pronounced ha‧ve‧no) is a platform for people who want to exchange Monero for fiat currencies like EUR, GBP, and USD or other cryptocurrencies like BTC, ETH, and BCH.</p>
<ul>
<li>All communications are routed through Tor, to preserve your privacy
</li>
<li>Trades are peer-to-peer: trades on Haveno will happen between people only, there is no central authority.
</li>
<li>Trades are non-custodial: Haveno provides arbitration in case something goes wrong during the trade, but we will never have access to your funds.
</li>
<li>There is No token, because we don&#39;t need it. Transactions between traders are secured by non-custodial multisignature transactions on the Monero network.
</li>
</ul>
</description>
<screenshots>
<screenshot type="default">
<image>https://files.catbox.moe/8pahgg.png</image>
<caption>Recent Trades page</caption>
</screenshot>
</screenshots>
<developer id="exchange.haveno">
<name>woodser</name>
</developer>
<url type="homepage">https://haveno.exchange</url>
<url type="bugtracker">https://github.com/haveno-dex/haveno/issues</url>
<content_rating type="oars-1.1">
<content_attribute id="social-chat">moderate</content_attribute>
<content_attribute id="social-info">moderate</content_attribute>
<content_attribute id="social-contacts">intense</content_attribute>
<content_attribute id="money-purchasing">intense</content_attribute>
</content_rating>
<launchable type="desktop-id">Haveno.desktop</launchable>
</component>

View file

@ -0,0 +1,52 @@
id: exchange.haveno.Haveno
runtime: org.freedesktop.Platform
runtime-version: "23.08"
sdk: org.freedesktop.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.openjdk21
command: /app/bin/Haveno
modules:
- name: openjdk
buildsystem: simple
build-commands:
- /usr/lib/sdk/openjdk21/install.sh
- name: Haveno
buildsystem: simple
sources:
# - type: git
# url: https://github.com/haveno-dex/haveno
- type: dir
path: build
- type: file
path: package/linux/Haveno.desktop
- type: file
path: package/linux/exchange.haveno.Haveno.metainfo.xml
- type: file
path: package/linux/icon.png
build-commands:
- ls
- pwd
# TODO: consider switching from reading from a deb to reading from jpackage's image
- mv temp-*/binaries/haveno_*.deb haveno.deb
- ar x haveno.deb
- tar xf data.tar.*
- cp -r opt/haveno/lib /app/lib
- install -D opt/haveno/bin/Haveno /app/bin/Haveno
- mkdir -p /app/share/icons/hicolor/128x128/apps/
- mkdir -p /app/share/applications/
- mkdir -p /app/share/metainfo/
- mv icon.png /app/share/icons/hicolor/128x128/apps/haveno.png
- mv Haveno.desktop /app/share/applications/exchange.haveno.Haveno.desktop
- mv exchange.haveno.Haveno.metainfo.xml /app/share/metainfo/
# TODO: xdg-open fails
finish-args:
- --env=PATH=/app/jre/bin:/usr/bin:$PATH
# - --env=JAVA_HOME=/app/jre
- --env=JAVA_HOME=/usr/lib/sdk/openjdk21/
- --device=dri
- --talk-name=org.freedesktop.Notifications
- --talk-name=org.freedesktop.secrets
- --share=network
- --share=ipc
- --socket=x11