script to build debian packages directly from svn, using blender version and svn...
authorCampbell Barton <ideasman42@gmail.com>
Thu, 10 Feb 2011 07:22:56 +0000 (07:22 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 10 Feb 2011 07:22:56 +0000 (07:22 +0000)
build_files/package_spec/build_debian.sh [new file with mode: 0644]
build_files/package_spec/debian/changelog
build_files/package_spec/debian/rules

diff --git a/build_files/package_spec/build_debian.sh b/build_files/package_spec/build_debian.sh
new file mode 100644 (file)
index 0000000..79d917b
--- /dev/null
@@ -0,0 +1,32 @@
+#!/bin/sh
+# Builds a debian package from SVN source.
+
+
+# this needs to run in the root dir.
+cd $(dirname $0)/../../
+ln -s $PWD/build_files/package_spec/debian $PWD/debian
+
+
+# Get values from blender to use in debian/changelog.
+BLENDER_REVISION=$(svnversion)
+
+blender_srcdir=$PWD
+blender_version=$(grep BLENDER_VERSION $blender_srcdir/source/blender/blenkernel/BKE_blender.h | tr -dc 0-9)
+BLENDER_VERSION=$(expr $blender_version / 100).$(expr $blender_version % 100)
+
+# replace changelog value
+svn revert debian/changelog
+sed -i 's/<VER>/'$BLENDER_VERSION'/g' debian/changelog
+sed -i 's/<REV>/'$BLENDER_REVISION'/g' debian/changelog
+
+
+# run the rules makefile
+debian/rules get-orig-source SVN_URL=.
+mv *.gz ../
+
+# build the package
+debuild -i -us -uc -b
+
+
+# remove symlink
+rm debian
index 0559bb0..a37e46f 100644 (file)
@@ -1,4 +1,4 @@
-blender (2.56+svn34749-bf) unstable; urgency=low
+blender (<VER>+svn<REV>-bf) unstable; urgency=low
 
   * New upstream SVN snapshot.
 
index 1e067a2..932ad19 100755 (executable)
@@ -1,5 +1,8 @@
 #!/usr/bin/make -f
 
+# blender spesific CMake options
+DEB_CMAKE_EXTRA_FLAGS := -DCMAKE_BUILD_TYPE:STRING=Release -DWITH_PYTHON_INSTALL:BOOL=OFF -DWITH_OPENCOLLADA:BOOL=OFF
+
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/class/cmake.mk