Index: mediatomb/mediatomb-mock-build.sh =================================================================== --- mediatomb/mediatomb-mock-build.sh (revision 5) +++ mediatomb/mediatomb-mock-build.sh (revision 5) @@ -0,0 +1,42 @@ +#!/bin/sh + +set -e -x + +mock_args="-r epel-4-i386 --uniqueext=mediatomb_build" + +# Initialize the chroot +mock ${mock_args} --init + +# Install some more dependencies +mock ${mock_args} --install autoconf zlib-devel automake gtk+-devel libtool ncurses-devel expat-devel + +# Find out the homedir of the mockbuild user +mock_home=$(mock ${mock_args} -q --shell "runuser - mockbuild -c pwd") +build_dir="${mock_home}/mediatomb" + +# Copy the sources into the mediatomb build dir +mock ${mock_args} --copyin \ + . \ + ${build_dir} + +# Change ownership information +mock ${mock_args} --chroot "chown -R mockbuild.mockbuild ${build_dir}" + +# Build the stuff +mock ${mock_args} --chroot "runuser - mockbuild -c 'cd ${build_dir}; ./build.sh'" + +# Build the release itself +mock ${mock_args} --chroot "runuser - mockbuild -c 'cd ${build_dir}; ./release.sh'" + +# Find the finished builds +files=$(mock ${mock_args} -q --shell "runuser - mockbuild -c \"cd ${build_dir}; ls *.mod *-src.tar.gz\"") + +# Retrieve module and sources +for file in $files; do +mock ${mock_args} --copyout \ + ${build_dir}/${file} \ + . +done + +# Clean out +mock ${mock_args} --clean