summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d0fcca7a98ac8c44747706d40aa76a11f840a025 (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
# Maintainer: Sandy Carter <bwrsandman@gmail.com>
# PKGBUILD source: https://github.com/bwrsandman/pkgbuild/tree/master/openmw-git

pkgname=openmw-git
_gitname="openmw"
pkgver=20130515
pkgrel=1
pkgdesc="An open-source engine reimplementation for the role-playing game Morrowind."
arch=('i686' 'x86_64')
url="http://www.openmw.org"
license=('GPL3' 'custom')

depends=('openal' 'ogre' 'mygui' 'bullet' 'mpg123' 'libsndfile' 'qt4' 'ffmpeg')
makedepends=('git' 'cmake' 'boost')
conflicts=('openmw')
provides=('openmw')

source=('git://github.com/zinnschlag/openmw.git')
md5sums=('SKIP')

pkgver() {
    cd "$srcdir/$_gitname"
    git log -1 --format="%cd" --date=short | tr -d '-'
}

build() {
  cd "$srcdir/$_gitname"
  cmake -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_BUILD_TYPE=RelWithDebInfo \
        -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4
  make ${MAKEFLAGS}
}

package() {
  cd "$srcdir/$_gitname"
  make DESTDIR="$pkgdir" install

  # Replace resources location
  sed 's,resources=\./resources,resources=/usr/share/games/openmw/resources,' openmw.cfg > "$pkgdir"/etc/openmw/openmw.cfg 

  # Custom Licences
  install -d -m755 "$pkgdir"/usr/share/licenses/openmw
  install -D -m644 "DejaVu Font License.txt" "$pkgdir/usr/share/licenses/openmw/"
  install -D -m644 "Daedric Font License.txt" "$pkgdir/usr/share/licenses/openmw/"
  install -D -m644 "OFL.txt" "$pkgdir/usr/share/licenses/openmw/"
  install -D -m644 "extern/shiny/License.txt" "$pkgdir/usr/share/licenses/openmw/Shiny License.txt"
}