File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / build.sh
Revision 1.5: download - view: text, annotated - select for diffs - revision graph
Mon Oct 31 12:56:54 2011 UTC (12 years, 7 months ago) by misho
Branches: MAIN
CVS tags: elwix1_5, HEAD, ELWIX1_4
ver

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

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