summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ffb9338fbdcb4f8de48dfd2f9e10545c37736ffd (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
# Maintainer: Anders Pedersen <silwerspawn+aur.archlinux.org@gmail.com>
pkgname=edrawmax-bin
pkgver=14.0.0
pkgrel=0
pkgmaver=14
pkgmaname=EdrawMax
_pkgmaname_=edrawmax
_pkgmaver_=5371
epoch=
pkgdesc="All-in-One Diagram Software"
arch=('x86_64')
url="https://www.edrawsoft.com/edraw-max/"
license=("Copyright 2022 Edrawsoft. All rights reserved.")
groups=()
depends=('nss' 'alsa-lib' 'qt5-svg' 'gtk3' 'qt5-declarative' 'curl')
makedepends=()
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=(!strip)
install=
changelog=
source=(https://download.wondershare.com/prd/${_pkgmaname_}_full${_pkgmaver_}.rpm edrawmax.desktop)
sha256sums=('1ef71f2d56c093f809cf475cd3b0f17d813a96cbc143a35d7ae1fd51984560a6'
'6ef72d55814737c3d49497857377ebadcf2f985da378605202e643e8cc450fc6')
noextract=()

package() {
  mkdir -p "${pkgdir}/opt/${_pkgmaname_}"
  mkdir -p "${pkgdir}/usr/share"
  mv "${srcdir}/opt/apps/edrawmax/"* "${pkgdir}/opt/${_pkgmaname_}/"
  mv "${srcdir}/usr/share/"* "${pkgdir}/usr/share"
  mkdir -p "${pkgdir}/usr/bin/"
  sed -i "s#/opt/apps/edrawmax#/opt/edrawmax/#" ${pkgdir}/opt/${_pkgmaname_}/edrawmax.sh
  sed -i "s#/opt/apps/edrawmax#/opt/edrawmax#" ${pkgdir}/usr/share/applications/edrawmax.desktop
  chmod +x ${pkgdir}/opt/${_pkgmaname_}/edrawmax.sh
  cd "${pkgdir}/opt/${_pkgmaname_}"
  ln -f -s "/opt/${_pkgmaname_}/${_pkgmaname_}.sh" "${pkgdir}/usr/bin/edrawmax"
}

post_install() {
  chmod +x /opt/${pkgmaname}-${pkgmaver}/${pkgmaname}
  update-desktop-database /usr/share/applications
  update-mime-database /usr/share/mime
  gtk-update-icon-cache /usr/share/icons/hicolor/ -f
  ldconfig
}

post_upgrade() {
  update-desktop-database /usr/share/applications
  update-mime-database /usr/share/mime
  gtk-update-icon-cache /usr/share/icons/hicolor/ -f
  ldconfig
}

# vim:set ts=2 sw=2 et: