summaryrefslogtreecommitdiff
path: root/community/qtspim/PKGBUILD
blob: a1ac5584b56e35b459898cc798c589d82a9795ec (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
61
62
63
# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
# Contributor: Lukas Jirkovsky <l.jirkovsky@gmail.com>

pkgname=qtspim
pkgver=9.1.5
pkgrel=1
pkgdesc="New user interface for spim, a MIPS simulator."
arch=('i686' 'x86_64')
url="http://spimsimulator.sourceforge.net/"
license=('BSD')
depends=('qt')
makedepends=('subversion')

__svntrunk="https://spimsimulator.svn.sourceforge.net/svnroot/spimsimulator"
__svnmod=('QtSpim' 'CPU' 'Documentation' 'Setup')
__svnrev=592

build() {
  cd "$srcdir"
  msg "Connecting to SVN server...."

  for i in "${__svnmod[@]}"; do
    if [[ -d "$i/.svn" ]]; then
      (cd "$i" && svn up -r "$__svnrev")
    else
      svn co "$__svntrunk/$i" --config-dir ./ -r "$__svnrev" "$i"
    fi
  done

  msg "SVN checkout done or server timeout"
  msg "Starting build..."

  rm -rf "$srcdir/build"
  mkdir "$srcdir/build"
  for i in "${__svnmod[@]}"; do
    cp -r "$srcdir/$i" "$srcdir/build"
  done
  cd "$srcdir/build/QtSpim"

  qmake
  make
}

package() {
  cd "$srcdir/build/QtSpim"

  install -Dm755 QtSpim "$pkgdir/usr/bin/qtspim"

  install -dm755 "$pkgdir/usr/share/qtspim"
  cp -r help "$pkgdir/usr/share/qtspim"
  rm -rf "$pkgdir/usr/share/qtspim/help/.svn"

  cd "$srcdir/build"

  install -Dm644 Documentation/spim.man "$pkgdir/usr/share/man/man1/qtspim.1"
  install -Dm644 Setup/qtspim_debian_deployment/qtspim.desktop \
    "$pkgdir/usr/share/applications/qtspim.desktop"
  install -Dm644 Setup/qtspim_debian_deployment/copyright \
    "$pkgdir/usr/share/licenses/$pkgname/copyright"
  install -Dm644 Setup/NewIcon48x48.png "$pkgdir/usr/share/qtspim/qtspim.png"
}

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