File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / build.sh
Revision 1.3: download - view: text, annotated - select for diffs - revision graph
Wed Jul 20 12:58:19 2011 UTC (12 years, 10 months ago) by misho
Branches: MAIN
CVS tags: HEAD
add last tools

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

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