blender/build_files/package_spec/build_debian.sh
Campbell Barton 44e33571ca part of a patch from Dan Eicher with some edits.
- clean svn string: 35042:35051M -> 35051
- debian and pacman build with threads by default.
2011-02-22 05:49:21 +00:00

37 lines
952 B
Bash
Executable File

#!/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.
# value may be formatted: 35042:35051M
BLENDER_REVISION=$(svnversion | cut -d: -f2 | tr -dc 0-9)
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
rm -rf get-orig-source
debian/rules get-orig-source SVN_URL=.
mv *.gz ../
# build the package
debuild -i -us -uc -b
# remove temp dir
rm -rf debian