efisc-bin: Initial Commit

This commit is contained in:
LinuxSquare 2024-12-27 23:05:52 +01:00
commit 276be7d3ed
5 changed files with 88 additions and 0 deletions

44
PKGBUILD Normal file
View file

@ -0,0 +1,44 @@
# Maintainer: LinuxSquare <linuxscripting.sh@gmail.com>
pkgname=efisc-bin
pkgver=2023_1.0.7_46
pkgrel=1
pkgdesc="Steuererklärungssoftware des Kantons Thurgau"
arch=('x86_64')
url="https://steuerverwaltung.tg.ch/hilfsmittel/efisc-steuererklaerungssoftware.html/2958"
license=('unknown')
install=${pkgname%%-*}.install
depends=(
"hicolor-icon-theme"
"sh"
)
source=(
"https://efisc.kttg.ch/update/eFisc/${pkgver%%_*}/${pkgname%%-*}${pkgver//_/-}.x86_64.rpm"
"${pkgname%%-*}${pkgver%%_*}.sh.patch"
"${pkgname%%-*}_desktop.patch"
"sanitycheck.patch"
)
sha256sums=(
'bce355273cef3bc5f57f4c64032896bd827b61233de381cdec06ce51b00f1d6f'
'64f77136e77a8b211d597ceb2d67276b489139db201395fb60020e30a6b10bb5'
'6453b8b8ac94e90951a63b72aec0a519ba260b510a11c703cf5f678fece8edd9'
'e0d70d13f21ca2b3cc2bb83b1510b1cbf6a7040477d74b913a0a3e67d4fb305c'
)
package() {
install -D -m644 "${srcdir}/usr/share/${pkgname%%-*}${pkgver%%_*}/jre/legal/jdk.xml.dom/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname%%-*}/LICENSE"
install -d "${pkgdir}/usr/share/java"
cp -rp "${srcdir}/usr/share/${pkgname%%-*}${pkgver%%_*}" "${pkgdir}/usr/share/java"
patch "${pkgdir}/usr/share/java/${pkgname%%-*}${pkgver%%_*}/${pkgname%%-*}${pkgver%%_*}.sh" < "${srcdir}/${pkgname%%-*}${pkgver%%_*}.sh.patch"
patch "${pkgdir}/usr/share/java/${pkgname%%-*}${pkgver%%_*}/sanitycheck.sh" < "${srcdir}/sanitycheck.patch"
cp -rp "${srcdir}/usr/share/${pkgname%%-*}${pkgver%%_*}/${pkgname%%-*}${pkgver%%_*}.sharedmimeinfo" "${pkgdir}/usr/share/java/${pkgname%%-*}${pkgver%%_*}/${pkgname%%-*}${pkgver%%_*}.xml"
install -d "${pkgdir}/usr/bin"
ln -sf "/usr/share/java/${pkgname%%-*}${pkgver%%_*}/${pkgname%%-*}${pkgver%%_*}.sh" "${pkgdir}/usr/bin/${pkgname%%-*}"
install -Dp "${srcdir}/usr/share/${pkgname%%-*}${pkgver%%_*}/${pkgname%%-*}${pkgver%%_*}.png" "${pkgdir}/usr/share/icons/hicolor/64x64/apps/${pkgname%%-*}.png"
install -Dp "${srcdir}/usr/share/applications/${pkgname%%-*}${pkgver%%_*}.desktop" "${pkgdir}/usr/share/applications/${pkgname%%-*}.desktop"
patch "${pkgdir}/usr/share/applications/${pkgname%%-*}.desktop" <"${srcdir}/${pkgname%%-*}_desktop.patch"
}

13
efisc.install Normal file
View file

@ -0,0 +1,13 @@
post_install() {
echo "Installing mimetypes"
xdg-mime install --mode system --novendor /usr/share/java/efisc2023/efisc2023.xml
xdg-icon-resource install --novendor --context mimetypes --size 48 --mode system /usr/share/icons/hicolor/64x64/apps/efisc.png application-efisc2023
update-mime-database /usr/share/mime
}
pre_remove() {
echo "Uninstalling mimetypes"
xdg-mime uninstall --mode system --novendor /usr/share/java/efisc2023/efisc2023.xml
xdg-icon-resource uninstall --novendor --context mimetypes --size 48 --mode system application-efisc2023
update-mime-database /usr/share/mime
}

7
efisc2023.sh.patch Normal file
View file

@ -0,0 +1,7 @@
--- efisc2023.sh.orig 2024-01-25 20:56:20.357845227 +0100
+++ efisc2023.sh 2024-01-25 20:56:23.317895942 +0100
@@ -1,3 +1,3 @@
#!/bin/sh
-cd /usr/share/efisc2023
+cd /usr/share/java/efisc2023
./jre/bin/java -Xmx800m -Xms800m -Djava.locale.providers=COMPAT,CLDR --add-exports=java.base/sun.net.www.protocol.file=ALL-UNNAMED --add-exports=java.desktop/sun.swing=ALL-UNNAMED --add-exports=java.desktop/com.sun.java.swing.plaf.windows=ALL-UNNAMED --add-exports=java.desktop/sun.awt.shell=ALL-UNNAMED --add-exports=java.xml/com.sun.org.apache.xerces.internal.jaxp.datatype=ALL-UNNAMED -jar jfw-launcher-7.2.20-obf.jar "$1"

17
efisc_desktop.patch Normal file
View file

@ -0,0 +1,17 @@
--- efisc2023.desktop.orig 2023-12-12 11:37:12.000000000 +0100
+++ efisc2023.desktop 2024-01-25 20:52:19.864060801 +0100
@@ -1,12 +1,12 @@
[Desktop Entry]
Version=1.0
Terminal=false
-Icon=/usr/share/efisc2023/efisc2023.png
+Icon=/usr/share/icons/hicolor/64x64/apps/efisc.png
Type=Application
StartupNotify=false
StartupWMClass=efisc2023
Categories=Office;
-Exec=/usr/share/efisc2023/efisc2023.sh %U
+Exec=/usr/bin/efisc %U
MimeType=application/efisc2023;
Name=eFisc2023
GenericName=eFisc2023

7
sanitycheck.patch Normal file
View file

@ -0,0 +1,7 @@
--- sanitycheck.sh.orig 2023-12-12 11:37:12.000000000 +0100
+++ sanitycheck.sh 2024-01-25 20:56:37.164800966 +0100
@@ -1,3 +1,3 @@
#!/bin/sh
-cd /usr/share/efisc2023
+cd /usr/share/java/efisc2023
./jre/bin/java -Xmx800m -Xms800m ${runtime.endorsed.linux} -cp sanitycheck-1.0.0-plain.jar ch.abraxas.jastine.sancheck.SanityCheck