Experimental Snap package

This commit is contained in:
jeffser 2024-09-12 11:40:23 -06:00
parent 295429acdf
commit 08c0074ae5

73
snap/snapcraft.yaml Normal file
View File

@ -0,0 +1,73 @@
name: alpaca
base: core24
version: '1.0'
summary: Alpaca Application
description: |
Alpaca is an app by Jeffser with various features such as PDF processing, downloading with Pytube, and more.
confinement: strict
grade: stable
apps:
alpaca:
command: usr/local/bin/alpaca
plugs:
- network
- network-bind
- wayland
- opengl
- home
- raw-usb
- system-observe
parts:
# Python dependencies
python-packages:
plugin: python
source: .
python-packages:
- requests==2.31.0
- pillow==10.3.0
- pypdf==4.2.0
- pytube==15.0.0
- html2text==2024.2.26
build-packages:
- python3-dev
- python3-pip
# Ollama plugin
ollama:
plugin: dump
source: https://github.com/ollama/ollama/releases/download/v0.3.9/ollama-linux-amd64.tgz
stage: [bin, lib]
# libnuma build from source
libnuma:
plugin: autotools
source: https://github.com/numactl/numactl/releases/download/v2.0.18/numactl-2.0.18.tar.gz
build-packages:
- autoconf
- make
# Alpaca app
alpaca:
plugin: meson
source: https://github.com/Jeffser/Alpaca/archive/refs/tags/2.0.1.tar.gz
build-packages:
- meson
- ninja-build
- pkg-config
- libcairo2-dev
- libgtk-3-dev
- libglib2.0-dev
- gettext
- desktop-file-utils
- appstream
override-build: snapcraftctl build; chmod +x ${CRAFT_PART_INSTALL}/usr/local/bin/alpaca
layout:
/usr/lib/x86_64-linux-gnu/GL/default/lib:
bind: $SNAP/usr/lib/x86_64-linux-gnu/GL/default/lib
environment:
LD_LIBRARY_PATH: "$SNAP/usr/lib/x86_64-linux-gnu/GL/default/lib:$SNAP/usr/lib/x86_64-linux-gnu/openh264/extra:/app/plugins/AMD/lib/ollama:$LD_LIBRARY_PATH"