desktop/speed-dreams/PKGBUILD
2016-06-09 01:33:57 +01:00

81 lines
3.0 KiB
Bash

pkgbase=speed-dreams
pkgname=('speed-dreams' 'speed-dreams-data')
pkgver=2.2.1
_pkgver=2.2.1-r6404
pkgrel=1
pkgdesc="A racing simulator with rich graphics and physics"
arch=('x86_64')
url="http://speed-dreams.sourceforge.net/"
license=('GPL2')
depends=('enet' 'freeglut' 'glu' 'libgl' 'libjpeg' 'libpng' 'libxi' 'libxmu'
'libxrandr' 'openal' 'plib' 'sdl2' 'zlib' 'libogg' 'libvorbis' 'enet' 'openscenegraph')
makedepends=('cmake' 'mesa' 'tar')
categories=('games')
noextract=("${pkgname}-src-base-${_pkgver}.tar.xz"
"${pkgname}-src-unmaintained-${_pkgver}.tar.xz"
"${pkgname}-src-wip-cars-and-tracks-${_pkgver}.tar.xz"
"${pkgname}-src-hq-cars-and-tracks-${_pkgver}.tar.xz"
"${pkgname}-src-more-hq-cars-and-tracks-${_pkgver}.tar.xz")
source=("http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-src-base-${_pkgver}.tar.xz"
"http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-src-unmaintained-${_pkgver}.tar.xz"
"http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-src-wip-cars-and-tracks-${_pkgver}.tar.xz"
"http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-src-hq-cars-and-tracks-${_pkgver}.tar.xz"
"http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-src-more-hq-cars-and-tracks-${_pkgver}.tar.xz"
"${pkgname}.desktop")
md5sums=('a1a296ab737d5144f1f570f4cabc7937'
'0a9b1572d0660c60fa0553195578a36a'
'3413d9d5e2111cd9e87628df5818d2b4'
'e4efd3b16e53a54c23e606947739abe5'
'b6079ca11202595ac312a28262e793ee'
'634f8cb8f4f96686c8049c8a025e72d0')
prepare() {
# extract these manually as bsdtar can't handle these
tar xf "${pkgname}-src-base-${_pkgver}.tar.xz"
tar xf "${pkgname}-src-unmaintained-${_pkgver}.tar.xz"
tar xf "${pkgname}-src-wip-cars-and-tracks-${_pkgver}.tar.xz"
tar xf "${pkgname}-src-hq-cars-and-tracks-${_pkgver}.tar.xz"
tar xf "${pkgname}-src-more-hq-cars-and-tracks-${_pkgver}.tar.xz"
}
build() {
cmake . \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DSD_BINDIR=/usr/bin \
-DOPTION_OFFICIAL_ONLY=ON \
-DSD_LOCALDIR=~/.speed-dreams \
-DSD_DATADIR=/usr/share/speed-dreams-2 \
-DSD_LIBDIR=/usr/lib/speed-dreams-2
make
}
package_speed-dreams() {
depends=(${depends[@]} speed-dreams-data)
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 "${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}/"
# Symlink for backwards compatibility
cd "${pkgdir}/usr/bin"
ln -s speed-dreams-2 speed-dreams
}
package_speed-dreams-data() {
depends=()
pkgdesc="$pkgdesk (data files)"
make DESTDIR="${pkgdir}/" install
rm -r "${pkgdir}/usr/bin"
rm -r "${pkgdir}/usr/lib"
rm -r "${pkgdir}/usr/include"
}