-
Notifications
You must be signed in to change notification settings - Fork 0
/
mtPaint.yaml
108 lines (108 loc) · 3.21 KB
/
mtPaint.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
96
97
98
99
100
101
102
103
104
105
106
107
108
name: mtPaint
config-opts:
- cflags
- asneeded
- intl
- man
- thread
- gtk2
- GIF
- tiff
- jpeg
- jp2v2
- imagick
- lcms2
build-options:
cflags: -fPIC
cxxflags: -fPIC
sources:
# Source0
# Upstream stopped doing releases...
- type: git
url: https://github.com/wjaguar/mtPaint.git
#branch: master
commit: 3884b6d6ebc18511df7bf1485a19fe774dd61dcf
# Source1
# handbook
- type: git
url: https://github.com/wjaguar/mtpaint_handbook.git
#branch: master
commit: b0505e8b28bce7d536296479d2b048bfe1b689cb
dest: handbook
# Source2
# Hi-res icon from mate-icon-theme-faenza
# GPL2
- type: file
path: mtpaint.svg
# Source3
# icon license
- type: file
path: icon-COPYING
# Source4
- type: file
path: open-editor
# Source5
- type: file
path: open-terminal
# Source6
- type: file
path: open-viewer
# Source7
- type: file
path: mtpaint.appdata.xml
# Patch0
# https://libpng.sourceforge.io/ANNOUNCE-1.4.0.txt
# The function png_set_gray_1_2_4_to_8() was removed. It has been
# deprecated since libpng-1.0.18 and 1.2.9, when it was replaced with
# png_set_expand_gray_1_2_4_to_8() because the former function also
# expanded palette images.
- type: patch
path: mtpaint-3.31-png.patch
# Patch1
- type: patch
path: mtpaint-3.40-strip.patch
# Patch2
- type: patch
path: mtpaint-3.49.13-include-locale.patch
# Patch3
# Fix doc path
- type: patch
path: mtpaint-3.49.13-spawn-doc.patch
# Patch4
# Fix external commands
- type: patch
path: mtpaint-3.49.13-spawn-commands.patch
# Fix doc perms and line ending
- type: shell
commands:
- chmod 0755 "handbook/docs"/{en_GB,img,files,cs};
- for f in "handbook/docs/index.html" "handbook/docs"/{en_GB,cs}/*.html; do
sed -i 's/\r$//' "${f}";
done;
# Update desktop file
- type: shell
commands:
- desktop-file-edit --set-key=StartupWMClass --set-value=mtpaint "doc/mtpaint.desktop";
post-install:
# utils
- install -p -D -m 0755 "open-editor" "open-terminal" "open-viewer" -t "${FLATPAK_DEST}/bin/";
# handbook
- install -d "${FLATPAK_DEST}/share/doc/mtpaint-handbook/";
cp -R "handbook/docs"/* "${FLATPAK_DEST}/share/doc/mtpaint-handbook/";
# icons
- icon_in="mtpaint.svg";
icon_out="mtpaint.png";
for s in {16,22,24,32,48,64,72,96,128,192,256,512}; do
rsvg-convert "${icon_in}" -w "${s}" -h "${s}" -a -f png -o "${icon_out}";
install -p -D -m 0644 "${icon_out}" -t "${FLATPAK_DEST}/share/icons/hicolor/${s}x${s}/apps/";
done;
install -p -D -m 0644 "${icon_in}" -t "${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/";
# appdata
- install -p -D -m 0644 "mtpaint.appdata.xml" -t "${FLATPAK_DEST}/share/appdata/";
# docs
- install -p -D -m 0644 "NEWS" "README" -t "${FLATPAK_DEST}/share/doc/mtpaint/";
- install -p -D -m 0644 "handbook/README" -t "${FLATPAK_DEST}/share/doc/mtpaint-handbook/";
# licenses
- install -p -D -m 0644 "COPYING" -t "${FLATPAK_DEST}/share/licenses/mtpaint/";
- install -p -D -m 0644 "handbook/COPYING" -t "${FLATPAK_DEST}/share/licenses/mtpaint-handbook/";
- install -p -D -m 0644 "icon-COPYING" "${FLATPAK_DEST}/share/licenses/mate-icon-theme-faenza/COPYING";