2011-02-10 07:22:56 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# Builds a debian package from SVN source.
|
2011-02-11 10:29:47 +00:00
|
|
|
#
|
|
|
|
# For paralelle builds use:
|
|
|
|
# DEB_BUILD_OPTIONS="parallel=5" sh build_files/package_spec/build_debian.sh
|
2011-02-10 07:22:56 +00:00
|
|
|
|
|
|
|
# this needs to run in the root dir.
|
|
|
|
cd $(dirname $0)/../../
|
2011-02-11 10:29:47 +00:00
|
|
|
rm -rf debian
|
|
|
|
cp -a build_files/package_spec/debian .
|
2011-02-10 07:22:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
# 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)
|
2011-02-14 06:04:40 +00:00
|
|
|
BLENDER_VERSION=$(expr $blender_version / 100).$(expr $blender_version % 100)
|
2011-02-11 10:29:47 +00:00
|
|
|
DEB_VERSION=${BLENDER_VERSION}+svn${BLENDER_REVISION}-bf
|
2011-02-10 07:22:56 +00:00
|
|
|
|
2011-02-11 10:29:47 +00:00
|
|
|
# update debian/changelog
|
|
|
|
dch -b -v $DEB_VERSION "New upstream SVN snapshot."
|
2011-02-10 07:22:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
# run the rules makefile
|
2011-02-17 11:49:54 +00:00
|
|
|
rm -rf get-orig-source
|
2011-02-10 07:22:56 +00:00
|
|
|
debian/rules get-orig-source SVN_URL=.
|
|
|
|
mv *.gz ../
|
|
|
|
|
|
|
|
# build the package
|
|
|
|
debuild -i -us -uc -b
|
|
|
|
|
|
|
|
|
2011-02-11 10:29:47 +00:00
|
|
|
# remove temp dir
|
|
|
|
rm -rf debian
|