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.
|
2011-02-22 05:49:21 +00:00
|
|
|
# value may be formatted: 35042:35051M
|
|
|
|
BLENDER_REVISION=$(svnversion | cut -d: -f2 | tr -dc 0-9)
|
2011-02-10 07:22:56 +00:00
|
|
|
|
2011-02-24 14:03:29 +00:00
|
|
|
blender_version=$(grep BLENDER_VERSION source/blender/blenkernel/BKE_blender.h | tr -dc 0-9)
|
|
|
|
blender_version_char=$(sed -ne 's/.*BLENDER_VERSION_CHAR.*\([a-z]\)$/\1/p' source/blender/blenkernel/BKE_blender.h)
|
2011-02-14 06:04:40 +00:00
|
|
|
BLENDER_VERSION=$(expr $blender_version / 100).$(expr $blender_version % 100)
|
2011-02-24 14:03:29 +00:00
|
|
|
|
|
|
|
# map the version a -> 1, to conform to debian naming convention
|
|
|
|
# not to be confused with blender's internal subversions
|
|
|
|
if [ "$blender_version_char" ]; then
|
|
|
|
BLENDER_VERSION=${BLENDER_VERSION}.$(expr index abcdefghijklmnopqrstuvwxyz $blender_version_char)
|
|
|
|
fi
|
|
|
|
|
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
|