forked from flathub/net.longturn.freeciv21
-
Notifications
You must be signed in to change notification settings - Fork 0
/
net.longturn.freeciv21.yaml
95 lines (88 loc) · 4.36 KB
/
net.longturn.freeciv21.yaml
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
##########
# Freeciv21 - net.longturn.freeciv21.yaml
#
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: James Robertson <[email protected]>
#
# Build Steps:
# - (once) sudo apt install flatpak-builder
# - (once) sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
# - (once) git submodules init
# - (once) git pull --recursive-submodules
# - git submodule update --recursive --remote
# - flatpak-builder --install-deps-from=flathub --force-clean build/flatpak net.longturn.freeciv21.yaml
# - flatpak-builder --user --install --force-clean build/flatpak net.longturn.freeciv21.yaml
# - flatpak run net.longturn.freeciv21
# - flatpak remove net.longturn.freeciv21
#
##########
app-id: net.longturn.freeciv21
# See https://invent.kde.org/packaging/flatpak-kde-runtime for versions of the runtime
runtime: org.kde.Platform
runtime-version: '5.15-23.08'
sdk: org.kde.Sdk
finish-args:
- --socket=wayland
- --socket=fallback-x11
- --share=ipc
- --share=network
- --socket=pulseaudio
- --filesystem=home
- --persist=.local/share/freeciv21
- --persist=.config/freeciv21
rename-desktop-file: net.longturn.freeciv21.client.desktop
rename-appdata-file: net.longturn.freeciv21.client.metainfo.xml
command: freeciv21-client
modules:
# Use Lua 5.3 shared-module as a dependency not included in the runtime.
- shared-modules/lua5.3/lua-5.3.5.json
# Get Libertunus font as a dependency.
- name: Libertinus
sources:
- type: archive
url: https://github.com/alerque/libertinus/releases/download/v7.040/Libertinus-7.040.zip
sha256: 2cce08507441d8ae7b835cfe51fb643ad5d9f6b44db4360c4e244f0e474a72f6
dest: fonts/Libertinus
buildsystem: simple
build-commands:
- mkdir -p ${FLATPAK_DEST}/share/freeciv21/fonts/Libertinus/static/OTF
- cp -v fonts/Libertinus/static/OTF/*.otf ${FLATPAK_DEST}/share/freeciv21/fonts/Libertinus/static/OTF
# Now build and package freeciv21
- name: freeciv21
buildsystem: cmake-ninja
config-opts:
- -DCMAKE_BUILD_TYPE=Release
- -DFREECIV_DOWNLOAD_FONTS=OFF
cleanup:
- /include
- /lib
post-install:
# Install our 128x128 icons. TODO: Need a unique icon for the ruleset editor (ruledit)
- install -D freeciv21-client.png ${FLATPAK_DEST}/share/icons/hicolor/128x128/apps/${FLATPAK_ID}.png
- install freeciv21-server.png ${FLATPAK_DEST}/share/icons/hicolor/128x128/apps/${FLATPAK_ID}.server.png
- install freeciv21-modpack.png ${FLATPAK_DEST}/share/icons/hicolor/128x128/apps/${FLATPAK_ID}.modpack.png
# Modify the desktop files with the icons.
- desktop-file-edit --set-icon=${FLATPAK_ID} ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.client.desktop
- desktop-file-edit --set-icon=${FLATPAK_ID}.server ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.server.desktop
- desktop-file-edit --set-icon=${FLATPAK_ID}.modpack ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.modpack-qt.desktop
- desktop-file-edit --set-icon=${FLATPAK_ID} ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.ruledit.desktop
# Update and patch our stable appsream file to support Flathub's requirements.
- appstream-util modify ${FLATPAK_DEST}/share/metainfo/${FLATPAK_ID}.client.metainfo.xml id ${FLATPAK_ID}
- appstream-util modify ${FLATPAK_DEST}/share/metainfo/${FLATPAK_ID}.client.metainfo.xml name "Freeciv21"
- appstream-util modify ${FLATPAK_DEST}/share/metainfo/${FLATPAK_ID}.client.metainfo.xml summary "Develop Your Civilization from Humble Roots to a Global Empire"
sources:
- type: git
commit: 6e5abce10b2f0b86883f2e2479597a8296ecba2f
url: https://github.com/longturn/freeciv21
- type: file
url: https://raw.githubusercontent.com/longturn/freeciv21/v3.0/data/icons/128x128/freeciv21-client.png
sha256: 33afb053fbbf78697519a9228da4230562394286c9dc29d335d4d6372276b400
- type: file
url: https://raw.githubusercontent.com/longturn/freeciv21/v3.0/data/icons/128x128/freeciv21-server.png
sha256: 05352cc0c00746ba79542103f0d71dc17368da24f2ebed3979ddadc199b930ba
- type: file
url: https://raw.githubusercontent.com/longturn/freeciv21/v3.0/data/icons/128x128/freeciv21-modpack.png
sha256: 72b785e553c79a5422df121f7531cc9fe974a484e374bcf2432af5b4766d7d88
##########
# END net.longturn.freeciv21.yaml
##########