summaryrefslogtreecommitdiff
path: root/community/xmind/PKGBUILD
blob: 0f2013e88f9d9400c1a4d2ce93fd7856139fb8ca (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
# $Id: PKGBUILD 106967 2014-03-11 07:19:47Z fyan $
# Maintainer: Felix Yan <felixonmars@gmail.com>
# Contributor: Christoph Drexler <chrdr at gmx dot at>
# Contributor: Jelle van der Waa <jellevdwaa@gmail.com>

pkgname=xmind
pkgver=3.4.1
_pkgdate=201401221918
pkgrel=2
pkgdesc="Brainstorming and Mind Mapping Software"
arch=('i686' 'x86_64')
[ "${CARCH}" = "i686" ] && _arch="i386"
[ "${CARCH}" = "x86_64" ] && _arch="amd64"
url="http://www.xmind.net"
license=('EPL' 'LGPL')
depends=('desktop-file-utils' 'fontconfig' 'libxrender' 'java-runtime' 'shared-mime-info' 'libxext')
optdepends=('lame: needed for the feature audio notes')
install=xmind.install
source=(http://dl2.xmind.net/xmind-downloads/${pkgname}-linux-${pkgver}.${_pkgdate}_${_arch}.deb)
[ "${CARCH}" = "i686" ] && sha512sums=('4c020c2eca0646fc18c0066a198e1fb0af1ac18c2e2534968d69d36e78fc1fe6a0b831107d27cd7db642a459d379d4b051f6db1ddaa254de935db4f81e1fa9b8')
[ "${CARCH}" = "x86_64" ] && sha512sums=('a42c1ce8d4d786940c82d438ceeeca40cc4d742a6bb0943a65d7097ac254cb80a40c0c1cc016931d7479720a8b1543a534154c4ed513cb23acdf32b8cacdeefa')

build() {
  ar x "${pkgname}-linux-${pkgver}.${_pkgdate}_${_arch}.deb"
  bsdtar -xf data.tar.gz
}

package() {
  install -d "${pkgdir}"/usr/share/xmind/
  cp -a "${srcdir}"/usr/local/xmind/* "${pkgdir}"/usr/share/xmind/
  cp -a "${srcdir}"/usr/share/* "${pkgdir}"/usr/share/
  install -d "${pkgdir}"/usr/bin/
  cd "${pkgdir}"/usr/bin/
  ln -s ../../usr/share/xmind/XMind .

  # getting the config files to the right place...
  install -d "${pkgdir}"/etc/xmind/
  mv "${pkgdir}"/usr/share/xmind/configuration/* \
    "${pkgdir}"/etc/xmind/
  cd "${pkgdir}"/usr/share/xmind/configuration/
  ln -s ../../../../etc/xmind/* .
  mv "${pkgdir}"/usr/share/xmind/XMind.ini \
    "${pkgdir}"/etc/xmind/
  cd ../
  ln -s ../../../etc/xmind/XMind.ini .

  # putting the png file where it belongs to
  install -d "${pkgdir}"/usr/share/pixmaps/
  mv "${pkgdir}"/usr/share/xmind/xmind-logo-36.png \
    "${pkgdir}"/usr/share/pixmaps/xmind.png
  sed -i s!Exec=.*!Exec=/usr/share/xmind/XMind! \
    "${pkgdir}"/usr/share/applications/xmind.desktop
  sed -i s!/usr/local/xmind/xmind-logo-36.png!xmind.png! \
    "${pkgdir}"/usr/share/applications/xmind.desktop
}