mail scripts.
[myplc.git] / build-native.sh
1 #!/bin/bash
2 #
3 # Builds MyPLC, either inside the MyPLC development environment in
4 # devel/root (if PLC_DEVEL_BOOTSTRAP is true), or in the current host
5 # environment (may be itself a MyPLC development environment or a
6 # Fedora environment with the appropriate development packages
7 # installed).
8 #
9 # Marc E. Fiuczynski <mef@cs.princeton.edu>
10 # Copyright (C) 2007 The Trustees of Princeton University
11 #
12 # $Id$
13 #
14
15 . build.functions
16
17 # XXX .spec file needs to have the appropriate set of requires statements
18
19 # Install configuration scripts
20 echo "* myplc-native: Installing configuration scripts"
21 tmpdir=$1
22 mkdir -p ${tmpdir}
23 rm -rf ${tmpdir}
24 mkdir -p ${tmpdir}
25 install -D -m 755 plc-config ${tmpdir}/usr/bin/plc-config
26 install -D -m 755 plc-config-tty ${tmpdir}/usr/bin/plc-config-tty
27 install -D -m 755 db-config ${tmpdir}/usr/bin/db-config
28 install -D -m 755 dns-config ${tmpdir}/usr/bin/dns-config
29 install -D -m 755 plc-map.py ${tmpdir}/usr/bin/plc-map.py
30 install -D -m 755 clean-empty-dirs.py ${tmpdir}/usr/bin/clean-empty-dirs.py
31 install -D -m 755 mtail.py ${tmpdir}/usr/bin/mtail.py
32 install -D -m 755 check-ssl-peering.py ${tmpdir}/usr/bin/check-ssl-peering.py
33
34 echo "* myplc-native: installing plc_config.py in /usr/share/myplc"
35 install -D -m 755 plc_config.py ${tmpdir}/usr/share/myplc/plc_config.py
36
37 # Install initscripts
38 echo "* myplc-native: Installing initscripts"
39 find plc.d | cpio -p -d -u ${tmpdir}/etc/
40 install -D -m 755 guest.init ${tmpdir}/etc/init.d/plc
41
42
43 # Install configuration file
44 echo "* myplc: Installing configuration file"
45 install -D -m 444 default_config.xml ${tmpdir}/etc/planetlab/default_config.xml
46 install -D -m 444 plc_config.dtd ${tmpdir}/etc/planetlab/plc_config.dtd
47
48 # Initialize node RPMs directory. The PlanetLab-Bootstrap.tar.bz2
49 # tarball already contains all of the node RPMs pre-installed. Only
50 # updates or optional packages should be placed in this directory.
51 install -D -m 644 $pl_DISTRO_YUMGROUPS \
52     ${tmpdir}/var/www/html/install-rpms/planetlab/yumgroups.xml
53
54 exit 0