summaryrefslogtreecommitdiff
path: root/snap/snapcraft.yaml
blob: db69982c46778523c9a90f45d2376b101d53e094 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Configuration file for YaCy Snap packaging with Snapcraft (see https://snapcraft.io/)
name: yacy-search
version: '1.921'
summary: YaCy peer-to-peer search engine and intranet search appliance
description: |
  YaCy is a decentralized search engine software.
  Its search results come from a network of independent peers, 
  where no single entity decides what gets listed, or in which order results appear.
  YaCy nodes can also be placed in intranet environment 
  which makes YaCy a replacement for commercial enterprise search solutions. 

grade: stable
confinement: strict
icon: addon/YaCy256x256.png

apps:
  yacy-search:
    command: sh "$SNAP/yacy/addon/snap/snapStartYACY.sh"
    # Interfaces authorizations requirements
    # network-bind - to allow acting as an HTTP server and client
    # desktop - to launch the default desktop navigator when starting (with xdg-open command) - not strictly necessary
    # home - not strictly necessary but can be convenient for some features to have read/write access to files outside the snap data folders, notably
    #  - to index files in Intranet mode
    #  - for index, dump, vocabulary import/export features
    plugs: [network-bind, desktop, home]
  passwd: # set the YaCy administrator password
    command: sh "$SNAP/yacy/addon/snap/snapPasswd.sh"
    # Interfaces authorizations requirements
    # network - to allow requesting the ConfigAccounts_p HTTP API when the server is running
    plugs: [network]
  stop: # stop the YaCy server
    command: sh "$SNAP/yacy/addon/snap/snapStopYACY.sh"
    # Interfaces authorizations requirements
    # network - to allow requesting the Steering.html API
    plugs: [network]

parts:
  yacy-search:
    # Additional packages
    # curl : needed by the passwd.sh script to call a YaCy API when the server is running
    stage-packages: [curl]
    plugin: ant
    ant-build-targets: 
      - clean
      - dist
    source: https://github.com/yacy/yacy_search_server.git
    build-packages:
      - openjdk-17-jdk
    override-build: |
      snapcraftctl build
      tar -xzf RELEASE/yacy*.tar.gz -C "$SNAPCRAFT_PART_INSTALL/"