desktop/torcs/PKGBUILD
2016-01-15 00:55:47 +01:00

62 lines
1.5 KiB
Bash

pkgbase=torcs
pkgname=('torcs' 'torcs-data')
pkgver=1.3.6
pkgrel=1
pkgdesc="A 3D racing cars simulator"
url="http://torcs.sourceforge.net"
license=("GPL2")
arch=('x86_64')
depends=('freealut' 'freeglut' 'libpng' 'libvorbis' 'libxi' 'libxmu' 'libxrandr' 'glu')
makedepends=('plib' 'mesa')
options=('!makeflags')
categories=('games')
source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.bz2)
sha256sums=('193cb1820170eb18335dffeaa345499229a4b7972a78acbfaca197597a3075af')
build() {
cd $srcdir/$pkgname-$pkgver
unset LDFLAGS
./configure \
--datadir=/usr/share/$pkgbase \
--prefix=/usr \
--localstatedir=/usr/var/$pkgbase \
--x-includes=/usr/include \
--x-libraries=/usr/lib
make
}
package_torcs() {
depends=(${depends[@]} "torcs-data=$pkgver")
cd $srcdir/$pkgbase-$pkgver
# Basic installation
make DESTDIR=${pkgdir} install
# Desktop Integration.
install -Dm644 Ticon.png $pkgdir/usr/share/pixmaps/$pkgbase.png
install -Dm644 $pkgbase.desktop ${pkgdir}/usr/share/applications/$pkgbase.desktop
# Fix permissions.
find ${pkgdir} -type d -exec chmod 755 {} \;
# Fix library files destination.
mv $pkgdir/usr/lib/$pkgbase/lib/* $pkgdir/usr/lib/
rmdir $pkgdir/usr/lib/$pkgbase/lib
}
package_torcs-data() {
pkgdesc="Data files for TORCS."
arch=(any)
depends=()
makedepends=()
cd $srcdir/$pkgbase-$pkgver
# Data installation.
make DESTDIR=${pkgdir} datainstall
find ${pkgdir} -type d -exec chmod 755 {} \;
}