]> prime8.dev >> repos - ttyd.git/commitdiff
Snap created and ready for publication (#1003)
authorkz6fittycent <jimmy.tigert@gmail.com>
Tue, 18 Oct 2022 15:46:02 +0000 (10:46 -0500)
committerGitHub <noreply@github.com>
Tue, 18 Oct 2022 15:46:02 +0000 (23:46 +0800)
README.md
snap/snapcraft.yaml [new file with mode: 0644]

index 9c87639e82bfcc854da7d422f7bc1a9638e2ba14..4d766e66e944235067a58f8bcd2d58ede7e65dee 100644 (file)
--- a/README.md
+++ b/README.md
@@ -31,6 +31,12 @@ brew install ttyd
 ## Install on Linux
 
 - Binary version (recommended): download from the [releases](https://github.com/tsl0922/ttyd/releases) page.
+
+- Install the snap:
+    
+    `sudo snap install ttyd --classic`
+    
+    
 - Build from source (debian/ubuntu):
 
     ```bash
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
new file mode 100644 (file)
index 0000000..64027af
--- /dev/null
@@ -0,0 +1,50 @@
+name: ttyd
+adopt-info: ttyd
+summary: Share your terminal over the web
+description: |
+ ttyd is a simple command-line tool for sharing terminal over the web
+
+grade: stable
+confinement: classic
+base: core20
+compression: lzo
+
+license: MIT
+
+assumes:
+  - command-chain
+
+apps:
+  ttyd:
+    command: usr/bin/ttyd
+    command-chain: 
+      - bin/homeishome-launch       
+
+parts:
+  ttyd:
+    source: https://github.com/tsl0922/ttyd
+    source-type: git
+    plugin: cmake
+    cmake-parameters:
+      - -DCMAKE_INSTALL_PREFIX=/usr
+    build-environment:
+      - LDFLAGS: "-pthread"
+      
+    override-pull: |
+      snapcraftctl pull
+      snapcraftctl set-version "$(git describe --tags | sed 's/^v//' | cut -d "-" -f1)"
+      
+    build-packages:
+      - build-essential 
+      - libjson-c-dev 
+      - libwebsockets-dev
+      
+    stage-packages:
+      - build-essential 
+      - libjson-c-dev 
+      - libwebsockets-dev
+      
+  homeishome-launch:
+    plugin: nil
+    stage-snaps:
+      - homeishome-launch