source: ocsinventory-agent/trunk/fuentes/tools/build-perl-tree.sh @ 468

Last change on this file since 468 was 468, checked in by mabarracus, 4 years ago

Copyt trusty code

  • Property svn:executable set to *
File size: 2.4 KB
Line 
1#!/bin/sh
2# A script to prepare a installation of Perl + OCSInventory-agent for
3# Unix/Linux
4# This in order to be able to provide an installation for system without
5# Perl > 5.6
6
7set -e
8
9MAKE="make"
10TMP="/home2/goneri/tmp"
11PREFIX="$TMP/build/opt/ocsinventory-agent"
12
13ETCDIR="$PREFIX/etc"
14BASEDIR="$PREFIX/var/ocsinventory-agent"
15LOGDIR="$PREFIX/log/ocsinventory-agent"
16PIDFILE="$PREFIX/var/run"
17PERLVERSION="5.10.0"
18
19if [ ! -d $TMP ]; then
20  echo "tmp $TMP dir is missing"
21fi
22cd $TMP
23if [ ! -f perl-$PERLVERSION.tar.gz ]; then
24  wget -O perl-$PERLVERSION.tar.gz.part http://cpan.perl.org/src/perl-$PERLVERSION.tar.gz
25  mv perl-$PERLVERSION.tar.gz.part perl-$PERLVERSION.tar.gz
26fi
27gunzip < perl-$PERLVERSION.tar.gz | tar xvf -
28cd perl-$PERLVERSION
29
30# AIX
31#./Configure -Dusenm -des -Dinstallprefix=$PREFIX -Dsiteprefix=$PREFIX -Dprefix=$PREFIX
32#./Configure -Dcc="gcc" -des -Dinstallprefix=$PREFIX -Dsiteprefix=$PREFIX -Dprefix=$PREFIX
33./Configure -des -Dinstallprefix=$PREFIX -Dsiteprefix=$PREFIX -Dprefix=$PREFIX
34$MAKE
35$MAKE install
36
37PATH=$PREFIX/bin:$PATH
38export PATH
39cpanp 's conf prereqs 1; i XML::SAX'
40cpanp 's conf prereqs 1; i XML::Simple'
41cpanp 's conf prereqs 1; i LWP'
42cpanp 's conf prereqs 1; i Proc::Daemon'
43cpanp 's conf prereqs 1; i HTML::Parser' # For what?
44# Report error about IPv6 on Solaris 10
45cpanp 's conf prereqs 1; i --force Net::IP'
46cpanp 's conf prereqs 1; i --force PAR::Packer'
47cpanp 's conf prereqs 1; i --force Net::SSLeay'
48
49exit;
50
51if [ ! openssl-0.9.8j.tar.gz ]; then
52  wget -O openssl-0.9.8j.tar.gz.part http://www.openssl.org/source/openssl-0.9.8j.tar.gz
53  mv openssl-0.9.8j.tar.gz.part openssl-0.9.8j.tar.gz
54fi 
55gunzip < openssl-0.9.8j.tar.gz | tar xvf -
56cd openssl-0.9.8j
57./config --prefix=/home2/goneri/tmp/openssl
58make
59make install
60ln -s apps bin
61
62#for i in `ls ../tarballs/*.gz`; do
63#  gunzip < $i | tar xvf -
64#done
65
66#cd ../expat-2.0.0/
67#./configure --prefix=$PREFIX
68#$MAKE
69#cd ../Ocsinventory-Agent-0.0.2/
70#$PERL Makefile.PL PREFIX=$PREFIX
71#$MAKE PREFIX=$PREFIX
72#$MAKE install PREFIX=$PREFIX
73
74#:$PATH#perl -i -pe "s!/etc/ocsinventory-agent!$ETCDIR!" $PREFIX/bin/ocsinventory-agent
75#perl -i -pe "s!/var/lib/ocsinventory-agent!$BASEDIR!" $PREFIX/bin/ocsinventory-agent
76#perl -i -pe "s!/var/log/ocsinventory-agent!$LOGDIR!" $PREFIX/bin/ocsinventory-agent
77#perl -i -pe "s!/var/run/ocsinventory-agent.pid!$PIDFILE!" $PREFIX/bin/ocsinventory-agent
78
79#mkdir -p $ETCDIR
80#mkdir -p $BASEDIR
81#mkdir -p $LOGDIR
82#mkdir -p $PIDFILE
Note: See TracBrowser for help on using the repository browser.