summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6c9b1f461a2085faa0a2723e7ab1d189b2b17645 (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
# Maintainer: Kevin MacMartin <prurigro at gmail dot com>

_pkgname=treesheets
pkgname=$_pkgname-git
pkgver=r293.524ec28
pkgrel=2
pkgdesc='The ultimate replacement for spreadsheets, mind mappers, outliners, PIMs, text editors and small databases'
url='http://treesheets.com'
license=('zlib')
depends=('wxgtk2')
makedepends=('cmake' 'git')
arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h')

source=(
  "git://github.com/aardappel/$_pkgname.git"
  'myframe.patch'
)

sha512sums=(
  'SKIP'
  '7ea8b6947c334adebba774bcdd4db27670206a216de0c023c2b69aa3ad3b621165733a36f03f2e23bab1e7721982a24c29c4446754ba79c11c5735961ad04816'
)

pkgver() {
  cd $_pkgname
  printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  cd $_pkgname
  patch -p1 < ../myframe.patch
  find TS/images -type f ! -iname '*.png' -a ! -iname '*.svg' -delete
}

build() {
  cd $_pkgname
  cmake -DCMAKE_BUILD_TYPE=Release
  make
}

package() {
  cd $_pkgname
  install -Dm644 ZLIB_LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

  cd TS
  install -dm755 "$pkgdir/usr/share/applications"
  sed 's|Icon=images/|Icon=|' $_pkgname.desktop > "$pkgdir/usr/share/applications/$_pkgname.desktop"
  install -Dm644 images/$_pkgname.svg "$pkgdir/usr/share/pixmaps/$_pkgname.svg"
  install -Dm755 $_pkgname "$pkgdir/usr/bin/$_pkgname"

  install -dm755 "$pkgdir/usr/share/$_pkgname"
  cp -R scripts "$pkgdir/usr/share/$_pkgname/scripts"
  cp -R examples "$pkgdir/usr/share/$_pkgname/examples"
  cp -R images "$pkgdir/usr/share/$_pkgname/images"
  cp -R docs "$pkgdir/usr/share/$_pkgname/docs"

  cd "$pkgdir/usr/share/$_pkgname/examples"
  ln -s tutorial.cts tutorial-en.cts
}