File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / build.sh
Revision 1.4.2.2: download - view: text, annotated - select for diffs - revision graph
Fri Oct 21 08:01:15 2011 UTC (12 years, 8 months ago) by misho
Branches: elwix1_4
remove useless install of libxml2 to flash

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

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