Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'build_files/package_spec/build_debian.sh')
-rw-r--r--build_files/package_spec/build_debian.sh34
1 files changed, 34 insertions, 0 deletions
diff --git a/build_files/package_spec/build_debian.sh b/build_files/package_spec/build_debian.sh
new file mode 100644
index 00000000000..17c0abb888b
--- /dev/null
+++ b/build_files/package_spec/build_debian.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+# Builds a debian package from SVN source.
+#
+# For paralelle builds use:
+# DEB_BUILD_OPTIONS="parallel=5" sh build_files/package_spec/build_debian.sh
+
+# this needs to run in the root dir.
+cd $(dirname $0)/../../
+rm -rf debian
+cp -a build_files/package_spec/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)
+DEB_VERSION=${BLENDER_VERSION}+svn${BLENDER_REVISION}-bf
+
+# update debian/changelog
+dch -b -v $DEB_VERSION "New upstream SVN snapshot."
+
+
+# run the rules makefile
+debian/rules get-orig-source SVN_URL=.
+mv *.gz ../
+
+# build the package
+debuild -i -us -uc -b
+
+
+# remove temp dir
+rm -rf debian