You are not logged in.

#1 2009-10-20 19:36:04

stefanwilkens
Member
From: Enschede, the Netherlands
Registered: 2008-12-10
Posts: 624

Check my PKGBUILD please?

it's for - http://www.racer.nl/

It's binary, source is not avialable and the licence seems odd. Comments?

PKGBUILD

# Contributor: Stefan Wilkens <stefanwilkens@gmail.com>

pkgname=racer
pkgver=054b1
pkgrel=1
pkgdesc="A free cross-platform car simulation project using professional car physics to achieve a realistic feeling and an excellent render engine for graphical realism."
arch=('i686')
url="http://www.racer.nl/"
license=('UNKNOWN')
groups=()
depends=(fmodex)
makedepends=()
provides=(racer)
conflicts=(racer)
replaces=()
backup=()
install=
source=(http://www.racer.nl/download/racer054b1.tgz racer.desktop racer.sh)
noextract=()
md5sums=('a779d3cd4e5a282c2d08b7750ccd1c57'
         '2eac7dee2df80c69128650a0042967a8'
         'ceac39a3b444f0b4edb2319c70067419')

build() {
    # Extract
    cd $srcdir
    tar -zxvf $pkgname$pkgver.tgz
   
    # Install
    mkdir $pkgdir/opt
    mv $srcdir/racer $pkgdir/opt
   
    # Install launch script
    install -Dm755 $srcdir/racer.sh $pkgdir/usr/bin/racer

    # Install desktop launcher
    install -Dm644 $startdir/racer.desktop $pkgdir/usr/share/applications/racer.desktop
}

racer.desktop

[Desktop Entry]
Name=Racer
Type=Application
Categories=Game;
Terminal=false
Exec=racer
Icon=

racer.sh

cd /opt/racer/
./racer

Last edited by stefanwilkens (2009-10-20 19:36:54)


Arch i686 on Phenom X4 | GTX760

Offline

#2 2009-10-20 20:11:59

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,549

Re: Check my PKGBUILD please?

PKGBUILD

# Contributor: Stefan Wilkens <stefanwilkens@gmail.com>
# Contributor: Devin Cofer <ranguvar{AT]archlinux[DOT}us>

pkgname=racer
pkgver=054b1
pkgrel=1
pkgdesc="Car simulator with realistic physics and render engine"
arch=('i686' 'x86_64')
url="http://www.racer.nl/"
license=('custom')

makedepends=('imagemagick')
depends=('fmodex')
[ $CARCH == x86_64 ] && depends=('lib32-fmodex')

source=("http://www.racer.nl/download/racer${pkgver}.tgz"
        'racer.desktop'
        'racer'
        'LICENSE')
md5sums=('a779d3cd4e5a282c2d08b7750ccd1c57'
         ''
         ''
         '')

build() {
        cd "$srcdir"

        mkdir "$pkgdir/opt"
        convert -quality 1000 "racer/data/images/logo.tga" "racer/data/images/logo.png"
        cp -r "racer/" "$pkgdir/opt/"

        install -Dm755 "$srcdir/racer" "$pkgdir/usr/bin/racer"
        install -Dm644 "$srcdir/racer.desktop" "$pkgdir/usr/share/applications/racer.desktop"
        install -Dm644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

racer.desktop

[Desktop Entry]
Type=Application
Name=Racer
GenericName=Car Simulator
Comment=Car simulator with realistic physics and rendering
Categories=Game;Simulation;
Path=/opt/racer/
Terminal=false
TryExec=/opt/racer/racer
Exec=/opt/racer/racer
Icon=/opt/racer/data/images/logo.png

racer

#! /bin/sh
cd /opt/racer/
./racer

license

The programs and source code of the Racer project are copyright of Ruud van Gaal, Dolphinity, 2000-2001.
All rights reserved. Publishing of included material without prior written permission of the author is prohibited.

Publishing of material downloadable here may however be done on a non-commericial basis. In this case, I would appreciate it if you send me a note regarding where you make available the material.

Use of any of the published source code in commercial software is explicilty NOT allowed without prior written permission. Distributions on Linux distributions (as is done on SuSE8.0 for example) IS however allowed. Use of (parts of) the source code in non-commercial software is allowed however. For commercial usage, licensing may be an option, for which you can contact the author.

This is NOT an Open Source project, although many people think so. You CAN contribute to the source if you want (or cannot resist), but all changes will go through me to the master source code. This is done to ensure quality and consistent style for instance. Also, parts of Racer (the QLib/D3 libraries) are used in other projects, and changing the source code of this would be counterproductive for the other products that use these libraries. Therefore, the decision has been made not to OpenSource the source code.
Realise that the copyrights will stay at Dolphinity, so for many people this will mean that they won't contribute to the source. This is ok to me, the product seems not large enough to need the whole world to aid in developing (except for the contents; cars & tracks). To add to the Racer project and maintain control, it is advised to create separate executables, which may use parts of the source code, but are not completely separately usable products. This means you can create a Replay Analyzer which uses track code from the Racer source code, but that you may NOT create a complete racing game based on a specific era for example, and distribute this commercially as a separate product.

If you have any questions on the usage of the materials presented in the Racer site, please contact me.

There may be some problems with this, and you'll have to fill in the md5sums and such yourself.

Last edited by Ranguvar (2009-10-20 20:15:58)

Offline

#3 2009-10-20 20:18:23

stefanwilkens
Member
From: Enschede, the Netherlands
Registered: 2008-12-10
Posts: 624

Re: Check my PKGBUILD please?

Thank you, I think I'll take out the makedepend and simply add a .png. See any objection in that?


Arch i686 on Phenom X4 | GTX760

Offline

#4 2009-10-20 20:51:52

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,549

Re: Check my PKGBUILD please?

Nope smile

Offline

#5 2009-10-20 22:02:46

stefanwilkens
Member
From: Enschede, the Netherlands
Registered: 2008-12-10
Posts: 624

Re: Check my PKGBUILD please?

turns out the .tga that comes with the package can be used as a logo just fine, was there any reason you chose to convert it?

I'm on GNOME and have no quick way of finding out if other DE / WM / Panels have the same functionallity


Arch i686 on Phenom X4 | GTX760

Offline

#6 2009-10-20 22:03:46

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,226
Website

Re: Check my PKGBUILD please?

FTR, you can use the 'namcap' utility for sanity checking of your PKGBUILD

Offline

#7 2009-10-20 22:57:14

stefanwilkens
Member
From: Enschede, the Netherlands
Registered: 2008-12-10
Posts: 624

Re: Check my PKGBUILD please?

here's what I've ended up with, another package in the AUR had the same pkgname so I've had to adjust slightly.

For the sake of consistency I have changed as much as I could to racer-3d, this includes install location, start script and pkgname. I didn't see another way around this but I'm not sure if this is the proper way to do things?

builds and runs fine now smile

PKGBUILD

# Contributor: Stefan Wilkens <stefanwilkens@gmail.com>
# Contributor: Devin Cofer <ranguvar{AT]archlinux[DOT}us>
#
# note: package was named to include "-3d" due to another package
# already being in the AUR with the name "racer". Update the
# source link if you update this PKGBUILD!

pkgname=racer-3d
pkgver=054b1
pkgrel=1
pkgdesc="3D car simulator with realistic physics and render engine"
arch=('i686' 'x86_64')
url="http://www.racer.nl/"
license=('custom')
groups=()
depends=(fmodex)
[ $CARCH == x86_64 ] && depends=('lib32-fmodex')
makedepends=()
provides=(racer-3d)
conflicts=(racer-3d)
replaces=()
backup=()
install=
source=(http://www.racer.nl/download/racer$pkgver.tgz racer-3d.desktop racer-3d.sh LICENSE)
noextract=()
md5sums=('a779d3cd4e5a282c2d08b7750ccd1c57'
         '4ebd14c858fe5abf535eb37fb7148189'
         '68af8419e3a1d381a12b1ac60e45e94a'
         '51a9cac34e83de7d9e60a598225f0967')

build() {
    # Extract
    cd $srcdir
    tar -zxvf racer$pkgver.tgz
   
    # Install
    mkdir $pkgdir/opt
    cp -r "racer/" "$pkgdir/opt/$pkgname"
   
    # Install script, desktop entry and licence
    install -Dm755 "$srcdir/racer-3d.sh" "$pkgdir/usr/bin/racer-3d"
    install -Dm644 "$srcdir/racer-3d.desktop" "$pkgdir/usr/share/applications/racer-3d.desktop"
    install -Dm644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

racer-3d.desktop

[Desktop Entry]
Type=Application
Name=Racer
GenericName=Car Simulator
Comment=Car simulator with realistic physics and rendering
Categories=Game;Simulation;
Path=/opt/racer-3d/
Terminal=false
TryExec=/opt/racer-3d/racer
Exec=racer-3d
Icon=/opt/racer-3d/data/images/logo.tga

racer-3d.sh

#! /bin/sh
cd /opt/racer-3d/
./racer

Last edited by stefanwilkens (2009-10-20 22:58:46)


Arch i686 on Phenom X4 | GTX760

Offline

#8 2009-10-20 23:09:08

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: Check my PKGBUILD please?

I thought there'd be an AUR pkg for this already.  Nice to see this.  stefan, you'll want to define both arch's for depends, and desktop icons go into /usr/share/icons.  Otherwise, good work.  Despite pkgjack tongue.

Last edited by Gen2ly (2009-10-20 23:09:31)


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#9 2009-10-21 09:56:40

dax
Member
Registered: 2007-07-25
Posts: 8

Re: Check my PKGBUILD please?

Pretty nice game, how to save option changes? (Am I offtopic?)

Offline

#10 2009-10-21 21:31:07

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,549

Re: Check my PKGBUILD please?

-) Quote use of $pkgdir, $srcdir, and $startdir, so people can makepkg in non-standard build paths.
-) See my post, you can make makepkg handle the tar archive and such.
-) Can you please try with normal 'fmodex' on x86_64 and see if it works?  If so, I'll get lib32-fmodex deleted, as the normal fmodex seems to build under x86_64.

Offline

#11 2009-10-21 22:20:11

stefanwilkens
Member
From: Enschede, the Netherlands
Registered: 2008-12-10
Posts: 624

Re: Check my PKGBUILD please?

ah, I never realised that makepkg could handle archives!

since I got things working properly, I have added a version to the AUR:
http://aur.archlinux.org/packages.php?ID=31357

I will update it with your comments so far asap.

one question I have for you though. I have chosen /opt according to the FSH. Some people are suggesting this should be in /usr/share/games. What should I do with this. According to the FSH, /usr is for static data, this game contains some config files that are edited during gamelay. Logs and such are also in the main gamedir and can't be moved around the filesystem. Suggestions?


Arch i686 on Phenom X4 | GTX760

Offline

#12 2009-10-22 00:59:47

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,226
Website

Re: Check my PKGBUILD please?

Historically, the system should be able to run day-to-day with /usr mounted read-only. So any files that need to be written to, /usr is no good for them.

Offline

Board footer

Powered by FluxBB