[gimp-web/testing] Adding support for flatpak in development download page.



commit 848610a1776e409e86e456595198e3e52be62ecf
Author: Jehan <jehan girinstud io>
Date:   Sun Apr 22 12:58:55 2018 +0200

    Adding support for flatpak in development download page.

 GIMP_VERSIONS                                      |    8 +++
 pelicanconf.local.py                               |   10 ++++
 pelicanconf.py                                     |   10 ++++
 pelicanconf.testing.py                             |   10 ++++
 .../newgimp/templates/downloads-development.html   |   54 +++++++++++++++++++-
 5 files changed, 90 insertions(+), 2 deletions(-)
---
diff --git a/GIMP_VERSIONS b/GIMP_VERSIONS
index 652ca33..ac11990 100644
--- a/GIMP_VERSIONS
+++ b/GIMP_VERSIONS
@@ -145,6 +145,14 @@
             },
             "windows": {
                 "gimp-2.10.0-RC2-x64-setup.exe": "6199bf303ef3f731d0da336e0afcb62b"
+                },
+            "flatpak": {
+                "i386": {
+                    "gimp-2.10.0-RC2-i386.flatpak": "d1d2fcffa4c6ed6575bb67133250796a"
+                    },
+                "x86_64": {
+                    "gimp-2.10.0-RC2-x86_64.flatpak": "ee30a0982b2956f6904bdd4b0f834aa8"
+                    }
                 }
         },
 
diff --git a/pelicanconf.local.py b/pelicanconf.local.py
index 44db8ab..b28f60b 100644
--- a/pelicanconf.local.py
+++ b/pelicanconf.local.py
@@ -203,6 +203,16 @@ if 'DEVELOPMENT' in GIMP:
                 MACOS_VER_DEVELOPMENT = version
                 MACOS_FILE_DEVELOPMENT = info['macos'].keys()[0]
                 MACOS_HASH_DEVELOPMENT = info['macos'].values()[0]
+        if 'flatpak' in info:
+            try:
+                FLATPAK_FILE_DEVELOPMENT
+            except NameError:
+                FLATPAK_VER_DEVELOPMENT = version
+                FLATPAK_FILE_DEVELOPMENT = {}
+                FLATPAK_HASH_DEVELOPMENT = {}
+                for arch, package in info['flatpak'].iteritems() :
+                    FLATPAK_FILE_DEVELOPMENT[arch] = package.keys()[0]
+                    FLATPAK_HASH_DEVELOPMENT[arch] = package.values()[0]
 else:
     print 'DEVELOPMENT not defined'
 
diff --git a/pelicanconf.py b/pelicanconf.py
index ce3031b..2eac107 100644
--- a/pelicanconf.py
+++ b/pelicanconf.py
@@ -190,6 +190,16 @@ if 'DEVELOPMENT' in GIMP:
                 MACOS_VER_DEVELOPMENT = version
                 MACOS_FILE_DEVELOPMENT = info['macos'].keys()[0]
                 MACOS_HASH_DEVELOPMENT = info['macos'].values()[0]
+        if 'flatpak' in info:
+            try:
+                FLATPAK_FILE_DEVELOPMENT
+            except NameError:
+                FLATPAK_VER_DEVELOPMENT = version
+                FLATPAK_FILE_DEVELOPMENT = {}
+                FLATPAK_HASH_DEVELOPMENT = {}
+                for arch, package in info['flatpak'].iteritems() :
+                    FLATPAK_FILE_DEVELOPMENT[arch] = package.keys()[0]
+                    FLATPAK_HASH_DEVELOPMENT[arch] = package.values()[0]
 else:
     print 'DEVELOPMENT not defined'
 
diff --git a/pelicanconf.testing.py b/pelicanconf.testing.py
index 9b40e4e..a7844dd 100644
--- a/pelicanconf.testing.py
+++ b/pelicanconf.testing.py
@@ -190,6 +190,16 @@ if 'DEVELOPMENT' in GIMP:
                 MACOS_VER_DEVELOPMENT = version
                 MACOS_FILE_DEVELOPMENT = info['macos'].keys()[0]
                 MACOS_HASH_DEVELOPMENT = info['macos'].values()[0]
