File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / build.sh
Revision 1.5.2.4: download - view: text, annotated - select for diffs - revision graph
Wed Nov 2 01:04:13 2011 UTC (12 years, 7 months ago) by misho
Branches: elwix1_5
Diff to: branchpoint 1.5: preferred, unified
fix ralated to buggy behavior of libxml2 in php

    1: #!/bin/sh
    2: #
    3: # (C)`10 PKG-Builder for ELWIX by Michael Pounov <misho@elwix.org>
    4: #
    5: # ./build.sh [package] [os_specific_build_set] [prefix_dir] [other_make_opts ...]
    6: #
    7: # $Id: build.sh,v 1.5.2.4 2011/11/02 01:04:13 misho Exp $
    8: #
    9: 
   10: CMD=$1
   11: MK=${2:-make}
   12: P=${3:-/tmp}
   13: B=$4
   14: PFX="--prefix ${P}"
   15: shift; shift; shift; shift;
   16: echo ">>> Working script ${MK} into ${PFX}"
   17: 
   18: if [ -n "${B}" ]; then
   19: 	PFX="${PFX} --build ${B}"
   20: fi
   21: 
   22: TOP=$(pwd)
   23: echo ">>> TOPDIR=${TOP}"
   24: 
   25: case $CMD in
   26: 	sudo)
   27: 		cd sudo
   28: #		[ ! -r config.log ] && \
   29: 		./configure --sysconfdir=/etc --libexecdir=/usr/libexec --with-ignore-dot \
   30: 					--with-tty-tickets --with-env-editor --with-logincap \
   31: 					--with-long-otp-prompt --with-pam --with-logfac=local2 \
   32: 					${PFX}
   33: 		${MK} clean
   34: 		${MK}
   35: 		install src/sudo ${P}/bin
   36: 		ln ${P}/bin/sudo ${P}/bin/sudoedit
   37: 		install plugins/sudoers/sudoreplay ${P}/bin
   38: 		install plugins/sudoers/visudo ${P}/sbin
   39: 		install plugins/sudoers/.libs/sudoers.so ${P}/libexec
   40: 		install src/.libs/libsudo_noexec.so ${P}/libexec
   41: 		echo ">>> Now rebuild elwix firmware image ..."
   42: 		;;
   43: 	ntpd)
   44: 		cd ntpd
   45: 		${MK} clean
   46: 		${MK}
   47: 		install ntpd ${P}/sbin
   48: 		echo ">>> Now rebuild elwix firmware image ..."
   49: 		;;
   50: 	expat)
   51: 		cd expat
   52: #		[ ! -r config.log ] && \
   53: 		./configure ${PFX}
   54: 		${MK} clean
   55: 		${MK}
   56: 		${MK} install
   57: 		echo ">>> Now rebuild elwix firmware image ..."
   58: 		;;
   59: 	mpd)
   60: 		cd libpdel
   61: 		${MK} clean
   62: 		${MK}
   63: 		find . -name \*.so\* -type f -exec install {} ${P}/lib \;
   64: 		cd ..
   65: 		cd mpd/src
   66: 		${MK} clean
   67: 		${MK}
   68: 		install mpd5 ${P}/sbin
   69: 		echo ">>> Now rebuild elwix firmware image ..."
   70: 		;;
   71: 	libevent)
   72: 		cd libevent
   73: #		[ ! -r config.log ] && \
   74: 		./configure ${PFX}
   75: 		${MK} clean
   76: 		${MK}
   77: 		${MK} install
   78: 		echo ">>> Now rebuild elwix firmware image ..."
   79: 		;;
   80: 	mini_sendmail)
   81: 		cd mini_sendmail
   82: 		${MK} clean
   83: 		${MK}
   84: 		install mini_sendmail ${P}/sbin
   85: 		echo ">>> Now rebuild elwix firmware image ..."
   86: 		;;
   87: 	choparp)
   88: 		cd choparp
   89: 		rm -f choparp
   90: 		${MK} choparp
   91: 		install choparp ${P}/sbin
   92: 		echo ">>> Now rebuild elwix firmware image ..."
   93: 		;;
   94: 	ttcp)
   95: 		cd ttcp
   96: 		rm -f ttcp
   97: 		${MK} ttcp
   98: 		install ttcp ${P}/bin
   99: 		echo ">>> Now rebuild elwix firmware image ..."
  100: 		;;
  101: 	ifstated)
  102: 		cd ifstated
  103: 		${MK} clean
  104: 		${MK}
  105: 		install ifstated ${P}/sbin
  106: 		echo ">>> Now rebuild elwix firmware image ..."
  107: 		;;
  108: 	trafshow)
  109: 		cd trafshow
  110: #		[ ! -r config.log ] && \
  111: 		./configure --sysconfdir=/etc ${PFX}
  112: 		${MK} clean
  113: 		${MK}
  114: 		${MK} install
  115: 		echo ">>> Now rebuild elwix firmware image ..."
  116: 		;;
  117: 	ipsec-tools)
  118: 		cd ipsec-tools
  119: 		./configure --enable-shared --sysconfdir=/etc/racoon --localstatedir=/var/db \
  120: 				 --enable-debug --enable-ipv6 --enable-adminport --enable-stats \
  121: 				 --enable-dpd --enable-natt=yes --enable-frag --enable-hybrid \
  122: 				 --without-libpam --with-libradius ${PFX}
  123: 		${MK} clean
  124: 		${MK}
  125: 		${MK} install
  126: 		echo ">>> Now rebuild elwix firmware image ..."
  127: 		;;
  128: 	dhcp)
  129: 		cd dhcp
  130: #		[ ! -r config.log ] && \
  131: 		./configure --localstatedir=/var --enable-paranoia --enable-early-chroot \
  132: 				--enable-dhcpv6 ${PFX}
  133: 		${MK} clean
  134: 		${MK}
  135: 		install server/dhcpd ${P}/sbin
  136: 		install relay/dhcrelay ${P}/sbin
  137: 		install dhcpctl/omshell ${P}/bin
  138: 		echo ">>> Now rebuild elwix firmware image ..."
  139: 		;;
  140: 	dhcping)
  141: 		cd dhcping
  142: #		[ ! -r config.log ] && \
  143: 		./configure ${PFX}
  144: 		${MK} clean
  145: 		${MK}
  146: 		${MK} install
  147: 		echo ">>> Now rebuild elwix firmware image ..."
  148: 		;;
  149: 	dhcdrop)
  150: 		cd dhcdrop
  151: #		[ ! -r config.log ] && \
  152: 		./configure ${PFX}
  153: 		${MK} clean
  154: 		${MK}
  155: 		${MK} install
  156: 		echo ">>> Now rebuild elwix firmware image ..."
  157: 		;;
  158: 	mrouted)
  159: 		cd mrouted
  160: 		${MK} clean
  161: 		${MK}
  162: 		install map-mbone ${P}/sbin
  163: 		install mrinfo ${P}/sbin
  164: 		install mrouted ${P}/sbin
  165: 		install mtrace ${P}/sbin
  166: 		echo ">>> Now rebuild elwix firmware image ..."
  167: 		;;
  168: 	igmpproxy)
  169: 		cd igmpproxy
  170: 		./configure ${PFX}
  171: 		${MK} clean
  172: 		${MK}
  173: 		${MK} install
  174: #		[ ! -r config.log ] && \
  175: 		echo ">>> Now rebuild elwix firmware image ..."
  176: 		;;
  177: 	bmon)
  178: 		cd bmon
  179: #		[ ! -r config.log ] && \
  180: 		./configure --disable-rrd --disable-asound --disable-dbi ${PFX}
  181: 		${MK} clean
  182: 		${MK}
  183: 		${MK} install
  184: 		echo ">>> Now rebuild elwix firmware image ..."
  185: 		;;
  186: 	iftop)
  187: 		cd iftop
  188: #		[ ! -r config.log ] && \
  189: 		./configure --with-resolver=netdb_1thread ${PFX}
  190: 		${MK} clean
  191: 		${MK}
  192: 		${MK} install
  193: 		echo ">>> Now rebuild elwix firmware image ..."
  194: 		;;
  195: 	arping)
  196: 		echo ">>> Building libnet ..."
  197: 		cd libnet
  198: #		[ ! -r config.log ] && \
  199: 		./configure ${PFX}
  200: 		${MK} clean
  201: 		${MK}
  202: 		${MK} install
  203: 		echo ">>> Building arping ..."
  204: 		cd ../arping
  205: #		[ ! -r config.log ] && \
  206: 		env LDFLAGS=-L${TOP}/libnet/src CFLAGS=-I${TOP}/libnet/include ./configure ${PFX}
  207: 		${MK} clean
  208: 		${MK}
  209: 		${MK} install
  210: 		echo ">>> Now rebuild elwix firmware image ..."
  211: 		;;
  212: 	hping)
  213: 		cd hping
  214: #		[ ! -r config.log ] && \
  215: 		./configure ${PFX}
  216: 		${MK} clean
  217: 		${MK}
  218: 		install hping2 ${P}/sbin
  219: 		echo ">>> Now rebuild elwix firmware image ..."
  220: 		;;
  221: 	mtr)
  222: 		cd mtr
  223: #		[ ! -r config.log ] && \
  224: 		./configure --enable-ipv6 --without-gtk ${PFX}
  225: 		${MK} clean
  226: 		${MK}
  227: 		${MK} install
  228: 		echo ">>> Now rebuild elwix firmware image ..."
  229: 		;;
  230: 	ipguard)
  231: 		cd ipguard
  232: 		${MK} clean
  233: 		${MK}
  234: 		install ipguard ${P}/sbin
  235: 		echo ">>> Now rebuild elwix firmware image ..."
  236: 		;;
  237: 	ishell)
  238: 		cd ishell
  239: 		${MK} bsd clean
  240: 		${MK} bsd
  241: 		install ish ${P}/bin
  242: 		install ishd ${P}/sbin
  243: 		echo ">>> Now rebuild elwix firmware image ..."
  244: 		;;
  245: 	miniupnpd)
  246: 		cd miniupnpd
  247: 		${MK} clean
  248: 		${MK}
  249: 		install miniupnpd ${P}/sbin
  250: 		install miniupnpdctl ${P}/sbin
  251: 		echo ">>> Now rebuild elwix firmware image ..."
  252: 		;;
  253: 	miniupnpc)
  254: 		cd miniupnpc
  255: 		${MK} clean
  256: 		${MK}
  257: 		install libminiupnpc.so ${P}/lib
  258: 		install external-ip.sh ${P}/bin
  259: 		install upnpc-shared ${P}/bin/upnpc
  260: 		echo ">>> Now rebuild elwix firmware image ..."
  261: 		;;
  262: 	strobe)
  263: 		cd strobe
  264: 		${MK} clean
  265: 		${MK}
  266: 		install strobe ${P}/bin
  267: 		echo ">>> Now rebuild elwix firmware image ..."
  268: 		;;
  269: 	iperf)
  270: 		cd iperf
  271: #		[ ! -r config.log ] && \
  272: 		./configure ${PFX}
  273: 		${MK} clean
  274: 		${MK}
  275: 		${MK} install
  276: 		echo ">>> Now rebuild elwix firmware image ..."
  277: 		;;
  278: 	smartmontools)
  279: 		cd smartmontools
  280: #		[ ! -r config.log ] && \
  281: 		./configure --enable-sample --disable-dependency-tracking --enable-drivedb ${PFX}
  282: 		${MK} clean
  283: 		${MK}
  284: 		${MK} install
  285: 		echo ">>> Now rebuild elwix firmware image ..."
  286: 		;;
  287: 	conserver)
  288: 		cd conserver
  289: #		[ ! -r config.log ] && \
  290: 		./configure --sysconfdir=/etc --with-master=localhost --with-port=782 \
  291: 					 --with-pam --with-libwrap --with-openssl ${PFX}
  292: 		${MK} clean
  293: 		${MK}
  294: 		${MK} install
  295: 		echo ">>> Now rebuild elwix firmware image ..."
  296: 		;;
  297: 	coova-chilli)
  298: 		cd coova-chilli
  299: #		[ ! -r config.log ] && \
  300: 		./configure --localstatedir=/var --sysconfdir=/etc ${PFX}
  301: 		${MK} clean
  302: 		${MK}
  303: 		${MK} install
  304: 		echo ">>> Now rebuild elwix firmware image ..."
  305: 		;;
  306: 	lzo)
  307: 		cd lzo
  308: #		[ ! -r config.log ] && \
  309: 		./configure --enable-shared ${PFX}
  310: 		${MK} clean
  311: 		${MK}
  312: 		${MK} install
  313: 		echo ">>> Now rebuild elwix firmware image ..."
  314: 		;;
  315: 	libgcrypt)
  316: 		cd libgpg-error
  317: #		[ ! -r config.log ] && \
  318: 		./configure ${PFX}
  319: 		${MK} clean
  320: 		${MK}
  321: 		${MK} install
  322: 		cd ..
  323: 		cd libgcrypt
  324: #		[ ! -r config.log ] && \
  325: 		./configure ${PFX}
  326: 		${MK} clean
  327: 		${MK}
  328: 		${MK} install
  329: 		echo ">>> Now rebuild elwix firmware image ..."
  330: 		;;
  331: 	openvpn)
  332: 		cd openvpn
  333: #		[ ! -r config.log ] && \
  334: 		./configure --enable-password-save --sysconfdir=/etc \
  335: 			--with-lzo-headers=../lzo/include --with-lzo-lib=../lzo/src/.libs ${PFX}
  336: 		${MK} clean
  337: 		${MK}
  338: 		${MK} install
  339: 		echo ">>> Now rebuild elwix firmware image ..."
  340: 		;;
  341: 	libiconv)
  342: 		cd libiconv
  343: #		[ ! -r config.log ] && \
  344: 		./configure --enable-static --without-libintl-prefix ${PFX}
  345: 		${MK} clean
  346: 		${MK}
  347: 		${MK} install
  348: 		echo ">>> Now rebuild elwix firmware image ..."
  349: 		;;
  350: 	quagga)
  351: 		cd quagga
  352: #		[ ! -r config.log ] && \
  353: 		./configure --enable-user=quagga --enable-group=quagga \
  354: 				--sysconfdir=/etc/quagga --localstatedir=/var/run/quagga \
  355: 				--enable-vtysh --enable-opaque-lsa --enable-rtadv ${PFX}
  356: 		${MK} clean
  357: 		${MK}
  358: 		${MK} install
  359: 		echo ">>> Now rebuild elwix firmware image ..."
  360: 		;;
  361: 	sqlite3)
  362: 		cd sqlite3
  363: #		[ ! -r config.log ] && \
  364: 		./configure --disable-tcl --enable-threadsafe --enable-load-extension --without-tcl ${PFX}
  365: 		${MK} clean
  366: 		${MK}
  367: 		${MK} install
  368: 		echo ">>> Now rebuild elwix firmware image ..."
  369: 		;;
  370: 	mysql)
  371: 		cd mysql
  372: #		[ ! -r config.log ] && \
  373: 		./configure --localstatedir=/var/db/mysql --without-debug --without-readline \
  374: 			--without-libedit --with-libwrap --with-low-memory \
  375: 			--enable-thread-safe-client --with-plugins=max-no-ndb --enable-assembler \
  376: 			--with-named-thread-libs=-pthread --with-embedded-server \
  377: 			--with-unix-socket-path=/tmp/mysql.sock ${PFX}
  378: 		${MK} clean
  379: 		${MK}
  380: 		${MK} install
  381: 		echo ">>> Now rebuild elwix firmware image ..."
  382: 		;;
  383: 	pwgen)
  384: 		cd pwgen
  385: #		[ ! -r config.log ] && \
  386: 		./configure ${PFX}
  387: 		${MK} clean
  388: 		${MK}
  389: 		${MK} install
  390: 		echo ">>> Now rebuild elwix firmware image ..."
  391: 		;;
  392: 	curl)
  393: 		cd curl
  394: #		[ ! -r config.log ] && \
  395: 		./configure --enable-pop3 --enable-smtp --enable-imap --enable-rtsp \
  396: 			--disable-threaded-resolver --disable-werror --with-ssl=/usr \
  397: 			--disable-ares --without-gnutls --enable-ipv6 --without-krb4 \
  398: 			--disable-ldap --disable-ldaps --without-libidn --without-libssh2 \
  399: 			--without-librtmp --disable-curldebug --disable-ntlm --enable-proxy ${PFX}
  400: 		${MK} clean
  401: 		${MK}
  402: 		${MK} install
  403: 		echo ">>> Now rebuild elwix firmware image ..."
  404: 		;;
  405: 	pcre)
  406: 		cd pcre
  407: #		[ ! -r config.log ] && \
  408: 		./configure --enable-utf8 --enable-unicode-properties ${PFX}
  409: 		${MK} clean
  410: 		${MK}
  411: 		${MK} install
  412: #		install .libs/libpcre.so.* ${P}/lib
  413: #		install .libs/libpcreposix.so.* ${P}/lib
  414: #		install .libs/libpcrecpp.so.* ${P}/lib
  415: #		rm -f ${P}/lib/libpcrecpp.so*T ${P}/lib/libpcreposix.so*T
  416: 		echo ">>> Now rebuild elwix firmware image ..."
  417: 		;;
  418: 	spawn-fcgi)
  419: 		cd spawn-fcgi
  420: #		[ ! -r config.log ] && \
  421: 		./configure ${PFX}
  422: 		${MK} clean
  423: 		${MK}
  424: 		${MK} install
  425: 		echo ">>> Now rebuild elwix firmware image ..."
  426: 		;;
  427: 	lighttpd)
  428: 		cd lighttpd
  429: #		[ ! -r config.log ] && \
  430: 		./configure --enable-static --with-openssl ${PFX}
  431: 		${MK} clean
  432: 		${MK}
  433: 		${MK} install
  434: 		echo ">>> Now rebuild elwix firmware image ..."
  435: 		;;
  436: 	php)
  437: 		cd libxml2
  438: #		[ ! -r config.log ] && \
  439: 		./configure --without-python ${PFX}
  440: 		${MK} clean
  441: 		${MK}
  442: 		${MK} install
  443: #		install xml2-config ${P}/bin
  444: #		install .libs/libxml2.so.* ${P}/lib
  445: 		cd ..
  446: 		cd php
  447: #		[ ! -r config.log ] && \
  448: 		./configure --localstatedir=/var --with-config-file-scan-dir=/etc/php --disable-all \
  449: 			--enable-xml --enable-libxml --with-libxml-dir=${P} --with-openssl \
  450: 			--enable-zip --enable-sqlite-utf8 ${PFX}
  451: 		${MK} clean
  452: 		${MK}
  453: 		${MK} install
  454: 		echo ">>> Now rebuild elwix firmware image ..."
  455: 		;;
  456: 	scan_ffs)
  457: 		cd scan_ffs
  458: 		${MK} clean
  459: 		${MK}
  460: 		install scan_ffs ${P}/bin
  461: 		echo ">>> Now rebuild elwix firmware image ..."
  462: 		;;
  463: 	rsync)
  464: 		cd rsync
  465: 		./configure.sh --disable-debug --enable-ipv6 --with-rsyncd-conf=/etc/rsyncd.conf \
  466: 			--disable-iconv --with-included-popt ${PFX}
  467: 		${MK} clean
  468: 		${MK}
  469: 		${MK} install
  470: 		echo ">>> Now rebuild elwix firmware image ..."
  471: 		;;
  472: 	pciutils)
  473: 		cd pciutils
  474: 		${MK} clean
  475: 		${MK}
  476: 		install lspci ${P}/bin
  477: 		install setpci ${P}/bin
  478: 		echo ">>> Now rebuild elwix firmware image ..."
  479: 		;;
  480: 	pure-ftpd)
  481: 		cd pure-ftpd
  482: 		./configure --with-everything --with-paranoidmsg --sysconfdir=/etc --localstatedir=/var \
  483: 			--with-privsep --with-peruserlimits --with-throttling --with-tls --with-pam \
  484: 			--with-uploadscript --with-rfc2640 --with-sendfile --enable-largefile \
  485: 			--with-virtualchroot ${PFX}
  486: 		${MK} clean
  487: 		${MK}
  488: 		${MK} install
  489: 		echo ">>> Now rebuild elwix firmware image ..."
  490: 		;;
  491: 	ladvd)
  492: 		cd ladvd
  493: 		./configure --with-chroot-dir=/var/empty ${PFX}
  494: 		${MK} clean
  495: 		${MK}
  496: 		${MK} install
  497: 		echo ">>> Now rebuild elwix firmware image ..."
  498: 		;;
  499: 	*)
  500: 		echo "Package not supported at this moment ..."
  501: 		exit 1
  502: esac

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