summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 13ca0fd6f103988c04d1fa5e6951238bd6b792cc (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
# Maintainer: Nicolas Stalder <n+archlinux@stalder.io>
# Based on banana9 package by: Hansruedi Patzen <hp@revy.ch>

pkgname=bananaplus
pkgver=10.1.24
pkgrel=1
pkgdesc="Simple and fast accounting software"
url="https://www.banana.ch/"
arch=(x86_64)
license=(custom)
depends=(gtk3)

source=(https://cdn.banana.ch/accounting/files/$pkgname/exe/$pkgname.tgz)
# add dummy entries for `make generate-checksums` to create SHA256 instead of MD5 check sums
sha256sums=(e467b03c6382c9e4ba7da2fc68c519fc90d4527d8f1aebabd30b3fee794d5fa3)

# coredumps otherwise
options=(emptydirs !strip)

install_dir="/opt/${pkgname}/usr"

package() {
  rm $srcdir/$pkgname.tgz
  install -d "${pkgdir}/${install_dir}"

  cp -R $srcdir/usr/* $pkgdir/$install_dir
  mkdir -p $pkgdir/usr/bin
  ln -s /opt/bananaplus/usr/bin/bananaplus $pkgdir/usr/bin/bananaplus

  install -Dm644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
  sed -i "s-Name=bananaplus-Name=Banana Accounting+-g" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
  sed -i "s-Exec=usr/bin/bananaplus-Exec=/opt/bananaplus/usr/bin/bananaplus-g" "${pkgdir}/usr/share/applications/${pkgname}.desktop"

  install -Dm644 "${srcdir}/bananaplus.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/bananaplus.svg"
  install -Dm644 "${srcdir}/usr/share/mime-ac2.xml" "${pkgdir}/usr/share/mime-ac2.xml"

  license_source="${srcdir}/usr/share/licenses"
  for license_file in $(find "${license_source}" -type f -name "*.txt"); do
    install -Dm644 "${license_file}" "${pkgdir}/usr/share/licenses/${pkgname}/${license_file#${license_source}}"
  done

}