Add CentOS 5.x build Makefile for reference

This commit is contained in:
Brian West 2014-05-27 11:20:29 -05:00
parent 7c2b4381cf
commit 795d974955
1 changed files with 92 additions and 0 deletions

92
build/Makefile.centos5 Normal file
View File

@ -0,0 +1,92 @@
#
# FreeSWITCH auto-build Makefile (CentOS 5.10 Wingardium Leviosa Edition)
# http://www.freeswitch.org
# put this file anywhere and type make to
# create a fully-built freeswitch.git from scratch
# in that same directory.
#
# Brian West <brian@freeswitch.org>
#
FSPREFIX=/usr/local/freeswitch
PREFIX=/opt/fs-libs
JPEG=v8d
OPENSSL=1.0.1g
SQLITE=autoconf-3080403
PCRE=8.35
CURL=7.36.0
SPEEX=1.2rc1
LIBEDIT=20140213-3.1
LDNS=1.6.17
freeswitch: deps has-git freeswitch.git/Makefile
cd freeswitch.git && make
freeswitch.git/Makefile: freeswitch.git/configure
cd freeswitch.git && PKG_CONFIG_PATH=$(PREFIX)/lib/pkgconfig ./configure LDFLAGS='-L$(PREFIX)/lib -Wl,-rpath=$(PREFIX)/lib' CFLAGS='-I$(PREFIX)/include' --prefix=$(FSPREFIX)
freeswitch.git/configure: freeswitch.git/bootstrap.sh
cd freeswitch.git && sh bootstrap.sh
freeswitch.git/bootstrap.sh: has-git
test -d freeswitch.git || git clone git://git.freeswitch.org/freeswitch.git freeswitch.git
install: freeswitch
cd freeswitch.git && make install
install-git:
rpm -i http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
yum update -y
yum install -y git gcc-c++ wget ncurses-devel zlib-devel e2fsprogs-devel libtool automake autoconf
has-git:
@git --version || (echo "please install git by running 'make install-git'" && false)
libjpeg: jpeg-8d/Makefile
jpeg-8d/Makefile:
(test -d jpeg-8d) || (wget -4 -O jpegsrc.$(JPEG).tar.gz http://www.ijg.org/files/jpegsrc.$(JPEG).tar.gz && tar zxfv jpegsrc.$(JPEG).tar.gz)
(cd jpeg-8d && ./configure --prefix=$(PREFIX) && make && sudo make install)
openssl: openssl-$(OPENSSL)
openssl-$(OPENSSL):
(test -d $@) || (wget -4 -O $@.tar.gz http://www.openssl.org/source/$@.tar.gz && tar zxfv $@.tar.gz)
(cd $@ && ./Configure --prefix=$(PREFIX) linux-x86_64 shared && make && sudo make install)
sqlite: sqlite-$(SQLITE)
sqlite-$(SQLITE):
(test -d $@) || (wget -4 -O $@.tar.gz http://www.sqlite.org/2014/$@.tar.gz && tar zxfv $@.tar.gz)
(cd $@ && ./configure --prefix=$(PREFIX) && make && sudo make install)
pcre: pcre-$(PCRE)
pcre-$(PCRE):
(test -d $@) || (wget -4 -O $@.tar.gz http://downloads.sourceforge.net/project/pcre/pcre/$(PCRE)/$@.tar.gz && tar zxfv $@.tar.gz)
(cd $@ && ./configure --prefix=$(PREFIX) && make && sudo make install)
curl: curl-$(CURL)
curl-$(CURL):
(test -d $@) || (wget -4 -O $@.tar.gz http://curl.haxx.se/download/$@.tar.gz && tar zxfv $@.tar.gz)
(cd $@ && ./configure --prefix=$(PREFIX) && make && sudo make install)
speex: speex-$(SPEEX)
speex-$(SPEEX):
(test -d $@) || (wget -4 -O $@.tar.gz http://downloads.xiph.org/releases/speex/$@.tar.gz && tar zxfv $@.tar.gz)
(cd $@ && ./configure --prefix=$(PREFIX) && make && sudo make install)
libedit: libedit-$(LIBEDIT)
libedit-$(LIBEDIT):
(test -d $@) || (wget -4 -O $@.tar.gz http://thrysoee.dk/editline/$@.tar.gz && tar zxfv $@.tar.gz)
(cd $@ && ./configure --prefix=$(PREFIX) && make && sudo make install)
ldns: ldns-$(LDNS)
ldns-$(LDNS): openssl
(test -d $@) || (wget -4 -O $@.tar.gz http://www.nlnetlabs.nl/downloads/ldns/$@.tar.gz && tar zxfv $@.tar.gz)
(cd $@ && ./configure --with-ssl=$(PREFIX) --prefix=$(PREFIX) && make && sudo make install)
deps: libjpeg openssl sqlite pcre curl speex libedit ldns