summaryrefslogtreecommitdiff
path: root/community/xmind/PKGBUILD
blob: be506239ea929cae7db10f7cd74bfcfbc5efe910 (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
# $Id$
# 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.0
_pkgdate=201311050558
pkgrel=1
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')
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" ] && md5sums=('7e5d4a8218397cdefa5a6c4ecaed7cbd')
[ "${CARCH}" = "x86_64" ] && md5sums=('6dcaeb46ab9b88c1904f594b9b1eebc8')

build() {
  cd "${srcdir}"
  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
}