File:  [ELWIX - Embedded LightWeight unIX -] / elwix / Attic / build_pkgsrc.sh
Revision 1.1.2.7: download - view: text, annotated - select for diffs - revision graph
Thu Mar 22 09:51:49 2012 UTC (12 years, 3 months ago) by misho
Branches: elwix1_6
add different behavior of build_pkgsrc.sh when change name with build_pkgsrc_native.sh

    1: #!/bin/sh
    2: #
    3: # ELWIX build script for pkgsrc
    4: #
    5: # (C) AITNET ltd - Sofia/Bulgaria <office@aitnet.org>
    6: #    by Michael Pounov <misho@elwix.org>
    7: #
    8: # ./build_package.sh <category/package_name> [options]
    9: #
   10: # $Id: build_pkgsrc.sh,v 1.1.2.7 2012/03/22 09:51:49 misho Exp $
   11: #
   12: 
   13: [ -r ./config/rc.pkg ] && . ./config/rc.pkg
   14: [ -r ./config/rc.elwix ] && . ./config/rc.elwix
   15: if [ X"${ELWIX_IS_CONFIGURED}" != X"YES" ]; then
   16: 	echo
   17: 	echo "ELWIX project is not configured !?!"
   18: 	echo
   19: 	exit 1
   20: fi
   21: #V=${VERSION}
   22: [ -r ${CENV} ] && . ${CENV}
   23: #unset INSTALL
   24: VERSION="${TARGET_BUILD}"
   25: 
   26: if [ ! -d $BSDSRC ]; then
   27: 	echo
   28: 	echo "ELWIX project is not configured - missing BSD sources !?!"
   29: 	echo
   30: 	exit 1
   31: fi
   32: 
   33: if [ ! -d $DEST ]; then
   34: 	echo
   35: 	echo "ELWIX project is not configured - missing Dest directory !?!"
   36: 	echo
   37: 	exit 1
   38: fi
   39: 
   40: if [ "${USER}" != "root" ]; then
   41: 	echo
   42: 	echo "Script must build under root"
   43: 	echo
   44: 	exit 1
   45: fi
   46: 
   47: ### main
   48: 
   49: if [ ! -r "${WORLD}/usr/pkgsrc" ]; then
   50: 	echo
   51: 	echo "Not configured pkgsrc!"
   52: 	echo
   53: 	exit 1
   54: else
   55: 	cd ${WORLD}/usr/pkgsrc
   56: fi
   57: 
   58: export USE_CROSS_COMPILE="yes"
   59: if [ "$(basename $0)" = "build_pkgsrc_native.sh" ]; then
   60: 	USE_CROSS_COMPILE="no"
   61: fi
   62: echo "+++ Cross compile of pkgsrc = $USE_CROSS_COMPILE"
   63: 
   64: if ! cd ${1:-NO}; then
   65: 	echo
   66: 	echo "Packet '$1' not exists ... (example package name: net/bmon)"
   67: 	echo
   68: 	exit 1
   69: else
   70: 	shift
   71: fi
   72: 
   73: bmake $*

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