File:  [ELWIX - Embedded LightWeight unIX -] / elwix / build_3thparty.sh
Revision 1.2: download - view: text, annotated - select for diffs - revision graph
Fri Oct 12 08:22:42 2012 UTC (11 years, 7 months ago) by misho
Branches: MAIN
CVS tags: elwix1_9_mips, elwix1_9, elwix1_8, elwix1_7, HEAD, ELWIX1_8, ELWIX1_7, ELWIX1_6
ELWIX 1.6

#!/bin/sh
#
# ELWIX build script for cross compiling 3th party software
#
# (C) AITNET ltd - Sofia/Bulgaria <office@aitnet.org>
#    by Michael Pounov <misho@elwix.org>
#
# $Id: build_3thparty.sh,v 1.2 2012/10/12 08:22:42 misho Exp $
#

[ -r ./config/rc.elwix ] && . ./config/rc.elwix
if [ X"${ELWIX_IS_CONFIGURED}" != X"YES" ]; then
	echo
	echo "ELWIX project is not configured !?!"
	echo
	exit 1
fi
V=${VERSION}
[ -r ${CENV} ] && . ${CENV}
unset INSTALL
unset VERSION
VERSION="$V"

if [ ! -d $BSDSRC ]; then
	echo
	echo "ELWIX project is not configured - missing BSD sources !?!"
	echo
	exit 1
fi

if [ ! -d $DEST ]; then
	echo
	echo "ELWIX project is not configured - missing Dest directory !?!"
	echo
	exit 1
fi

clean_3th()
{
	echo "+++ Clean ELWIX 3th party ..."

	rm -rf ${PKG}
	install -d ${PKG}
	install -d ${PKG}/bin
	install -d ${PKG}/etc
	install -d ${PKG}/include
	install -d ${PKG}/man
	install -d ${PKG}/lib
	install -d ${PKG}/libexec
	install -d ${PKG}/sbin
}

compile_3th()
{
	echo "+++ Compile ELWIX 3th party ..."

	cd $CROSS_3TH
	./build.sh expat ${CBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	./build.sh libevent ${CBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	./build.sh libiconv ${CGBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	./build.sh pcre ${CBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	./build.sh mini_sendmail ${CBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	./build.sh choparp ${CBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	./build.sh scan_ffs ${CBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	./build.sh pciutils ${CGBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	./build.sh istgt ${CBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	./build.sh rsync ${CBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	./build.sh ttcp ${CBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	./build.sh mpd ${CBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	./build.sh mrouted ${CGBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	./build.sh igmpproxy ${CBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	./build.sh sudo ${CBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	./build.sh bmon ${CGBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	./build.sh mtr ${CBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	./build.sh ipguard ${CBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	./build.sh smartmontools ${CBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	./build.sh quagga ${CBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	./build.sh coova-chilli ${CBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	./build.sh iftop ${CBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	./build.sh arping ${CBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	./build.sh hping2 ${CGBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	./build.sh trafshow ${CBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	./build.sh ipsec-tools ${CBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	./build.sh dhcp ${CBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	./build.sh dhcdrop ${CBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	./build.sh dhcping ${CBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	./build.sh miniupnpd ${CBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	./build.sh miniupnpc ${CGBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	./build.sh ntp ${CBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	./build.sh libxml2 ${CBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	./build.sh php ${CBUILD} ${PKG} ${TARGET_BUILD}
	[ $? -ne 0 ] && exit 1
	cd -

	echo "ELWIX Platform:${PLATFORM} Version:${VERSION} TargetArch:${TARGET_ARCH}" >${PKG}/elwix.ver
}

### main()
if ! SnitVer ${PKG}/elwix.ver; then
	clean_3th
	compile_3th
else
	echo "Skipped ELWIX 3th party build ..."
fi

echo "+++ Complete build ELWIX 3th party"

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>