spec files for building arch linux packages (pacman)
authorCampbell Barton <ideasman42@gmail.com>
Sun, 12 Sep 2010 16:00:12 +0000 (16:00 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 12 Sep 2010 16:00:12 +0000 (16:00 +0000)
build_files/package_spec/pacman/PKGBUILD [new file with mode: 0644]
build_files/package_spec/pacman/blender.install [new file with mode: 0644]

diff --git a/build_files/package_spec/pacman/PKGBUILD b/build_files/package_spec/pacman/PKGBUILD
new file mode 100644 (file)
index 0000000..c419ce9
--- /dev/null
@@ -0,0 +1,48 @@
+# Maintainer: Campbell Barton <ideasman42 at gmail dot com>
+
+# custom blender vars
+blender_srcdir=$srcdir/../../../..
+blender_version=$(grep BLENDER_VERSION $blender_srcdir/source/blender/blenkernel/BKE_blender.h | tr -dc 0-9)
+blender_subversion=$(grep BLENDER_SUBVERSION $blender_srcdir/source/blender/blenkernel/BKE_blender.h | tr -dc 0-9)
+blender_ver_string=$(expr $blender_version / 100).$(expr $blender_version % 100).$blender_subversion
+
+pkgname=blender-beta
+pkgver=$blender_ver_string
+pkgrel=1
+pkgdesc="A fully integrated 3D graphics creation suite"
+arch=('i686' 'x86_64')
+url="www.blender.org"
+license=('GPL')
+groups=()
+depends=('libjpeg' 'libpng' 'openexr'  'python3>=3.1' 'gettext' 'libxi' 'libxmu' 'mesa' 'freetype2' 'openal' 'sdl' 'libsndfile' 'libsamplerate' 'ffmpeg')
+makedepends=('cmake' 'svn')
+optdepends=()
+provides=('blender')
+conflicts=('blender')
+replaces=()
+backup=()
+options=()
+install=blender.install
+# use current svn to make the package.
+# source=(http://download.blender.org/source/$pkgname-$pkgver.tar.gz)
+# md5sums=('27edb80c82c25252d43d6a01980d953a') #generate with 'makepkg -g'
+source=()
+md5sums=()
+noextract=()
+
+build() {
+  mkdir -p $srcdir/build
+  cd $srcdir/build
+  cmake $blender_srcdir \
+    -DCMAKE_INSTALL_PREFIX:PATH=/usr \
+    -DCMAKE_BUILD_TYPE:STRING=Release \
+    -DWITH_PYTHON_INSTALL:BOOL=OFF \
+    -DWITH_OPENCOLLADA:BOOL=OFF
+
+  make
+}
+
+package() {
+  cd $srcdir/build
+  make DESTDIR="$pkgdir" install
+}
diff --git a/build_files/package_spec/pacman/blender.install b/build_files/package_spec/pacman/blender.install
new file mode 100644 (file)
index 0000000..f2d37ec
--- /dev/null
@@ -0,0 +1,29 @@
+post_install() {
+  cat << EOF
+
+NOTE
+----
+Happy blending!
+
+EOF
+  echo "update desktop mime database..."
+  update-desktop-database
+}
+
+post_upgrade() {
+  post_install $1
+}
+
+pre_remove() {
+  /bin/true
+}
+
+post_remove() {
+  echo "update desktop mime database..."
+  update-desktop-database
+}
+
+op=$1
+shift
+
+$op $*