diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml new file mode 100644 index 0000000..8a4f327 --- /dev/null +++ b/snap/snapcraft.yaml @@ -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"