From bf197196a61e2f47e112ed0c0fe98feb0eef2419 Mon Sep 17 00:00:00 2001 From: Brian West Date: Fri, 18 Jul 2014 14:24:44 -0500 Subject: [PATCH] OpenBSD Auto Build --- build/Makefile.openbsd | 51 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 build/Makefile.openbsd diff --git a/build/Makefile.openbsd b/build/Makefile.openbsd new file mode 100644 index 0000000000..88c129b375 --- /dev/null +++ b/build/Makefile.openbsd @@ -0,0 +1,51 @@ +# +# FreeSWITCH auto-build Makefile (OpenBSD 5.x) +# http://www.freeswitch.org +# put this file anywhere and type make to +# create a fully-built freeswitch.git from scratch +# in that same directory. +# +# + +PKG=rsync-3.1.0 git automake-1.14.1 autoconf-2.69p1 libtool gmake bzip2 jpeg wget pcre speex libldns +FSPREFIX=/usr/local/freeswitch +PREFIX=$(FSPREFIX) +OPENSSL=1.0.1h +LIBEDIT=20140618-3.1 + +freeswitch: has-git deps freeswitch.git/Makefile + AUTOCONF_VERSION=2.69 AUTOMAKE_VERSION=1.14 LIBTOOL=/usr/local/bin/libtoolize gmake + +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 && AUTOCONF_VERSION=2.69 AUTOMAKE_VERSION=1.14 LIBTOOL=/usr/local/bin/libtoolize sh bootstrap.sh + +freeswitch.git/bootstrap.sh: has-git + test -d freeswitch.git || git clone https://stash.freeswitch.org/scm/fs/freeswitch.git freeswitch.git + +install: + cd freeswitch.git && AUTOCONF_VERSION=2.69 AUTOMAKE_VERSION=1.14 LIBTOOL=/usr/local/bin/libtoolize gmake install + +clean: + @rm -rf openssl* ldns* jpeg* pcre* perl* pkg-config* speex* sqlite* libedit* curl* *~ + (cd freeswitch.git && git clean -fdx && git reset --hard HEAD && git pull) + +has-git: + @git --version || pkg install git + +deps: libedit openssl + @PKG_PATH=http://openbsd.mirrors.pair.com/`uname -r`/packages/`machine -a`/ pkg_add -r $(PKG) + +openssl: openssl-$(OPENSSL)/Makefile +openssl-$(OPENSSL)/Makefile: 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) BSD-x86_64 shared && make && sudo make install) + +libedit: libedit-$(LIBEDIT)/Makefile +libedit-$(LIBEDIT)/Makefile: 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)