root/ladvd/ladvd-mock-build.sh

Revision 2, 1.0 kB (checked in by ixs, 13 years ago)

directory reorganization

  • Property svn:executable set to *
Line 
1 #!/bin/sh
2
3 set -e -x
4
5 mock_args="-r epel-4-i386 --uniqueext=ladvd_build"
6
7 # Initialize the chroot
8 mock ${mock_args} --init
9
10 # Install some more dependencies
11 mock ${mock_args} --install libevent-devel
12
13 # Find out the homedir of the mockbuild user
14 mock_home=$(mock ${mock_args} -q --shell "runuser - mockbuild -c pwd")
15 build_dir="${mock_home}/ladvd"
16
17 # Copy the sources into the mediatomb build dir
18 mock ${mock_args} --copyin \
19         . \
20         ${build_dir}
21
22 # Change ownership information
23 mock ${mock_args} --chroot "chown -R mockbuild.mockbuild ${build_dir}"
24
25 # Build the stuff
26 mock ${mock_args} --chroot "runuser - mockbuild -c 'cd ${build_dir}; ./build.sh'"
27
28 # Build the release itself
29 mock ${mock_args} --chroot "runuser - mockbuild -c 'cd ${build_dir}; ./release.sh'"
30
31 # Find the finished builds
32 files=$(mock ${mock_args} -q --shell "runuser - mockbuild -c \"cd ${build_dir}; ls *.mod *-src.tar.gz\"")
33
34 # Retrieve module and sources
35 for file in $files; do
36 mock ${mock_args} --copyout \
37         ${build_dir}/${file} \
38         .
39 done
40
41 exit 1
42
43 # Clean out
44 mock ${mock_args} --clean
Note: See TracBrowser for help on using the browser.