forked from flathub/org.goldendict.GoldenDict
-
Notifications
You must be signed in to change notification settings - Fork 0
/
org.goldendict.GoldenDict.yml
157 lines (150 loc) · 4.69 KB
/
org.goldendict.GoldenDict.yml
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
app-id: org.goldendict.GoldenDict
runtime: org.kde.Platform
runtime-version: 5.15-21.08
sdk: org.kde.Sdk
base-version: 5.15-21.08
command: goldendict
base: io.qt.qtwebkit.BaseApp
finish-args:
- --share=ipc
# GoldenDict use lots of X11 functions and it currently cannot work
# natively on Wayland.
- --socket=x11
- --device=dri # hardware acceleration
- --socket=pulseaudio # videos/audios
- --share=network
- --talk-name=org.freedesktop.Notifications
- --talk-name=org.kde.StatusNotifierWatcher
- --env=QT_AUTO_SCREEN_SCALE_FACTOR=1 # HiDPI
- --env=TMPDIR=/var/tmp
- --persist=.goldendict
- --talk-name=org.freedesktop.Flatpak # To execute translation programs
modules:
- name: translate-shell
sources:
- type: git
url: https://github.com/soimort/translate-shell.git
tag: v0.9.6.12
commit: 46e2a14fff1de5bb97d286e78fa2221b3a1eab37
x-checker-data:
type: anitya
project-id: 15342
tag-template: v$version
no-autogen: true
build-options:
make-install-args:
- PREFIX=${FLATPAK_DEST}
- name: opencc
buildsystem: cmake-ninja
build-options:
env:
CC: ccache gcc
CXX: ccache g++
sources:
- type: git
url: https://github.com/BYVoid/OpenCC.git
tag: ver.1.1.4
commit: 2ddaffd31f6f9cae776ec2faa4b88d5c45e0d4d6
x-checker-data:
type: anitya
project-id: 7230
tag-template: ver.$version
- name: lzo2
config-opts:
- --enable-shared
- --disable-static
cleanup:
- /include
- /share/doc
- '*.la'
- /lib/*.so
sources:
- type: archive
url: http://www.oberhumer.com/opensource/lzo/download/lzo-2.10.tar.gz
sha256: c0f892943208266f9b6543b3ae308fab6284c5c90e627931446fb49b4221a072
x-checker-data:
type: anitya
project-id: 1868
url-template: http://www.oberhumer.com/opensource/lzo/download/lzo-$version.tar.gz
- name: eb
config-opts:
- --enable-shared
- --disable-static
cleanup:
- /bin
- /share/doc
sources:
- type: git
url: https://salsa.debian.org/debian/eb.git
tag: debian/4.4.3-14
x-checker-data:
type: anitya
project-id: 155542
tag-template: debian/$version
commit: 58570b89141bd19684544b41efc94a3586adf0b9
- type: shell
commands:
- cp -p /usr/share/automake-*/config.{sub,guess} .
- name: zstd
buildsystem: cmake
subdir: build/cmake
config-opts:
- -DZSTD_BUILD_PROGRAMS=OFF
sources:
- type: git
url: https://github.com/facebook/zstd.git
tag: v1.5.2
x-checker-data:
type: anitya
project-id: 12083
tag-template: v$version
commit: e47e674cd09583ff0503f0f6defd6d23d8b718d3
- name: libao
cleanup:
- /include
- '*.la'
- /lib/pkgconfig
- /lib/ckport
- /share
sources:
- type: archive
url: https://downloads.xiph.org/releases/ao/libao-1.2.0.tar.gz
sha256: 03ad231ad1f9d64b52474392d63c31197b0bc7bd416e58b1c10a329a5ed89caf
x-checker-data:
type: anitya
project-id: 7629
url-template: https://downloads.xiph.org/releases/ao/libao-$version.tar.gz
- name: goldendict
buildsystem: qmake
build-options:
env:
QMAKEPATH: /app/lib
LD_LIBRARY_PATH: ${LD_LIBRARY_PATH}:/app/lib/:/usr/lib
config-opts:
- DEFINES+=USE_DBUS
- INCLUDEPATH+="${FLATPAK_DEST}/include/QtWebKitWidgets"
- INCLUDEPATH+="${FLATPAK_DEST}/include/QtWebKit"
- CONFIG+=release
build-commands:
- install -Dm644 redist/icons/goldendict.png ${FLATPAK_DEST}/share/icons/hicolor/256x256/apps/${FLATPAK_ID}.png
sources:
- type: git
url: https://github.com/goldendict/goldendict
# The upstream doesn't provide a stable branch
branch: master
commit: 10d0d8193b60b8ac5f06973742fdd0fbb1de6a2d
- type: shell
commands:
# Put the version to the metadata
- export VERSION="1.5.0RC2 ($(git rev-parse --short HEAD))" # The same version as the upstream
- appstream-util modify redist/org.goldendict.GoldenDict.metainfo.xml releases
"<release version=\"${VERSION} \" date=\"`date --iso-8601`\"/>"
- sed -i -e "s,<releases><,<releases><," -e "s,></releases>,></releases>,"
redist/org.goldendict.GoldenDict.metainfo.xml
- type: patch
path: icon-rename.patch
# Add translate-shell to enable Google Translate by default
- type: patch
path: add-translate-shell.patch
cleanup:
- /share/pixmaps