You are not logged in.

#1 2008-03-28 08:29:54

krigun
Member
From: Norway
Registered: 2005-06-06
Posts: 122
Website

PKGBUILD for Ageia PhysX SDK

PhysX is a "proprietary realtime physics engine middleware SDK ", and has a LOT of cool features. The SDK is not open source, but the binaries are available for free, for commercial and non-commercial distribution.

Now that Nvidia has bought Ageia, they are busy making the physics engine run on top of CUDA http://en.wikipedia.org/wiki/CUDA, meaning that us GNU/Linux users will soon have the possibility to run GPU accelerated physics simulations, maybe they will provide drivers for the PhysX PCI card aswell, who knows. Ogre3D http://www.ogre3d.org has a very nice addon to integrate the PhysX libraries aswell, its named NxOgre http://www.nxogre.org/.

To be able to download the SDK, you need to register at http://devsupport.ageia.com, and download the PhysX_2.8.0_SDK_CoreLinux_rpm.tar.gz rpm package (the folks at Ageia are processing those requests manually, may take a few days to complete).

Enough talk, here is the PKGBUILD:

# Maintainer: Gunnar Kriik [krigun] <gunnar[dot]kriik[at]gmail[dot]com> 
# Contributor: Gunnar Kriik [krigun] <gunnar[dot]kriik[at]gmail[dot]com> 

pkgname=physx
pkgver=2.8.0
pkgrel=1
pkgdesc="A large physics middleware library for game production"
arch=('i686')
url="http://www.ageia.com"
license=('custom')
makedepends=('rpmextract')
depends=('freeglut')
options=(docs !strip)
install=(physx.install)
source=(PhysX_${pkgver}_SDK_CoreLinux_rpm.tar.gz)
md5sums=('94de0b3fb2c47f404397c01c16c2dae3')

build() {
  cd $startdir/src
  
  rpmextract.sh libphysx-$pkgver-$pkgver-11.i386.rpm
  rpmextract.sh libphysx-common-$pkgver-11.i386.rpm
  rpmextract.sh libphysx-dev-$pkgver-$pkgver-11.i386.rpm
  rpmextract.sh libphysx-doc-$pkgver-$pkgver-11.i386.rpm
  rpmextract.sh libphysx-extras-$pkgver-$pkgver-11.i386.rpm
  rpmextract.sh libphysx-samples-$pkgver-$pkgver-11.i386.rpm
  
  mv usr/sbin usr/bin
  
  cp -R usr/ $startdir/pkg
  cp -R etc/ $startdir/pkg
  
  mkdir -p $pkgdir/usr/share/licenses/$pkgname
  cp usr/share/doc/libphysx-common/copyright $pkgdir/usr/share/licenses/$pkgname/
  
  cd $startdir/pkg/usr/lib/PhysX/v$pkgver
  ln -s libPhysXCore.so.1 libPhysXCore.so
  ln -s libNxCooking.so.1 libNxCooking.so
  ln -s libNxCharacter.so.1 libNxCharacter.so
  
  cd $startdir/pkg/usr/lib
  ln -s libPhysXLoader.so.1 libPhysXLoader.so
}

physx.install

post_install() {
    sed -e '/\/usr\/lib\/PhysX\/v2.8.0/d' -i /etc/ld.so.conf
    echo '/usr/lib/PhysX/v2.8.0' >> /etc/ld.so.conf
    /sbin/ldconfig -r .
}

pre_remove() {
    sed -e '/\/usr\/lib\/PhysX\/v2.8.0/d' -i /etc/ld.so.conf
    /sbin/ldconfig -r .
}

PS: Don't know if this is the right place to post this, but I thought that others may be interested in an arch package for this as well.

Last edited by krigun (2008-03-28 14:26:06)

Offline

#2 2008-03-28 10:57:00

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: PKGBUILD for Ageia PhysX SDK

Thank you for providing a package!

The usual place to provide this is the AUR, though. Look here: http://aur.archlinux.org/

I did not test the package and cannot do so now. But having a look at the PKGBUILD it seems it is missing a license file, or at least the license file is not installed at the correct place.

Offline

#3 2008-03-28 14:31:44

krigun
Member
From: Norway
Registered: 2005-06-06
Posts: 122
Website

Re: PKGBUILD for Ageia PhysX SDK

Stefan Husmann wrote:

Thank you for providing a package!

The usual place to provide this is the AUR, though. Look here: http://aur.archlinux.org/

I did not test the package and cannot do so now. But having a look at the PKGBUILD it seems it is missing a license file, or at least the license file is not installed at the correct place.

Thanks for the feedback! I've added the licence file to /usr/share/licenses/physx and fixed some other things aswell. The package is now in AUR: http://aur.archlinux.org/packages.php?ID=16005

Offline

Board footer

Powered by FluxBB