forked from mirkobrombin/Twitz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AppImageBuilder.yml
143 lines (131 loc) · 4.55 KB
/
AppImageBuilder.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
version: 1
script:
# Remove any previous build
- rm -rf AppDir | true && rm -rf build | true
# Fix python interpreter
- sed -i -e 's|@PYTHON@|/usr/bin/python3|g' src/twitz.in
# Building with meson and ninja
- mkdir build && meson build --prefix=/usr/bin/
- cd build && ninja && ninja twitz-pot && ninja twitz-update-po
# Preparing directories
- cd .. && mkdir -p AppDir/usr AppDir/usr/local/share/twitz AppDir/usr/bin AppDir/usr/share/glib-2.0/schemas AppDir/usr/share/applications AppDir/usr/share/metainfo AppDir/usr/share/icons
# Compiling and installing glib-resources
- glib-compile-resources --sourcedir=src/ src/twitz.gresource.xml --target=AppDir/usr/local/share/twitz/twitz.gresource
# Copying twitz binary
- cp build/src/twitz AppDir/usr/bin/
# Copying twitz python package and remove not useful files"
- cp -a src AppDir/usr/local/share/twitz/twitz
- rm AppDir/usr/local/share/twitz/twitz/twitz.in
- rm AppDir/usr/local/share/twitz/twitz/meson.build
# Compiling and installing translations
- cat po/LINGUAS | while read lang
- do
- mkdir -p AppDir/usr/share/locale/$lang/LC_MESSAGES
- msgfmt -o AppDir/usr/share/locale/$lang/LC_MESSAGES/twitz.mo po/$lang.po
- done
# Copying icons
- mkdir -p AppDir/usr/share/icons/hicolor/scalable/apps/
- cp data/pm.mirko.Twitz.svg AppDir/usr/share/icons/hicolor/scalable/apps/
- cp data/pm.mirko.Twitz-symbolic.svg AppDir/usr/share/icons/hicolor/scalable/apps/
# Copying Desktop file
- cp build/data/pm.mirko.Twitz.desktop AppDir/usr/share/applications/
# Copying and compiling gschema
- cp data/pm.mirko.Twitz.gschema.xml AppDir/usr/share/glib-2.0/schemas/pm.mirko.Twitz.gschema.xml
- glib-compile-schemas AppDir/usr/share/glib-2.0/schemas/
# Copying appdata
- cp -a data/pm.mirko.Twitz.appdata.xml.in AppDir/usr/share/metainfo/pm.mirko.Twitz.appdata.xml
AppDir:
path: ./AppDir
app_info:
id: pm.mirko.Twitz
name: Twitz
icon: pm.mirko.Twitz
version: 1.1.0
exec: usr/bin/python3
exec_args: "$APPDIR/usr/bin/twitz $@"
apt:
arch: amd64
sources:
- sourceline: 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ hirsute main restricted universe multiverse'
- sourceline: 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ hirsute-updates main restricted universe multiverse'
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x871920D1991BC93C'
include:
- dconf-gsettings-backend
- libbz2-1.0
- libcanberra-gtk3-module
- libcanberra-pulse
- libexpat1
- libgcc-s1
- libgpg-error0
- libpcre3
- libprocps8
- libpython3.9-stdlib
- librsvg2-common
- libselinux1
- libwebkit2gtk-4.0
- webkit2gtk-driver
- python3-gi
- python3-gi-cairo
- youtube-dl
- python3-opengl
- python3-mpv
- gir1.2-gtk-3.0
- gir1.2-handy-1
- gir1.2-notify-0.7
- gir1.2-webkit2-4.0
- libnotify4
- libgstreamer1.0-0
- gstreamer1.0-plugins-base
- gstreamer1.0-plugins-good
- gstreamer1.0-libav
- gstreamer1.0-alsa
- gstreamer1.0-pulseaudio
exclude:
- adwaita-icon-theme
- humanity-icon-theme
after_runtime: |
rm -f $APPDIR/.bundle.yml
rm -rf $APPDIR/usr/share/doc
rm -rf $APPDIR/usr/share/man
files:
include: []
exclude:
- AppDir/usr/lib/x86_64-linux-gnu/gconv
- AppDir/usr/share/man
- AppDir/usr/share/doc/*/README.*
- AppDir/usr/share/doc/*/changelog.*
- AppDir/usr/share/doc/*/NEWS.*
- AppDir/usr/share/doc/*/TODO.*
runtime:
path_mappings:
- /usr/lib/x86_64-linux-gnu/webkit2gtk-4.0:$APPDIR/usr/lib/x86_64-linux-gnu/webkit2gtk-4.0
env:
LD_LIBRARY_PATH: '$(APPDIR)/usr/lib/x86_64-linux-gnu/webkit2gtk-4.0:$(LD_LIBRARY_PATH)'
PYTHONHOME: '${APPDIR}/usr'
PYTHONPATH: '${APPDIR}/usr/lib/python3/dist-packages'
SSL_CERT_FILE: "$APPDIR/usr/lib/python3/dist-packages/certifi/cacert.pem"
test:
fedora:
image: appimagecrafters/tests-env:fedora-30
command: ./AppRun
use_host_x: true
debian:
image: appimagecrafters/tests-env:debian-stable
command: ./AppRun
use_host_x: true
arch:
image: appimagecrafters/tests-env:archlinux-latest
command: ./AppRun
use_host_x: true
centos:
image: appimagecrafters/tests-env:centos-7
command: ./AppRun
use_host_x: true
ubuntu:
image: appimagecrafters/tests-env:ubuntu-xenial
command: ./AppRun
use_host_x: true
AppImage:
update-information: 'gh-releases-zsync|AppImage-*x86_64.AppImage.zsync'
sign-key: None
arch: x86_64