From f1cf53868a16b83ab6c82538f285790bf6f99b5f Mon Sep 17 00:00:00 2001 From: somas95 Date: Wed, 9 May 2018 19:08:07 +0200 Subject: [PATCH] improved flatpak install --- flatpak/fonts-download | 30 -------- flatpak/pandoc-download | 35 ---------- flatpak/pip-download | 24 ------- flatpak/uberwriter.json | 149 +++++++++++++++++----------------------- 4 files changed, 62 insertions(+), 176 deletions(-) delete mode 100755 flatpak/fonts-download delete mode 100755 flatpak/pandoc-download delete mode 100755 flatpak/pip-download diff --git a/flatpak/fonts-download b/flatpak/fonts-download deleted file mode 100755 index 88564ef..0000000 --- a/flatpak/fonts-download +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -for i in "$@" -do - case $i in - --module=*) - MODULENAME="${i#*=}" - shift - ;; - *) - ARGS="$ARGS $i" - shift - ;; - esac -done - - -cat < Makefile -all: - echo "Nothing" - -install: - mkdir /tmp/fonts - cd /tmp/fonts - curl -L https://fonts.google.com/download?family=Fira%20Mono > Fira_Mono.zip - unzip Fira_Mono.zip - rm Fira_Mono.zip - mkdir -p /app/share/fonts - cp ./* /app/share/fonts -EOF diff --git a/flatpak/pandoc-download b/flatpak/pandoc-download deleted file mode 100755 index a633463..0000000 --- a/flatpak/pandoc-download +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -for i in "$@" -do - case $i in - --module=*) - MODULENAME="${i#*=}" - shift - ;; - *) - ARGS="$ARGS $i" - shift - ;; - esac -done - - -cat < Makefile -all: - echo "Nothing" - -install: - CXX=/usr/bin/g++ CC=/usr/bin/gcc PYTHONUSERBASE=/app/ pip3 install --user $MODULENAME; - cd /tmp/ - mkdir pandoc_dl && cd pandoc_dl - curl -L https://github.com/jgm/pandoc/releases/download/2.1.3/pandoc-2.1.3-1-amd64.deb > pandoc.deb - ar x pandoc.deb - tar xf data.tar.* - cp ./usr/bin/pandoc /app/bin/pandoc - cp ./usr/bin/pandoc-citeproc /app/bin/pandoc-citeproc - mkdir -p /app/share/ - cp ./usr/share/doc/pandoc/copyright /app/share/pandoc.copyright - cd .. - rm -rf /tmp/pandoc_dl -EOF diff --git a/flatpak/pip-download b/flatpak/pip-download deleted file mode 100755 index 5e41318..0000000 --- a/flatpak/pip-download +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -for i in "$@" -do - case $i in - --module=*) - MODULENAME="${i#*=}" - shift - ;; - *) - ARGS="$ARGS $i" - shift - ;; - esac -done - - -cat < Makefile -all: - echo "Nothing" - -install: - CXX=/usr/bin/g++ CC=/usr/bin/gcc PYTHONUSERBASE=/app/ pip3 install --user $MODULENAME -EOF diff --git a/flatpak/uberwriter.json b/flatpak/uberwriter.json index 06844f5..4447097 100644 --- a/flatpak/uberwriter.json +++ b/flatpak/uberwriter.json @@ -1,14 +1,13 @@ { - "app-id" : "de.wolfvollprecht.UberWriter", - "runtime" : "org.gnome.Platform", - "runtime-version" : "3.26", - "sdk" : "org.gnome.Sdk", - "command" : "uberwriter", - "rename-icon" : "uberwriter", - "finish-args" : [ + "app-id": "de.wolfvollprecht.UberWriter", + "runtime": "org.gnome.Platform", + "runtime-version": "3.26", + "sdk": "org.gnome.Sdk", + "command": "uberwriter", + "rename-icon": "uberwriter", + "finish-args": [ "--socket=x11", "--share=ipc", - "--share=network", "--filesystem=host", "--env=IN_FLATPAK=1", "--filesystem=xdg-run/dconf", @@ -18,9 +17,9 @@ "--env=PATH=/app/extensions/TexLive/bin:/app/extensions/TexLive/2018/bin/x86_64-linux:/app/bin:/usr/bin" ], "build-options" : { - "env" : { - "PYTHON" : "python3", - "IN_FLATPAK" : "1" + "env": { + "PYTHON": "python3", + "IN_FLATPAK": "1" } }, "add-extensions": { @@ -32,10 +31,10 @@ "autodelete": true } }, - "modules" : [ + "modules": [ { - "name" : "uberwriter", - "sources" : [ + "name": "uberwriter", + "sources": [ { "type" : "git", "url" : "git://github.com/wolfv/uberwriter", @@ -51,92 +50,69 @@ ] }, { - "name" : "pyenchant", - "build-options" : { - "build-args" : [ - "--share=network" - ] - }, - "config-opts" : [ - "--module=pyenchant" + "name": "pandoc", + "only-arches": [ + "x86_64" ], - "sources" : [ + "buildsystem": "simple", + "build-commands": [ + "cp bin/pandoc /app/bin/pandoc", + "cp bin/pandoc-citeproc /app/bin/pandoc-citeproc" + ], + "sources": [ { - "type" : "file", - "path" : "pip-download", - "dest-filename" : "configure" + "type": "archive", + "url": "https://github.com/jgm/pandoc/releases/download/2.2/pandoc-2.2-linux.tar.gz", + "sha256": "06ecd882e42ef9b7390b1c82e1e71b3ea48679181289b9b810a8797825bed8ed" } ] }, { - "name" : "regex", - "build-options" : { - "build-args" : [ - "--share=network" - ] - }, - "config-opts" : [ - "--module=regex" + "name": "pipdeps", + "buildsystem": "simple", + "build-commands": [ + "pip3 install --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} pyenchant regex pypandoc" ], - "sources" : [ + "sources": [ { - "type" : "file", - "path" : "pip-download", - "dest-filename" : "configure" + "type": "file", + "url": "https://files.pythonhosted.org/packages/5d/c1/45947333669b31bc6b4933308dd07c2aa2fedcec0a95b14eedae993bd449/wheel-0.31.0.tar.gz", + "sha256": "1ae8153bed701cb062913b72429bcf854ba824f973735427681882a688cb55ce" + }, + { + "type": "file", + "url": "https://files.pythonhosted.org/packages/ae/e8/2340d46ecadb1692a1e455f13f75e596d4eab3d11a57446f08259dee8f02/pip-10.0.1.tar.gz", + "sha256": "f2bd08e0cd1b06e10218feaf6fef299f473ba706582eb3bd9d52203fdbd7ee68" + }, + { + "type": "file", + "url": "https://files.pythonhosted.org/packages/71/81/00184643e5a10a456b4118fc12c96780823adb8ed974eb2289f29703b29b/pypandoc-1.4.tar.gz", + "sha256": "e914e6d5f84a76764887e4d909b09d63308725f0cbb5293872c2c92f07c11a5b" + }, + { + "type": "file", + "url": "https://files.pythonhosted.org/packages/a2/51/c39562cfed3272592c60cfd229e5464d715b78537e332eac2b695422dc49/regex-2018.02.21.tar.gz", + "sha256": "b44624a38d07d3c954c84ad302c29f7930f4bf01443beef5589e9157b14e2a29" + }, + { + "type": "file", + "url": "https://files.pythonhosted.org/packages/9e/54/04d88a59efa33fefb88133ceb638cdf754319030c28aadc5a379d82140ed/pyenchant-2.0.0.tar.gz", + "sha256": "fc31cda72ace001da8fe5d42f11c26e514a91fa8c70468739216ddd8de64e2a0" } ] }, { - "name" : "python-Levenshtein", - "build-options" : { - "build-args" : [ - "--share=network" - ] - }, - "config-opts" : [ - "--module=python-Levenshtein" + "name": "fonts", + "buildsystem": "simple", + "build-commands": [ + "mkdir -p /app/share/fonts/", + "cp ttf/* /app/share/fonts/" ], - "sources" : [ + "sources": [ { - "type" : "file", - "path" : "pip-download", - "dest-filename" : "configure" - } - ] - }, - { - "name" : "pypandoc", - "build-options" : { - "build-args" : [ - "--share=network" - ] - }, - "config-opts" : [ - "--module=pypandoc" - ], - "sources" : [ - { - "type" : "file", - "path" : "pandoc-download", - "dest-filename" : "configure" - } - ] - }, - { - "name" : "fonts", - "build-options" : { - "build-args" : [ - "--share=network" - ] - }, - "config-opts" : [ - "" - ], - "sources" : [ - { - "type" : "file", - "path" : "fonts-download", - "dest-filename" : "configure" + "type": "git", + "url": "https://github.com/mozilla/Fira", + "tag": "4.202" } ] }, @@ -154,6 +130,5 @@ } ] } - ] }