blob: 58569aafcf8344b58a48c970aed1ac16c52062ce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# $Id: PKGBUILD 84449 2013-02-19 04:20:15Z svenstaro $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Josh Taylor (deficite) <joshtaylor.mail@gmail.com>
# Contributor: Christophe Robin (bombstrike) <crobin@php.net>
# Maintainer (Parabola): André Silva <emulatorman@parabola.nu>
_pkgname=newton-dynamics
pkgname=newton-dynamics-libre
pkgver=2.36
pkgrel=1
pkgdesc="A simple physics API"
arch=('i686' 'x86_64' 'mips64el')
url="http://www.newtondynamics.com"
license=('custom')
depends=()
makedepends=('unar')
replaces=$_pkgname
conflicts=$_pkgname
provides=$_pkgname=$pkgver
source=("http://newton-dynamics.googlecode.com/files/newton-dynamics-${pkgver}.rar")
noextract=("newton-dynamics-${pkgver}.rar")
md5sums=('0dffa112d0a6ea39ad9e904e555da69a')
build() {
_srcdir="${srcdir}/newton-dynamics-${pkgver}"
[[ "$CARCH" = "i686" ]] && platform="linux32"
[[ "$CARCH" = "x86_64" ]] && platform="linux64"
builddir="${_srcdir}/coreLibrary_200/projets/${platform}"
# clean build directory
[[ -d "${_srcdir}" ]] && rm -Rf "${_srcdir}"
# decompress package
cd "${srcdir}"
unar "newton-dynamics-${pkgver}.rar"
# needed for building
mkdir -p "${_srcdir}/packages/${platform}"
## build lib
cd "${builddir}"
sed -i 's/ -o libNewton.so/ -lpthread -lstdc++ -o libNewton.so/' makefile
sed -i 's/Debug\.cpp.*$/Debug \\/g' makefile
make
}
package() {
install -D -m644 "${builddir}/libNewton.a" "${pkgdir}/usr/lib/libNewton.a"
install -D -m755 "${builddir}/libNewton.so" "${pkgdir}/usr/lib/libNewton.so"
install -D -m644 "${_srcdir}/coreLibrary_200/source/newton/Newton.h" "${pkgdir}/usr/include/Newton.h"
}
|