summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a8bef9935e258d0ad2795f198075882681b2f273 (plain)
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
# Maintainer: Claudia Pellegrino <auerhuhn@archlinux.org>

pkgname=wiso-steuer-2026
pkgver=33.10.3640
pkgrel=1
pkgdesc='File your German tax return for the tax year 2025'
arch=('x86_64')
url='https://www.buhl.de/produkte/wiso-steuer'
depends=(
  'bash'
  'coreutils'
  'wine'
  'wine-mono'
  'wine-gecko'
  'winetricks'
  'zenity'
)
makedepends=(
  'imagemagick'
  'msitools'
  'p7zip'
  'readpe'
)
license=('LicenseRef-custom')
options=('!strip')
install="${pkgname}.install"

_installer_name="WISOSteuer2026Update$(
  awk <<< "${pkgver}" -F . '{ print $1$3 }'
)"

source=(
  "https://download.buhl.de/hotline/db/9/${_installer_name}.exe"
  'https://update1.buhl-data.com/Steuer/2026/Handbuch_WISO_Steuer_Win.pdf'
  'wiso-steuer-2026.bash'
  'wiso-steuer-2026.desktop'
)

sha512sums=('12a3533b1b642173981708e6feb3dfeaab9d7fed16eb77dbf12100a4916b230219e3c82b5a389569544bb669f15e05de7fdece38e28c13a87c333e1e16184267'
            'SKIP'
            'a5c60dcf26a22cf151caf32ad293ea1ac9ddac0e5c93cc14f25b5aa1fd886d4c4f149654d8498e3a0335c30ff178c7ad5b936141f0a01c3bd853836790997480'
            'f49b6c1d54c907253d2ad378c248f21da0ee98053b4bd090a9b92363c574902eb8364b0b8e2e759bdd09fcab315672c8d22fc06d9915207fb91170d9a7ef04ba')

prepare() {
  mkdir -p "${srcdir}/${pkgname}-msi"
  7z x -o"${srcdir}/${pkgname}-msi" "${srcdir}/${_installer_name}.exe"
  # Use a symlink to strip the first three path elements
  mkdir -p "${srcdir}/${pkgname}-staging" \
    "${srcdir}/${pkgname}-tmpextract/PFiles64/WISO"
  ln -fns \
    "${srcdir}/${pkgname}-staging" \
    "${srcdir}/${pkgname}-tmpextract/PFiles64/WISO/Steuersoftware 2026"
  msiextract -C "${srcdir}/${pkgname}-tmpextract" \
    "${srcdir}/${pkgname}-msi/sparbgtst.msi"
}

package() {
  cd "${pkgname}-staging"

  echo >&2 'Packaging the licenses'
  install -D -m 644 -t "${pkgdir}/usr/share/licenses/${pkgname}" \
    'fremdlizenz.pdf'

  echo >&2 'Packaging program files and documentation'
  install -D -m 644 -t "${pkgdir}/usr/share/doc/${pkgname}" \
    ../Handbuch_WISO_Steuer_Win.pdf
  install -D -m 644 -t "${pkgdir}/usr/share/doc/${pkgname}/dokumente" \
    dokumente/*
  rm -rf dokumente
  mkdir -p "${pkgdir}/usr/lib/${pkgname}"
  cp -R --preserve=mode "../${pkgname}-staging" \
    "${pkgdir}/usr/lib/${pkgname}/app"
  ln -fns "/usr/share/doc/${pkgname}/dokumente" "${pkgdir}/usr/lib/${pkgname}/app/"

  echo >&2 'Packaging app icon'
  mkdir -p "${pkgdir}/usr/share/pixmaps"
  magick 'wisoakt.ico' \
    -delete 1,2,3,4,5,6,7,8 "${pkgdir}/usr/share/pixmaps/${pkgname}.png"

  echo >&2 'Packaging launcher'
  install -D -m 755 -T "../${pkgname}.bash" \
    "${pkgdir}/usr/bin/${pkgname}"

  echo >&2 'Packaging desktop file'
  install -D -m 755 -t "${pkgdir}/usr/share/applications" \
    "../${pkgname}.desktop"
}