summaryrefslogtreecommitdiff
path: root/community-testing/speed-dreams/PKGBUILD
blob: 757a901fe619f1924529a4301e147a66b1a4c460 (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
# $Id: PKGBUILD 54504 2011-08-19 10:27:23Z svenstaro $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Adrián Chaves Fernández, aka Gallaecio <adriyetichaves@gmail.com>
# Contributor: Shahar Weiss <sweiss4@gmx.net> (build() code from his TORCS' PKGBUILD)
pkgname=speed-dreams
pkgver=2.0.0a3
_pkgver=2.0.0-a3-r3412
pkgrel=1
pkgdesc="A racing simulator with rich graphics and physics"
arch=('i686' 'x86_64')
url="http://speed-dreams.sourceforge.net/"
license=('GPL2')
depends=('sdl' 'freealut' 'freeglut' 'libpng' 'libxi' 'libxmu' 'libxrandr' 'plib>=1.8.3' 'libjpeg' 'zlib' 'enet' 'speed-dreams-data')
makedepends=('cmake' 'p7zip')
source=("http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${_pkgver}-src.tar.7z"
        "${pkgname}.desktop")
md5sums=('659837e8866c59c85279c31fcaba4144'
         'bd5c81bac696ec53628ba42684ef8369')

build() {
  7z x ${pkgname}-${_pkgver}-src.tar.7z
  tar xf ${pkgname}-${_pkgver}-src.tar

  cd "${pkgname}-${_pkgver}-src"

  cmake . \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DSD_BINDIR=/usr/bin \
    -DSD_DATADIR=/usr/share/speed-dreams-2 \
    -DSD_LIBDIR=/usr/lib/speed-dreams-2

  make
}

package() {
  cd "$srcdir/${pkgname}-${_pkgver}-src"
  
  make DESTDIR="${pkgdir}/" install

  rm -r "${pkgdir}/usr/share"

  install -Dm644 "data/data/icons/icon.png" "${pkgdir}/usr/share/pixmaps/speed-dreams.png"
  install -Dm644 "data/data/icons/icon.svg" "${pkgdir}/usr/share/pixmaps/speed-dreams.svg"
  install -Dm644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/speed-dreams.desktop"

  mkdir -p "${pkgdir}/usr/share/doc/${pkgname}"
  cp -r doc "${pkgdir}/usr/share/doc/${pkgname}/"

  mkdir -p "${pkgdir}/usr/share/man/man6/${pkgname}"
  rm doc/man/speed-dreams.es.6
  cp doc/man/* "${pkgdir}/usr/share/man/man6/${pkgname}"
}

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