-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbr.gov.fazenda.receita.irpf2022.yaml
102 lines (98 loc) · 4.29 KB
/
br.gov.fazenda.receita.irpf2022.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
id: br.gov.fazenda.receita.irpf2022
runtime: org.freedesktop.Platform
runtime-version: '24.08'
sdk: org.freedesktop.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.openjdk11
tags:
- proprietary
command: irpf2022
finish-args:
- --share=network
- --socket=x11
- --socket=cups
- --share=ipc
- --env=PATH=/app/jre/bin:/app/bin:/usr/bin
- --env=JAVA_HOME=/app/jre
- --filesystem=xdg-documents # Useful place to save PDF files.
- --filesystem=~/ProgramasRFB:create # This path is hardcoded by the app to save all kinds of tax data.
- --persist=.java # In-app preferences are stored in: ~/.java/.userPrefs/serpro
- --persist=.receitanet # Log files, tokens and whatnot.
- --persist=.rfb # User-provided form data (such as CPF and CNPJ numbers) are stored in: ~/.rfb
modules:
- name: openjdk
buildsystem: simple
build-commands:
- /usr/lib/sdk/openjdk11/install.sh
- name: libgnome-stubs
no-autogen: true
subdir: libgnome-stubs
sources:
- type: git
url: https://github.com/guihkx/irpf-tools-flatpak.git
commit: 984b79398697d138ff8dcce1ff0be44b8d9bb94b
- name: irpf2022
buildsystem: simple
build-commands:
- install -Dm755 -t /app/bin apply_extra
- install -Dm755 -t /app/bin irpf2022
- install -Dm644 -t /app/share/applications $FLATPAK_ID.desktop
- install -Dm644 icon-256.png /app/share/icons/hicolor/256x256/apps/$FLATPAK_ID.png
- install -Dm644 -t /app/share/metainfo $FLATPAK_ID.metainfo.xml
- ln -s /usr/bin/xdg-open /app/bin/firefox # Fixes the clickable link on the "About" window.
sources:
- type: script
dest-filename: apply_extra
commands:
- set -e
- export LC_ALL=C # Suppresses a warning from bsdtar: "bsdtar: Failed to set default locale".
- mkdir share
- |
bsdtar -C share -xf irpf.zip --no-same-permissions --no-same-owner --strip-components 1 \
--include='IRPF*/help' \
--include='IRPF*/lib' \
--include='IRPF*/lib-modulos' \
--include='IRPF*/irpf.jar' \
--include='IRPF*/pgd-updater.jar'
- rm -f irpf.zip
- |
for zip in *.zip
do
bsdtar -C share/lib/resources -xf "${zip}" --no-same-permissions --no-same-owner --strip-components 2
rm -f "${zip}"
done
- type: script
dest-filename: irpf2022
commands:
# Briefly explaining the script (for more details, see tools/libgnome-stubs/README.md):
#
# * -Djdk.gtk.version=2: We use this to "trick" the JRE into lading GTK 2 libraries (which we don't provide), which will
# fail and make the JRE rely on our libgnome stubs instead (see the 'tools/libgnome-stubs' directory).
# * _JAVA_OPTIONS: This env var has to be modified to remove any references to the option above, otherwise the trick we
# apply above will fail, and will break the single sign-on feature provided by the app.
- |
unsupported_java_option='-Djdk\.gtk\.version=[[:digit:]]'
if [[ "${_JAVA_OPTIONS}" =~ ${unsupported_java_option} ]]
then
echo "${0}: WARNING: Removing unsupported option '${BASH_REMATCH[0]}' from \$_JAVA_OPTIONS" >&2
export _JAVA_OPTIONS="${_JAVA_OPTIONS//${unsupported_java_option}/}"
fi
exec java -Djdk.gtk.version=2 -jar /app/extra/share/irpf.jar $@
- type: file
path: br.gov.fazenda.receita.irpf2022.metainfo.xml
- type: file
path: br.gov.fazenda.receita.irpf2022.desktop
- type: file
path: icon-256.png
- type: extra-data
filename: irpf.zip
url: https://downloadirpf.receita.fazenda.gov.br/irpf/2022/irpf/arquivos/IRPF2022-2.1.zip
sha256: 6fe994c09ed507750317f10898cdf41c71adac665ea3ec6b65ca710f00a9fc93
size: 50023521
x-checker-data:
type: html
url: https://downloadirpf.receita.fazenda.gov.br/irpf/2022/irpf/update/latest.xml
version-pattern: <pkgver>([\d.]+)</pkgver>
url-template: https://downloadirpf.receita.fazenda.gov.br/irpf/2022/irpf/arquivos/IRPF2022-$version.zip
is-main-source: true
- generated-sources.yaml