Refactoring the structure of our images
[people/jschlag/pbs-docker.git] / src / pakfire / setup-org.sh
1 #!/bin/bash
2 #
3 #settings
4 #
5 #="database"
6
7 log() {
8 echo "#######################################"
9 echo ""
10 echo "$@"
11 echo ""
12 echo "#######################################"
13 }
14
15 # build the pbs from master branch
16 log "Update all packages"
17 yum update -y
18 log "Installing epel"
19 yum install -y epel-release
20 build_deps="git gcc make autoconf libtool intltool libcap-devel libsolv-devel python-devel xz-devel"
21 deps="libcap libsolv xz python"
22
23 log "Installing dependencies"
24 yum install -y ${deps}
25 log "Installing packages for build"
26 yum install -y ${build_deps}
27
28 mkdir -p /opt/dev
29 log "Building pakfire"
30 cd /opt/dev
31 git clone -b master http://git.ipfire.org/pub/git/pakfire.git
32 cd pakfire
33 ./autogen.sh
34 ./configure --prefix=/usr
35 make
36 make install
37
38 # cleanup
39 yum remove -y ${build_deps}
40 yum autoremove -y
41 yum clean all
42 rm -rf /var/tmp/* /var/cache/yum/* /opt/dev/*