summaryrefslogtreecommitdiff
path: root/snap/snapcraft.yaml
blob: 5e5bf7b266df44201bfa885eeed803822a8b357e (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
name: hurrycurry
base: core24
version: "2.0.0"
summary: Multiplayer co-op cooking game
license: AGPL-3.0-only
website: https://hurrycurry.metamuffin.org/
issues: https://codeberg.org/hurrycurry/hurrycurry/issues
source-code: https://codeberg.org/hurrycurry/hurrycurry
title: Hurry Curry!
description: |
    Hurry Curry! is a multiplayer game about cooking. Your goal is to run
    a restaurant and gain points by serving meals you've cooked.
    The game is completely free software, licenced AGPL 3.0 only.

grade: devel
confinement: strict

layout:
    /usr/share/libdrm:
        bind: $SNAP/usr/share/libdrm

apps:
    server:
        command: bin/hurrycurry-server --data-dir $SNAP/usr/share/hurrycurry/data
        plugs:
            - network
            - network-bind
    hurrycurry:
        extensions: [gnome]
        command: bin/client-wrapper.sh
        plugs:
            - audio-playback
            - desktop
            - desktop-legacy
            - joystick
            - network
            - opengl
            - pulseaudio
            - screen-inhibit-control
            - wayland
            - x11

parts:
    # godot-build-profile:
    #     plugin: dump
    #     source: .
    #     source-type: local
    #     organize: { "snap/godot_profile.py": godot_profile.py }

    # godot:
    #     plugin: nil
    #     after: [godot-build-profile]
    #     source: https://github.com/godotengine/godot/releases/download/4.3-stable/godot-4.3-stable.tar.xz
    #     build-packages:
    #         - build-essential
    #         - libasound2-dev
    #         # - libfreetype-dev
    #         - libgl1-mesa-dev
    #         - libglu1-mesa-dev
    #         # - libharfbuzz-dev
    #         # - libogg-dev
    #         - libpulse-dev
    #         # - libtheora-dev
    #         - libudev-dev
    #         # - libvorbis-dev
    #         # - libvpx-dev
    #         # - libwebp-dev
    #         - libx11-dev
    #         - libxcursor-dev
    #         - libxi-dev
    #         - libxinerama-dev
    #         - libxrandr-dev
    #         # - libgraphite2-dev
    #         # - zlib1g-dev
    #         - pkg-config
    #         - scons
    #     override-build: |
    #         scons profile=$CRAFT_STAGE/godot_profile.py target=editor
    #         scons profile=$CRAFT_STAGE/godot_profile.py target=template_release
    #     organize:
    #         "bin/godot.linuxbsd.template_release.*": bin/godot
    #         "bin/godot.linuxbsd.editor.*": bin/godot-editor
    #     prime: [bin/godot]

    godot-editor:
        plugin: dump
        source: https://github.com/godotengine/godot/releases/download/4.3-stable/Godot_v4.3-stable_linux.x86_64.zip
        organize: { "Godot_*": bin/godot-editor }

    godot:
        plugin: dump
        source: https://github.com/godotengine/godot/releases/download/4.3-stable/Godot_v4.3-stable_linux.x86_64.zip
        organize: { "Godot*": bin/godot }
        prime: [bin/godot]

    godot-runtime-libs:
        plugin: nil
        stage-packages:
            - libpulse0
            - libudev1
            - libx11-6
            - libxcursor1
            - libxi6
            - libxkbcommon0
            - libxinerama1
            - libxrandr2
            - libgl1-mesa-dri
            - libfontconfig1
            - libwayland-client0
            - libwayland-cursor0

    metainfo:
        plugin: dump
        source: https://codeberg.org/hurrycurry/hurrycurry-dist-extra.git
        source-tag: v2.0.0
        parse-info: [org.godotengine.Godot.metainfo.xml]
        organize:
            "org.metamuffin.hurrycurry.client.desktop": "meta/gui/org.metamuffin.hurrycurry.client.desktop"
        prime: [meta/gui/org.metamuffin.hurrycurry.client.desktop]

    client:
        plugin: nil
        after: [godot-editor]
        source: https://codeberg.org/hurrycurry/hurrycurry.git
        stage-packages:
            - libglu1-mesa
        build-packages: [rustup]
        override-build: |
            make client
            GODOT_SILENCE_ROOT_WARNING=true $CRAFT_STAGE/bin/godot-editor --headless --export-pack wasm32-unknown-unknown $CRAFT_PART_INSTALL/client.pck client/project.godot
        organize: { "client.pck": usr/share/hurrycurry/client.pck }
        prime: [usr/share/hurrycurry/client.pck]

    client-wrapper:
        plugin: dump
        source: .
        source-type: local
        override-build: |
            mkdir -p $CRAFT_PART_INSTALL/bin
            install -m755 snap/client-wrapper.sh $CRAFT_PART_INSTALL/bin
        stage: [bin/client-wrapper.sh]
        prime: [bin/client-wrapper.sh]

    server:
        plugin: rust
        source: https://codeberg.org/hurrycurry/hurrycurry.git
        source-tag: v2.0.0
        rust-path: [server]

    data:
        plugin: dump
        source: https://codeberg.org/hurrycurry/hurrycurry.git
        source-tag: v2.0.0
        build-packages: [rustup]
        build-snaps: [deno]
        override-build: |
            make data
            mkdir -p $CRAFT_PART_INSTALL/data/{maps,recipes}
            cp -v data/index.yaml $CRAFT_PART_INSTALL/data/index.yaml
            cp -vr data/recipes/*.yaml $CRAFT_PART_INSTALL/data/recipes
            cp -vr data/maps/*.yaml $CRAFT_PART_INSTALL/data/maps
        organize: { "data": usr/share/hurrycurry/data }
        prime: [usr/share/hurrycurry/data]