+        if 'flatpak' in info:
+            try:
+                FLATPAK_FILE_DEVELOPMENT
+            except NameError:
+                FLATPAK_VER_DEVELOPMENT = version
+                FLATPAK_FILE_DEVELOPMENT = {}
+                FLATPAK_HASH_DEVELOPMENT = {}
+                for arch, package in info['flatpak'].iteritems() :
+                    FLATPAK_FILE_DEVELOPMENT[arch] = package.keys()[0]
+                    FLATPAK_HASH_DEVELOPMENT[arch] = package.values()[0]
 else:
     print 'DEVELOPMENT not defined'
 
diff --git a/themes/newgimp/templates/downloads-development.html 
b/themes/newgimp/templates/downloads-development.html
index 4a6c489..f775740 100644
--- a/themes/newgimp/templates/downloads-development.html
+++ b/themes/newgimp/templates/downloads-development.html
@@ -55,13 +55,63 @@
     <div id='linux' class="os linux" markdown='1'>
         <h2>GIMP (development version) for Unix-like systems</h2>
 
-        <p>It's very likely your Unix-like system such as a GNU/Linux distribution already comes with a GIMP 
package. It is a preferred method of installing GIMP, as the distribution maintainers take care of all the 
dependencies and bug fix updates. Please note that many distros decide to pin a specific version of GIMP to 
their releases.</p>
+{% if FLATPAK_FILE_DEVELOPMENT is defined %}
+
+        {% if FLATPAK_VER_DEVELOPMENT != GIMP_VERSION_DEVELOPMENT %}
+        <p>Note: the currently available flatpak bundle provides GIMP {{
+        FLATPAK_VER_DEVELOPMENT }} and has not yet updated to the latest
+        version, GIMP {{ GIMP_VERSION_DEVELOPMENT }}. We're working on
+        that, please check back later.</p>
+        {% endif %}
 
         <p>
-            GIMP can also run on Solaris and is available for the BSD family of systems such as FreeBSD and 
OpenBSD.
+            {% for arch, file in FLATPAK_FILE_DEVELOPMENT.iteritems() %}
+              <span class='win-button'>
+                  <a
+                  
href="//download.gimp.org/mirror/pub/gimp/v{{FLATPAK_VER_DEVELOPMENT.split('.')[0]}}.{{FLATPAK_VER_DEVELOPMENT.split('.')[1]}}/flatpak/{{file}}">
+                      Download GIMP&nbsp;{{ FLATPAK_VER_DEVELOPMENT }} for {{ arch }}<br/>
+                      directly
+                  </a>
+              </span>
+            {% endfor %}
+        </p>
+        <p>
+            {% for arch, hash in FLATPAK_HASH_DEVELOPMENT.iteritems() %}
+            <p>
+                The MD5 hash sum for <code>{{ FLATPAK_VER_DEVELOPMENT
+                }}</code> flatpak on <code>{{ arch }}</code> is:
+                <kbd>{{ hash }}</kbd>
+            </p>
+            {% endfor %}
+        </p>
+
+        <small>
+            <p>
+                The download links above will attempt to download GIMP from one of our trusted mirror 
servers.
+                If the mirrors do not work or you would rather download
+                directly from our server, you can get the <a
+                
href='//download.gimp.org/pub/gimp/v{{FLATPAK_VER_DEVELOPMENT.split('.')[0]}}.{{FLATPAK_VER_DEVELOPMENT.split('.')[1]}}/flatpak/'>direct
 download here</a>.
+            </p>
+        </small>
+
+        <h3>Native build</h3>
+
+        <p>The official GIMP {{ FLATPAK_VER_DEVELOPMENT }} flatpak
+        bundle (linked above) is a stock GIMP build without any add-ons.
+        It doesn't provide a repository for automatic update, as does
+        the stable version flatpak repository.
         </p>
 
+{% else %}
+
+        <p>There is no flatpak package yet, sorry. Please check back later.</p>
+
+{% endif %}
+
+        <p>It's very likely your Unix-like system such as a GNU/Linux distribution already comes with a GIMP 
package. It may be a preferred method of installing GIMP, as the distribution maintainers take care of all 
the dependencies and bug fix updates. Please note that many distros decide to pin a specific version of GIMP 
to their releases.</p>
+
         <p>
+            GIMP can also run on Solaris and is available for the BSD family of systems such as FreeBSD and 
OpenBSD.
             Please refer to the documentation for your Unix-like system on the installation of software.
         </p>
 


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