mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
84 lines
3.1 KiB
Bash
84 lines
3.1 KiB
Bash
pkgbase=speed-dreams
|
|
pkgname=('speed-dreams' 'speed-dreams-data')
|
|
pkgver=2.2.2
|
|
_pkgver=$pkgver-rc2-r6527
|
|
pkgrel=2
|
|
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"
|
|
"osgvolume.patch")
|
|
md5sums=('956bda0acbcb89eaa2ca742dbedc8941'
|
|
'5d55831ca9371f8a55cc5616f9612164'
|
|
'bc183b3e80c742bc249f630cb029920c'
|
|
'ed11647ad2d479dc4012ffd79375b995'
|
|
'd615eda2c443a2e5ce74cf45d5374062'
|
|
'634f8cb8f4f96686c8049c8a025e72d0'
|
|
'd8a34db622604400bb247acd8b68b837')
|
|
|
|
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"
|
|
patch -Np1 <osgvolume.patch
|
|
}
|
|
|
|
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"
|
|
}
|