summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorEdward Hope-Morley <edward.hope-morley@canonical.com>2018-12-11 17:54:45 (GMT)
committerEdward Hope-Morley <edward.hope-morley@canonical.com>2018-12-12 17:16:01 (GMT)
commitbd5869a5aa40e1fb17213ad6f8156d7de923e20a (patch)
tree5d5583d8b64737be8067eb9ae3cb6d6a78c23e18 /contrib
parent16400fb79017b1b2dd86a4a864f65930fe8586a2 (diff)
downloadlz4-bd5869a5aa40e1fb17213ad6f8156d7de923e20a.zip
lz4-bd5869a5aa40e1fb17213ad6f8156d7de923e20a.tar.gz
lz4-bd5869a5aa40e1fb17213ad6f8156d7de923e20a.tar.bz2
Add snap packaging support
This commit adds a snapcraft.yaml file to allow lz4 to be distributed as a snap (see https://snapcraft.io/ for more info on snaps). Building the Snap ----------------- To build the snap simply install snapcraft and build the snap e.g. on Ubuntu by doing: $ sudo apt install snapcraft $ cd contrib; snapcraft This will build a snap that can be published [1] to e.g. https://snapcraft.io/lz4 If you want to test the snap before publishing you can do: $ snap install <snapname>.snap --dangerous And that will install it on your local host. You will then have lz4 as a command to run. Installing the Snap ------------------- Once published and released in the snapstore your snap can be installed on any platform that supports snaps by doing: snap install lz4 [1] https://docs.snapcraft.io/releasing-to-the-snap-store
Diffstat (limited to 'contrib')
-rw-r--r--contrib/snap/README.md29
-rw-r--r--contrib/snap/snapcraft.yaml31
2 files changed, 60 insertions, 0 deletions
diff --git a/contrib/snap/README.md b/contrib/snap/README.md
new file mode 100644
index 0000000..612d6d7
--- /dev/null
+++ b/contrib/snap/README.md
@@ -0,0 +1,29 @@
+Snap Packaging
+--------------
+
+This directory contains the config required to generate a snap package
+of lz4. Snaps are universal Linux packages that allow you to easily
+build your application from any source and ship it to any Linux
+distribution by publishing it to https://snapcraft.io/. A key attribute
+of a snap package is that it is (ideally) confined such that it
+executes within a controlled environmenti with all its dependencies
+bundled with it and does not share dependencies with of from any other
+package on the system (with a couple of minor exceptions).
+
+The basic anatomy and workflow is:
+
+ * ensure snap.snapcraft.yaml is up-to-date e.g. with version info
+
+ * build the snap by installing the snapcraft package and running it
+
+ * push snap/* changes to the repo (excluding any crud generated by a build of course)
+
+ * register yourself as owner of lz4 name in snapstore
+
+ * publish new snap to the snap store
+
+ * install snap by doing 'snap install lz4' on any Linux distro
+
+ * all installed copies of lz4 will be automatically updated to your new version
+
+For more information on Snaps see https://docs.snapcraft.io and https://forum.snapcraft.io/
diff --git a/contrib/snap/snapcraft.yaml b/contrib/snap/snapcraft.yaml
new file mode 100644
index 0000000..2793c0e
--- /dev/null
+++ b/contrib/snap/snapcraft.yaml
@@ -0,0 +1,31 @@
+name: lz4
+version: 1.8.4
+summary: Extremely Fast Compression algorithm
+description: >
+ LZ4 is lossless compression algorithm, providing compression
+ speed > 500 MB/s per core, scalable with multi-cores CPU. It features an
+ extremely fast decoder, with speed in multiple GB/s per core, typically
+ reaching RAM speed limits on multi-core systems.
+ .
+ Speed can be tuned dynamically, selecting an "acceleration" factor which
+ trades compression ratio for faster speed. On the other end, a high
+ compression derivative, LZ4_HC, is also provided, trading CPU time for
+ improved compression ratio. All versions feature the same decompression
+ speed.
+ .
+ LZ4 is also compatible with dictionary compression, and can ingest any
+ input file as dictionary, including those created by Zstandard Dictionary
+ Builder. (note: only the final 64KB are used).
+ .
+ LZ4 library is provided as open-source software using BSD 2-Clause license.
+confinement: strict
+grade: stable
+
+apps:
+ lz4:
+ command: usr/local/bin/lz4
+ plugs: [home]
+parts:
+ lz4:
+ source: ../
+ plugin: make