summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bermond2020-07-26 17:42:41 +0000
committerDaniel Bermond2020-07-26 17:42:41 +0000
commit6c4c29c035be39a91ce8bf63de41923e37e7c70d (patch)
treecea4b43c40536fa710b3f2c912679581713a8455
downloadaur-6c4c29c035be39a91ce8bf63de41923e37e7c70d.tar.gz
Initial commit of gcap
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD41
-rw-r--r--gcap.desktop11
-rw-r--r--gcap.sh3
4 files changed, 75 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..a2e12507cf0
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = gcap
+ pkgdesc = Brazilian physical person income tax (IRPF) auxiliary program for calculation of capital gains
+ pkgver = 2020.1.0
+ pkgrel = 1
+ url = https://receita.economia.gov.br/orientacao/tributaria/pagamentos-e-parcelamentos/pagamento-do-imposto-de-renda-de-pessoa-fisica/ganho-de-capital/programa-de-apuracao-de-ganhos-de-capital-moeda-nacional/
+ arch = any
+ license = unknown
+ makedepends = icoutils
+ depends = sh
+ depends = java-runtime
+ depends = hicolor-icon-theme
+ source = http://downloadirpf.receita.fazenda.gov.br/irpf/2020/gcap/GCAP2020v1.0.zip
+ source = gcap.desktop
+ source = gcap.sh
+ sha256sums = 3d5cccf4488455be83150e9c81aede1aca4e119e86c98fbc813ae8286e1708d4
+ sha256sums = 24df966f1dbf8c348b487a1724891271a92b6e795b981fdf0c5b430325722af7
+ sha256sums = 2c50b3d5df01139ce2c41b5be2ee6d34f29313de131defdf8db600d6b58b9129
+
+pkgname = gcap
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..cdf92834523
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer: Daniel Bermond <dbermond@archlinux.org>
+
+pkgname=gcap
+pkgver=2020.1.0
+pkgrel=1
+pkgdesc='Brazilian physical person income tax (IRPF) auxiliary program for calculation of capital gains'
+arch=('any')
+url='https://receita.economia.gov.br/orientacao/tributaria/pagamentos-e-parcelamentos/pagamento-do-imposto-de-renda-de-pessoa-fisica/ganho-de-capital/programa-de-apuracao-de-ganhos-de-capital-moeda-nacional/'
+license=('unknown')
+depends=('sh' 'java-runtime' 'hicolor-icon-theme')
+makedepends=('icoutils')
+source=("http://downloadirpf.receita.fazenda.gov.br/irpf/${pkgver%%.*}/gcap/GCAP${pkgver%%.*}v${pkgver#*.}.zip"
+ 'gcap.desktop'
+ 'gcap.sh')
+sha256sums=('3d5cccf4488455be83150e9c81aede1aca4e119e86c98fbc813ae8286e1708d4'
+ '24df966f1dbf8c348b487a1724891271a92b6e795b981fdf0c5b430325722af7'
+ '2c50b3d5df01139ce2c41b5be2ee6d34f29313de131defdf8db600d6b58b9129')
+
+prepare() {
+ icotool -x "GCAP${pkgver%%.*}/RFB_GCAP.ico" -o "GCAP${pkgver%%.*}"
+}
+
+package() {
+ mkdir -p "${pkgdir}/usr/share/doc/gcap"
+ install -D -m755 gcap.sh "${pkgdir}/usr/bin/gcap"
+ install -D -m644 gcap.desktop -t "${pkgdir}/usr/share/applications"
+ install -D -m644 "GCAP${pkgver%%.*}/GCAP.jar" "${pkgdir}/usr/share/java/gcap/gcap.jar"
+ install -D -m644 "GCAP${pkgver%%.*}/pgd-updater.jar" -t "${pkgdir}/usr/share/java/gcap"
+ install -D -m644 "GCAP${pkgver%%.*}/Leia_me.htm" -t "${pkgdir}/usr/share/doc/gcap"
+ cp -a "GCAP${pkgver%%.*}/help" "${pkgdir}/usr/share/doc/gcap"
+ cp -a "GCAP${pkgver%%.*}/lib" "${pkgdir}/usr/share/java/gcap"
+ ln -s ../../doc/gcap/help "${pkgdir}/usr/share/java/gcap/help"
+
+ local _file
+ local _res
+ while read -r -d '' _file
+ do
+ _res="$(printf '%s' "$_file" | sed 's/\.png$//;s/^.*_//;s/x.*$//')"
+ install -D -m644 "$_file" "${pkgdir}/usr/share/icons/hicolor/${_res}x${_res}/apps/gcap.png"
+ done < <(find "GCAP${pkgver%%.*}" -maxdepth 1 -type f -name 'RFB_GCAP_*_*x*x*.png' -print0)
+}
diff --git a/gcap.desktop b/gcap.desktop
new file mode 100644
index 00000000000..66382ba2ead
--- /dev/null
+++ b/gcap.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Version=1.0
+Name=GCAP
+Comment=Programa de Apuração dos Ganhos de Capital
+Path=/usr/bin
+Exec=gcap
+Icon=gcap
+Terminal=false
+StartupNotify=false
+Type=Application
+Categories=Application;
diff --git a/gcap.sh b/gcap.sh
new file mode 100644
index 00000000000..0ddfe7800ad
--- /dev/null
+++ b/gcap.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec java -Xmx512m -jar /usr/share/java/gcap/gcap.jar "$@"