patch [#26063] Fix deb package versioning (Patch for #26062)
[blender.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 blender_revision=$(svnversion $blender_srcdir)
6 blender_version=$(grep BLENDER_VERSION $blender_srcdir/source/blender/blenkernel/BKE_blender.h | tr -dc 0-9)
7 # blender_subversion=$(grep BLENDER_SUBVERSION $blender_srcdir/source/blender/blenkernel/BKE_blender.h | tr -dc 0-9)
8 blender_ver_string=$(expr $blender_version / 100).$(expr $blender_version % 100)+svn$blender_revision
9
10 pkgname=blender-snapshort
11 pkgver=$blender_ver_string
12 pkgrel=1
13 pkgdesc="A fully integrated 3D graphics creation suite"
14 arch=('i686' 'x86_64')
15 url="www.blender.org"
16 license=('GPL')
17 groups=()
18 depends=('libjpeg' 'libpng' 'openexr'  'python>=3.1' 'gettext' 'libxi' 'libxmu' 'mesa' 'freetype2' 'openal' 'sdl' 'libsndfile' 'libsamplerate' 'ffmpeg')
19 makedepends=('cmake' 'svn')
20 optdepends=()
21 provides=()
22 conflicts=('blender')
23 replaces=('blender')
24 backup=()
25 options=()
26 install=blender.install
27 # use current svn to make the package.
28 # source=(http://download.blender.org/source/$pkgname-$pkgver.tar.gz)
29 # md5sums=('27edb80c82c25252d43d6a01980d953a') #generate with 'makepkg -g'
30 source=()
31 md5sums=()
32 noextract=()
33
34 build() {
35   mkdir -p $srcdir/build
36   cd $srcdir/build
37   cmake $blender_srcdir \
38     -DCMAKE_INSTALL_PREFIX:PATH=/usr \
39     -DCMAKE_BUILD_TYPE:STRING=Release \
40     -DWITH_PYTHON_INSTALL:BOOL=OFF \
41     -DWITH_OPENCOLLADA:BOOL=OFF
42
43   make
44 }
45
46 package() {
47   cd $srcdir/build
48   make DESTDIR="$pkgdir" install
49   python -m compileall $pkgdir/usr/share/blender
50 }