part of a patch from Dan Eicher with some edits.
[blender-staging.git] / build_files / package_spec / pacman / PKGBUILD
1 # Maintainer: Campbell Barton <ideasman42 at gmail dot com>
2
3 # custom blender vars
4 blender_srcdir=$(dirname $startdir)"/../.."
5 # value may be formatted: 35042:35051M
6 blender_revision=$(svnversion $blender_srcdir | cut -d: -f2 | tr -dc 0-9)
7 blender_version=$(grep BLENDER_VERSION $blender_srcdir/source/blender/blenkernel/BKE_blender.h | tr -dc 0-9)
8 # blender_subversion=$(grep BLENDER_SUBVERSION $blender_srcdir/source/blender/blenkernel/BKE_blender.h | tr -dc 0-9)
9 blender_ver_string=$(expr $blender_version / 100).$(expr $blender_version % 100)+svn$blender_revision
10
11 pkgname=blender-snapshort
12 pkgver=$blender_ver_string
13 pkgrel=1
14 pkgdesc="A fully integrated 3D graphics creation suite"
15 arch=('i686' 'x86_64')
16 url="www.blender.org"
17 license=('GPL')
18 groups=()
19 depends=('libjpeg' 'libpng' 'openexr'  'python>=3.1' 'gettext' 'libxi' 'libxmu' 'mesa' 'freetype2' 'openal' 'sdl' 'libsndfile' 'libsamplerate' 'ffmpeg')
20 makedepends=('cmake' 'svn')
21 optdepends=()
22 provides=()
23 conflicts=('blender')
24 replaces=('blender')
25 backup=()
26 options=()
27 install=blender.install
28 # use current svn to make the package.
29 # source=(http://download.blender.org/source/$pkgname-$pkgver.tar.gz)
30 # md5sums=('27edb80c82c25252d43d6a01980d953a') #generate with 'makepkg -g'
31 source=()
32 md5sums=()
33 noextract=()
34
35 build() {
36   mkdir -p $srcdir/build
37   cd $srcdir/build
38   cmake $blender_srcdir \
39     -DCMAKE_INSTALL_PREFIX:PATH=/usr \
40     -DCMAKE_BUILD_TYPE:STRING=Release \
41     -DWITH_PYTHON_INSTALL:BOOL=OFF \
42     -DWITH_OPENCOLLADA:BOOL=OFF
43
44   make $MAKEFLAGS
45 }
46
47 package() {
48   cd $srcdir/build
49   make DESTDIR="$pkgdir" install
50   python -m compileall $pkgdir/usr/share/blender
51 }