Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-07-24 19:45:20 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-07-26 18:34:45 +0300
commit79ce2054d4362f39cd4083992098b7378861a4c8 (patch)
tree89ea5b04a63d4c97d00f7a021ea3d09786329972 /release/freedesktop/snap
parentd25386b8a7c9e78d9531992b965174f154c14590 (diff)
Linux: add script and instructions for creating snap packages
We will now maintain the Blender package on snapcraft.io/blender. Differential Revision: https://developer.blender.org/D5342
Diffstat (limited to 'release/freedesktop/snap')
-rw-r--r--release/freedesktop/snap/README.txt38
-rwxr-xr-xrelease/freedesktop/snap/bundle.py21
-rw-r--r--release/freedesktop/snap/snapcraft.yaml.in48
3 files changed, 107 insertions, 0 deletions
diff --git a/release/freedesktop/snap/README.txt b/release/freedesktop/snap/README.txt
new file mode 100644
index 00000000000..2e8822f32dc
--- /dev/null
+++ b/release/freedesktop/snap/README.txt
@@ -0,0 +1,38 @@
+
+Snap Package Instructions
+=========================
+
+This folder contains the scripts for creating and uploading the snap on:
+https://snapcraft.io/blender
+
+
+Setup
+-----
+
+This has only been tested to work on Ubuntu.
+
+# Install required packages
+sudo apt install snapd snapcraft
+
+
+Steps
+-----
+
+# Build the snap file
+python3 bundle.py --version 2.XX --url https://download.blender.org/release/Blender2.XX/blender-2.XX-x86_64.tar.bz2
+
+# Install snap to test
+# --dangerous is needed since the snap has not been signed yet
+# --classic is required for installing Blender in general
+sudo snap install --dangerous --classic blender_2.XX_amd64.snap
+
+# Upload
+snapcraft push --release=stable blender_2.XX_amd64.snap
+
+
+Release Values
+--------------
+
+stable: final release
+candidate: release candidates
+
diff --git a/release/freedesktop/snap/bundle.py b/release/freedesktop/snap/bundle.py
new file mode 100755
index 00000000000..c3ecc5af561
--- /dev/null
+++ b/release/freedesktop/snap/bundle.py
@@ -0,0 +1,21 @@
+#!/usr/bin/env python3
+
+import argparse
+import os
+import pathlib
+import subprocess
+
+parser = argparse.ArgumentParser()
+parser.add_argument("--version", required=True)
+parser.add_argument("--url", required=True)
+parser.add_argument("--grade", default="stable", choices=["stable", "devel"])
+args = parser.parse_args()
+
+yaml_text = pathlib.Path("snapcraft.yaml.in").read_text()
+yaml_text = yaml_text.replace("@VERSION@", args.version)
+yaml_text = yaml_text.replace("@URL@", args.url)
+yaml_text = yaml_text.replace("@GRADE@", args.grade)
+pathlib.Path("snapcraft.yaml").write_text(yaml_text)
+
+subprocess.call(["snapcraft", "clean"])
+subprocess.call(["snapcraft", "snap"])
diff --git a/release/freedesktop/snap/snapcraft.yaml.in b/release/freedesktop/snap/snapcraft.yaml.in
new file mode 100644
index 00000000000..12fff16d528
--- /dev/null
+++ b/release/freedesktop/snap/snapcraft.yaml.in
@@ -0,0 +1,48 @@
+name: blender
+summary: Blender is the free and open source 3D creation suite.
+description: |
+ Blender is the free and open source 3D creation suite. It supports the
+ entirety of the 3D pipeline—modeling, rigging, animation, simulation,
+ rendering, compositing and motion tracking, and video editing.
+
+ Blender is a public project, made by hundreds of people from around the
+ world; by studios and individual artists, professionals and hobbyists,
+ scientists, students, VFX experts, animators, game artists, modders, and
+ the list goes on.
+
+ The standard snap channels are used in the following way:
+
+ stable - Latest stable release.
+ candidate - Test builds for the upcoming stable release.
+
+icon: ../icons/scalable/apps/blender.svg
+
+passthrough:
+ license: GPL-3.0
+
+confinement: classic
+
+apps:
+ blender:
+ command: ./blender
+ desktop: ./blender.desktop
+
+version: @VERSION@
+grade: @GRADE@
+
+parts:
+ blender:
+ plugin: dump
+ source: @URL@
+ build-attributes: [keep-execstack, no-patchelf]
+ override-build: |
+ snapcraftctl build
+ sed -i 's|Icon=blender|Icon=${SNAP}/blender.svg|' ${SNAPCRAFT_PART_INSTALL}/blender.desktop
+ stage-packages:
+ - libxcb1
+ - libxext6
+ - libx11-6
+ - libxi6
+ - libxfixes3
+ - libxrender1
+ - libxxf86vm1