File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / build.sh
Revision 1.4: download - view: text, annotated - select for diffs - revision graph
Fri Jul 22 10:45:28 2011 UTC (12 years, 10 months ago) by misho
Branches: MAIN
CVS tags: elwix1_4, HEAD
fix dhcpd

    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.4 2011/07/22 10:45:28 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: 		install server/dhcpd ${P}/sbin
  125: 		install relay/dhcrelay ${P}/sbin
  126: 		install dhcpctl/omshell ${P}/bin
  127: 		echo ">>> Now rebuild elwix firmware image ..."
  128: 		;;
  129: 	dhcping)
  130: 		cd dhcping
  131: #		[ ! -r config.log ] && \
  132: 		./configure ${PFX}
  133: 		${MK} clean
  134: 		${MK}
  135: 		${MK} install
  136: 		echo ">>> Now rebuild elwix firmware image ..."
  137: 		;;
  138: 	dhcdrop)
  139: 		cd dhcdrop
  140: #		[ ! -r config.log ] && \
  141: 		./configure ${PFX}
  142: 		${MK} clean
  143: 		${MK}
  144: 		${MK} install
  145: 		echo ">>> Now rebuild elwix firmware image ..."
  146: 		;;
  147: 	mrouted)
  148: 		cd mrouted
  149: 		${MK} clean
  150: 		${MK}
  151: 		install map-mbone ${P}/sbin
  152: 		install mrinfo ${P}/sbin
  153: 		install mrouted ${P}/sbin
  154: 		install mtrace ${P}/sbin
  155: 		echo ">>> Now rebuild elwix firmware image ..."
  156: 		;;
  157: 	igmpproxy)
  158: 		cd igmpproxy
  159: 		./configure ${PFX}
  160: 		${MK} clean
  161: 		${MK}
  162: 		${MK} install
  163: #		[ ! -r config.log ] && \
  164: 		echo ">>> Now rebuild elwix firmware image ..."
  165: 		;;
  166: 	bmon)
  167: 		cd bmon
  168: #		[ ! -r config.log ] && \
  169: 		./configure --disable-rrd --disable-asound --disable-dbi ${PFX}
  170: 		${MK} clean
  171: 		${MK}
  172: 		${MK} install
  173: 		echo ">>> Now rebuild elwix firmware image ..."
  174: 		;;
  175: 	iftop)
  176: 		cd iftop
  177: #		[ ! -r config.log ] && \
  178: 		./configure --with-resolver=netdb_1thread ${PFX}
  179: 		${MK} clean
  180: 		${MK}
  181: 		${MK} install
  182: 		echo ">>> Now rebuild elwix firmware image ..."
  183: 		;;
  184: 	arping)
  185: 		echo ">>> Building libnet ..."
  186: 		cd libnet
  187: #		[ ! -r config.log ] && \
  188: 		./configure ${PFX}
  189: 		${MK} clean
  190: 		${MK}
  191: 		${MK} install
  192: 		echo ">>> Building arping ..."
  193: 		cd ../arping
  194: #		[ ! -r config.log ] && \
  195: 		env LDFLAGS=-L${TOP}/libnet/src CFLAGS=-I${TOP}/libnet/include ./configure ${PFX}
  196: 		${MK} clean
  197: 		${MK}
  198: 		${MK} install
  199: 		echo ">>> Now rebuild elwix firmware image ..."
  200: 		;;
  201: 	hping)
  202: 		cd hping
  203: #		[ ! -r config.log ] && \
  204: 		./configure ${PFX}
  205: 		${MK} clean
  206: 		${MK}
  207: 		install hping2 ${P}/sbin
  208: 		echo ">>> Now rebuild elwix firmware image ..."
  209: 		;;
  210: 	mtr)
  211: 		cd mtr
  212: #		[ ! -r config.log ] && \
  213: 		./configure --enable-ipv6 --without-gtk ${PFX}
  214: 		${MK} clean
  215: 		${MK}
  216: 		${MK} install
  217: 		echo ">>> Now rebuild elwix firmware image ..."
  218: 		;;
  219: 	ipguard)
  220: 		cd ipguard
  221: 		${MK} clean
  222: 		${MK}
  223: 		install ipguard ${P}/sbin
  224: 		echo ">>> Now rebuild elwix firmware image ..."
  225: 		;;
  226: 	ishell)
  227: 		cd ishell
  228: 		${MK} bsd clean
  229: 		${MK} bsd
  230: 		install ish ${P}/bin
  231: 		install ishd ${P}/sbin
  232: 		echo ">>> Now rebuild elwix firmware image ..."
  233: 		;;
  234: 	miniupnpd)
  235: 		cd miniupnpd
  236: 		${MK} clean
  237: 		${MK}
  238: 		install miniupnpd ${P}/sbin
  239: 		install miniupnpdctl ${P}/sbin
  240: 		echo ">>> Now rebuild elwix firmware image ..."
  241: 		;;
  242: 	miniupnpc)
  243: 		cd miniupnpc
  244: 		${MK} clean
  245: 		${MK}
  246: 		install libminiupnpc.so ${P}/lib
  247: 		install external-ip.sh ${P}/bin
  248: 		install upnpc-shared ${P}/bin/upnpc
  249: 		echo ">>> Now rebuild elwix firmware image ..."
  250: 		;;
  251: 	strobe)
  252: 		cd strobe
  253: 		${MK} clean
  254: 		${MK}
  255: 		install strobe ${P}/bin
  256: 		echo ">>> Now rebuild elwix firmware image ..."
  257: 		;;
  258: 	iperf)
  259: 		cd iperf
  260: #		[ ! -r config.log ] && \
  261: 		./configure ${PFX}
  262: 		${MK} clean
  263: 		${MK}
  264: 		${MK} install
  265: 		echo ">>> Now rebuild elwix firmware image ..."
  266: 		;;
  267: 	smartmontools)
  268: 		cd smartmontools
  269: #		[ ! -r config.log ] && \
  270: 		./configure --enable-sample --disable-dependency-tracking --enable-drivedb ${PFX}
  271: 		${MK} clean
  272: 		${MK}
  273: 		${MK} install
  274: 		echo ">>> Now rebuild elwix firmware image ..."
  275: 		;;
  276: 	conserver)
  277: 		cd conserver
  278: #		[ ! -r config.log ] && \
  279: 		./configure --sysconfdir=/etc --with-master=localhost --with-port=782 \
  280: 					 --with-pam --with-libwrap --with-openssl ${PFX}
  281: 		${MK} clean
  282: 		${MK}
  283: 		${MK} install
  284: 		echo ">>> Now rebuild elwix firmware image ..."
  285: 		;;
  286: 	coova-chilli)
  287: 		cd coova-chilli
  288: #		[ ! -r config.log ] && \
  289: 		./configure --localstatedir=/var --sysconfdir=/etc ${PFX}
  290: 		${MK} clean
  291: 		${MK}
  292: 		${MK} install
  293: 		echo ">>> Now rebuild elwix firmware image ..."
  294: 		;;
  295: 	lzo)
  296: 		cd lzo
  297: #		[ ! -r config.log ] && \
  298: 		./configure --enable-shared ${PFX}
  299: 		${MK} clean
  300: 		${MK}
  301: 		${MK} install
  302: 		echo ">>> Now rebuild elwix firmware image ..."
  303: 		;;
  304: 	libgcrypt)
  305: 		cd libgpg-error
  306: #		[ ! -r config.log ] && \
  307: 		./configure ${PFX}
  308: 		${MK} clean
  309: 		${MK}
  310: 		${MK} install
  311: 		cd ..
  312: 		cd libgcrypt
  313: #		[ ! -r config.log ] && \
  314: 		./configure ${PFX}
  315: 		${MK} clean
  316: 		${MK}
  317: 		${MK} install
  318: 		echo ">>> Now rebuild elwix firmware image ..."
  319: 		;;
  320: 	openvpn)
  321: 		cd openvpn
  322: #		[ ! -r config.log ] && \
  323: 		./configure --enable-password-save --sysconfdir=/etc \
  324: 			--with-lzo-headers=../lzo/include --with-lzo-lib=../lzo/src/.libs ${PFX}
  325: 		${MK} clean
  326: 		${MK}
  327: 		${MK} install
  328: 		echo ">>> Now rebuild elwix firmware image ..."
  329: 		;;
  330: 	libiconv)
  331: 		cd libiconv
  332: #		[ ! -r config.log ] && \
  333: 		./configure --enable-static --without-libintl-prefix ${PFX}
  334: 		${MK} clean
  335: 		${MK}
  336: 		${MK} install
  337: 		echo ">>> Now rebuild elwix firmware image ..."
  338: 		;;
  339: 	quagga)
  340: 		cd quagga
  341: #		[ ! -r config.log ] && \
  342: 		./configure --enable-user=quagga --enable-group=quagga \
  343: 				--sysconfdir=/etc/quagga --localstatedir=/var/run/quagga \
  344: 				--enable-vtysh --enable-opaque-lsa --enable-rtadv ${PFX}
  345: 		${MK} clean
  346: 		${MK}
  347: 		${MK} install
  348: 		echo ">>> Now rebuild elwix firmware image ..."
  349: 		;;
  350: 	sqlite3)
  351: 		cd sqlite3
  352: #		[ ! -r config.log ] && \
  353: 		./configure --disable-tcl --enable-threadsafe --enable-load-extension --without-tcl ${PFX}
  354: 		${MK} clean
  355: 		${MK}
  356: 		${MK} install
  357: 		echo ">>> Now rebuild elwix firmware image ..."
  358: 		;;
  359: 	mysql)
  360: 		cd mysql
  361: #		[ ! -r config.log ] && \
  362: 		./configure --localstatedir=/var/db/mysql --without-debug --without-readline \
  363: 			--without-libedit --with-libwrap --with-low-memory \
  364: 			--enable-thread-safe-client --with-plugins=max-no-ndb --enable-assembler \
  365: 			--with-named-thread-libs=-pthread --with-embedded-server \
  366: 			--with-unix-socket-path=/tmp/mysql.sock ${PFX}
  367: 		${MK} clean
  368: 		${MK}
  369: 		${MK} install
  370: 		echo ">>> Now rebuild elwix firmware image ..."
  371: 		;;
  372: 	pwgen)
  373: 		cd pwgen
  374: #		[ ! -r config.log ] && \
  375: 		./configure ${PFX}
  376: 		${MK} clean
  377: 		${MK}
  378: 		${MK} install
  379: 		echo ">>> Now rebuild elwix firmware image ..."
  380: 		;;
  381: 	curl)
  382: 		cd curl
  383: #		[ ! -r config.log ] && \
  384: 		./configure --enable-pop3 --enable-smtp --enable-imap --enable-rtsp \
  385: 			--disable-threaded-resolver --disable-werror --with-ssl=/usr \
  386: 			--disable-ares --without-gnutls --enable-ipv6 --without-krb4 \
  387: 			--disable-ldap --disable-ldaps --without-libidn --without-libssh2 \
  388: 			--without-librtmp --disable-curldebug --disable-ntlm --enable-proxy ${PFX}
  389: 		${MK} clean
  390: 		${MK}
  391: 		${MK} install
  392: 		echo ">>> Now rebuild elwix firmware image ..."
  393: 		;;
  394: 	pcre)
  395: 		cd pcre
  396: #		[ ! -r config.log ] && \
  397: 		./configure --enable-utf8 --enable-unicode-properties ${PFX}
  398: 		${MK} clean
  399: 		${MK}
  400: 		${MK} install
  401: 		echo ">>> Now rebuild elwix firmware image ..."
  402: 		;;
  403: 	spawn-fcgi)
  404: 		cd spawn-fcgi
  405: #		[ ! -r config.log ] && \
  406: 		./configure ${PFX}
  407: 		${MK} clean
  408: 		${MK}
  409: 		${MK} install
  410: 		echo ">>> Now rebuild elwix firmware image ..."
  411: 		;;
  412: 	lighttpd)
  413: 		cd lighttpd
  414: #		[ ! -r config.log ] && \
  415: 		./configure --enable-static --with-openssl ${PFX}
  416: 		${MK} clean
  417: 		${MK}
  418: 		${MK} install
  419: 		echo ">>> Now rebuild elwix firmware image ..."
  420: 		;;
  421: 	php)
  422: 		cd libxml2
  423: #		[ ! -r config.log ] && \
  424: 		./configure --without-python ${PFX}
  425: 		${MK} clean
  426: 		${MK}
  427: 		${MK} install
  428: 		cd ..
  429: 		cd php
  430: #		[ ! -r config.log ] && \
  431: 		./configure --localstatedir=/var --with-config-file-scan-dir=/etc/php --disable-all \
  432: 			--enable-libxml=../libxml2/.libs --with-openssl \
  433: 			--enable-zip --enable-sqlite-utf8 ${PFX}
  434: 		${MK} clean
  435: 		${MK}
  436: 		${MK} install
  437: 		echo ">>> Now rebuild elwix firmware image ..."
  438: 		;;
  439: 	scan_ffs)
  440: 		cd scan_ffs
  441: 		${MK} clean
  442: 		${MK}
  443: 		install scan_ffs ${P}/bin
  444: 		echo ">>> Now rebuild elwix firmware image ..."
  445: 		;;
  446: 	rsync)
  447: 		cd rsync
  448: 		./configure.sh --disable-debug --enable-ipv6 --with-rsyncd-conf=/etc/rsyncd.conf \
  449: 			--disable-iconv --with-included-popt ${PFX}
  450: 		${MK} clean
  451: 		${MK}
  452: 		${MK} install
  453: 		echo ">>> Now rebuild elwix firmware image ..."
  454: 		;;
  455: 	pciutils)
  456: 		cd pciutils
  457: 		${MK} clean
  458: 		${MK}
  459: 		install lspci ${P}/bin
  460: 		install setpci ${P}/bin
  461: 		echo ">>> Now rebuild elwix firmware image ..."
  462: 		;;
  463: 	pure-ftpd)
  464: 		cd pure-ftpd
  465: 		./configure --with-everything --with-paranoidmsg --sysconfdir=/etc --localstatedir=/var \
  466: 			--with-privsep --with-peruserlimits --with-throttling --with-tls --with-pam \
  467: 			--with-uploadscript --with-rfc2640 --with-sendfile --enable-largefile \
  468: 			--with-virtualchroot ${PFX}
  469: 		${MK} clean
  470: 		${MK}
  471: 		${MK} install
  472: 		echo ">>> Now rebuild elwix firmware image ..."
  473: 		;;
  474: 	ladvd)
  475: 		cd ladvd
  476: 		./configure --with-chroot-dir=/var/empty ${PFX}
  477: 		${MK} clean
  478: 		${MK}
  479: 		${MK} install
  480: 		echo ">>> Now rebuild elwix firmware image ..."
  481: 		;;
  482: 	*)
  483: 		echo "Package not supported at this moment ..."
  484: 		exit 1
  485: esac

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