70
# veebers: skipped a bunch of the example, this was within the chrooted section:
71
export BUILD_DIR=$(readlink -f ".")
72
export RESULT_DIR=$result_dir
75
"./D00dependency_hooks"
70
if [ -z "$target_branch" ]; then
71
# pull main branch and merge in packaging branch
72
bzr branch $main_branch "$work_dir/trunk"
76
bzr branch "$target_branch" "$work_dir/trunk"
78
bzr merge "$main_branch"
82
bzr checkout "$packaging_branch" packaging
83
if [ -d 'packaging/debian' ]; then
84
#mv packaging/debian .
85
mv packaging/debian trunk/debian
88
echo "Packaging branch doesn't include packaging information. Aborting"
94
# This is potentially dangerous
95
# but we force a native source format
96
# to prevent from dpkg-buildpackage bailing out
97
if [ -f "debian/source/format" ]; then
98
sed -i 's/quilt/native/g' debian/source/format
100
mkdir -p debian/source
101
echo '3.0 (native)' > debian/source/format
104
# Extract some packaging information
105
version=`dpkg-parsechangelog | awk '/^Version/ {print $2}' | sed -e "s/\(.*\)-[0-9]ubuntu.*/\1/"`+bzr${trunkrev}
106
version=${version}ubuntu0+${packaging_rev}
107
sourcename=`dpkg-parsechangelog | awk '/^Source/ {print $2}'`
108
# Generate the actual source package
110
tar -czf ${sourcename}_${version}.orig.tar.gz trunk
115
if [ -z "$chrooted" ]; then
116
trunk_dir=$(readlink -f ".")
118
export BUILD_DIR=$(readlink -f ".")
119
export RESULT_DIR=$result_dir
122
"./D00dependency_hooks"
126
#sed -i 's/\({GTEST_TEST_COMMAND[_a-zA-Z]*}\)/\1 --gtest_output=xml:.\//' tests/CMakeLists.txt
128
#head -n19 CMakeLists.txt > a.txt
130
#option (USE_GCOV "Use coverage profiling for this build" ON)
132
# set (CMAKE_CXX_FLAGS "\${CMAKE_CXX_FLAGS} -O0 --coverage ")
135
#tail -n+20 CMakeLists.txt >> a.txt
136
#mv a.txt CMakeLists.txt
138
mk-build-deps --install --tool 'apt-get -y --force-yes' --build-dep debian/control
139
export DEB_CXXFLAGS_STRIP="-O2"
140
export DEB_CPPFLAGS_STRIP="-O2"
141
export DEB_CFLAGS_STRIP="-O2"
142
export DEB_FFLAGS_STRIP="-O2"
143
yes | debuild -uc -us -d
148
echo "Would use pdbuilder"