File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / build.sh
Revision 1.6.2.9: download - view: text, annotated - select for diffs - revision graph
Wed Oct 10 14:48:56 2012 UTC (12 years ago) by misho
Branches: elwix1_6
fix path into sudo

    1: #!/bin/sh
    2: #
    3: # (C)`10 PKG-Builder for elwix by Michael Pounov <misho@elwix.org>
    4: #
    5: # ./build.sh [package] [make_tool] [prefix_dir] [build_arch_str]
    6: #
    7: # $Id: build.sh,v 1.6.2.9 2012/10/10 14:48:56 misho Exp $
    8: #
    9: 
   10: CMD=$1
   11: MK=${2:-make}
   12: P=${3:-/tmp/elwix}
   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: if [ $P = "/tmp/elwix" ]; then
   26: 	rm -rf /tmp/elwix
   27: 	install -d /tmp/elwix
   28: 	install -d /tmp/elwix/bin
   29: 	install -d /tmp/elwix/include
   30: 	install -d /tmp/elwix/lib
   31: 	install -d /tmp/elwix/libexec
   32: 	install -d /tmp/elwix/man
   33: 	install -d /tmp/elwix/man/man1
   34: 	install -d /tmp/elwix/man/man2
   35: 	install -d /tmp/elwix/man/man3
   36: 	install -d /tmp/elwix/man/man4
   37: 	install -d /tmp/elwix/man/man5
   38: 	install -d /tmp/elwix/man/man6
   39: 	install -d /tmp/elwix/man/man7
   40: 	install -d /tmp/elwix/man/man8
   41: 	install -d /tmp/elwix/man/man9
   42: 	install -d /tmp/elwix/sbin
   43: 	install -d /tmp/elwix/share
   44: fi
   45: 
   46: case $CMD in
   47: 	sudo)
   48: 		cd sudo
   49: 		./configure --sysconfdir=/etc --libexecdir=/usr/local/libexec --with-ignore-dot \
   50: 					--with-tty-tickets --with-env-editor --with-logincap \
   51: 					--with-long-otp-prompt --with-pam --with-logfac=local2 \
   52: 					${PFX}
   53: 		${MK} clean
   54: 		${MK}
   55: 		install src/sudo ${P}/bin
   56: 		ln ${P}/bin/sudo ${P}/bin/sudoedit
   57: 		install plugins/sudoers/sudoreplay ${P}/bin
   58: 		install plugins/sudoers/visudo ${P}/sbin
   59: 		install plugins/sudoers/.libs/sudoers.so ${P}/libexec
   60: 		install src/.libs/libsudo_noexec.so ${P}/libexec
   61: 		echo ">>> Now rebuild elwix $CMD program ..."
   62: 		;;
   63: 	expat)
   64: 		cd expat
   65: 		./configure ${PFX}
   66: 		${MK} clean
   67: 		${MK}
   68: 		${MK} install
   69: 		echo ">>> Now rebuild elwix $CMD program ..."
   70: 		;;
   71: 	mpd)
   72: 		cd libpdel
   73: 		${MK} clean
   74: 		${MK}
   75: 		find . -name \*.so\* -type f -exec install {} ${P}/lib \;
   76: 		cd ..
   77: 		cd mpd/src
   78: 		${MK} clean
   79: 		${MK}
   80: 		install mpd5 ${P}/sbin
   81: 		echo ">>> Now rebuild elwix $CMD program ..."
   82: 		;;
   83: 	libevent)
   84: 		cd libevent
   85: 		./configure ${PFX}
   86: 		${MK} clean
   87: 		${MK}
   88: 		${MK} install
   89: 		echo ">>> Now rebuild elwix $CMD program ..."
   90: 		;;
   91: 	mini_sendmail)
   92: 		cd mini_sendmail
   93: 		${MK} clean
   94: 		${MK}
   95: 		install mini_sendmail ${P}/sbin
   96: 		echo ">>> Now rebuild elwix $CMD program ..."
   97: 		;;
   98: 	choparp)
   99: 		cd choparp
  100: 		rm -f choparp
  101: 		${MK} choparp
  102: 		install choparp ${P}/sbin
  103: 		echo ">>> Now rebuild elwix $CMD program ..."
  104: 		;;
  105: 	ttcp)
  106: 		cd ttcp
  107: 		rm -f ttcp
  108: 		${MK} ttcp
  109: 		install ttcp ${P}/bin
  110: 		echo ">>> Now rebuild elwix $CMD program ..."
  111: 		;;
  112: 	trafshow)
  113: 		cd trafshow
  114: 		./configure --sysconfdir=/etc ${PFX}
  115: 		${MK} clean
  116: 		${MK}
  117: 		${MK} install
  118: 		echo ">>> Now rebuild elwix $CMD program ..."
  119: 		;;
  120: 	ipsec-tools)
  121: 		cd ipsec-tools
  122: 		./configure --enable-shared --sysconfdir=/etc/racoon --localstatedir=/var/run \
  123: 				 --enable-debug --enable-ipv6 --enable-adminport --enable-stats \
  124: 				 --enable-dpd --enable-natt=yes --enable-frag --enable-hybrid \
  125: 				 --without-libpam --disable-gssapi --with-libradius --without-libldap \
  126: 				 --disable-samode-unspec --disable-rc5 --disable-idea ${PFX}
  127: 		${MK} clean
  128: 		${MK}
  129: 		${MK} install
  130: 		echo ">>> Now rebuild elwix $CMD program ..."
  131: 		;;
  132: 	dhcp)
  133: 		cd dhcp
  134: 		./configure --localstatedir=/var --enable-paranoia --enable-early-chroot \
  135: 				--enable-dhcpv6 ${PFX}
  136: 		${MK} clean
  137: 		${MK}
  138: 		install server/dhcpd ${P}/sbin
  139: 		install relay/dhcrelay ${P}/sbin
  140: 		install dhcpctl/omshell ${P}/bin
  141: 		echo ">>> Now rebuild elwix $CMD program ..."
  142: 		;;
  143: 	dhcping)
  144: 		cd dhcping
  145: 		./configure ${PFX}
  146: 		${MK} clean
  147: 		${MK}
  148: 		${MK} install
  149: 		echo ">>> Now rebuild elwix $CMD program ..."
  150: 		;;
  151: 	dhcdrop)
  152: 		cd dhcdrop
  153: 		./configure ${PFX}
  154: 		${MK} clean
  155: 		${MK}
  156: 		${MK} install
  157: 		echo ">>> Now rebuild elwix $CMD program ..."
  158: 		;;
  159: 	mrouted)
  160: 		cd mrouted
  161: 		${MK} clean
  162: 		${MK}
  163: 		install map-mbone ${P}/sbin
  164: 		install mrinfo ${P}/sbin
  165: 		install mrouted ${P}/sbin
  166: 		install mtrace ${P}/sbin
  167: 		echo ">>> Now rebuild elwix $CMD program ..."
  168: 		;;
  169: 	igmpproxy)
  170: 		cd igmpproxy
  171: 		./configure ${PFX}
  172: 		${MK} clean
  173: 		${MK}
  174: 		${MK} install
  175: 		echo ">>> Now rebuild elwix $CMD program ..."
  176: 		;;
  177: 	bmon)
  178: 		cd bmon
  179: 		./configure --disable-rrd --disable-asound --disable-dbi ${PFX}
  180: 		${MK} clean
  181: 		${MK}
  182: 		${MK} install
  183: 		echo ">>> Now rebuild elwix $CMD program ..."
  184: 		;;
  185: 	iftop)
  186: 		cd iftop
  187: 		./configure --with-resolver=netdb_1thread ${PFX}
  188: 		${MK} clean
  189: 		${MK}
  190: 		${MK} install
  191: 		echo ">>> Now rebuild elwix $CMD program ..."
  192: 		;;
  193: 	arping)
  194: 		echo ">>> Building libnet ..."
  195: 		cd libnet
  196: 		./configure ${PFX}
  197: 		${MK} clean
  198: 		${MK}
  199: 		${MK} install
  200: 		echo ">>> Building arping ..."
  201: 		cd ../arping
  202: 		env LDFLAGS=-L${TOP}/libnet/src CFLAGS=-I${TOP}/libnet/include ./configure ${PFX}
  203: 		${MK} clean
  204: 		${MK}
  205: 		${MK} install
  206: 		echo ">>> Now rebuild elwix $CMD program ..."
  207: 		;;
  208: 	hping2)
  209: 		cd hping2
  210: 		./configure ${PFX}
  211: 		${MK} clean
  212: 		${MK}
  213: 		install hping2 ${P}/sbin
  214: 		echo ">>> Now rebuild elwix $CMD program ..."
  215: 		;;
  216: 	mtr)
  217: 		cd mtr
  218: 		./configure --enable-ipv6 --without-gtk ${PFX}
  219: 		${MK} clean
  220: 		${MK}
  221: 		${MK} install
  222: 		echo ">>> Now rebuild elwix $CMD program ..."
  223: 		;;
  224: 	ipguard)
  225: 		cd ipguard
  226: 		${MK} clean
  227: 		${MK}
  228: 		install ipguard ${P}/sbin
  229: 		echo ">>> Now rebuild elwix $CMD program ..."
  230: 		;;
  231: 	miniupnpd)
  232: 		cd miniupnpd
  233: 		${MK} clean
  234: 		${MK}
  235: 		install miniupnpd ${P}/sbin
  236: 		install miniupnpdctl ${P}/sbin
  237: 		echo ">>> Now rebuild elwix $CMD program ..."
  238: 		;;
  239: 	miniupnpc)
  240: 		cd miniupnpc
  241: 		${MK} clean
  242: 		${MK}
  243: 		install libminiupnpc.so ${P}/lib
  244: 		install external-ip.sh ${P}/bin
  245: 		install upnpc-shared ${P}/bin/upnpc
  246: 		echo ">>> Now rebuild elwix $CMD program ..."
  247: 		;;
  248: 	smartmontools)
  249: 		cd smartmontools
  250: 		./configure --enable-sample --disable-dependency-tracking --enable-drivedb ${PFX}
  251: 		${MK} clean
  252: 		${MK}
  253: 		${MK} install
  254: 		echo ">>> Now rebuild elwix $CMD program ..."
  255: 		;;
  256: 	coova-chilli)
  257: 		cd coova-chilli
  258: 		./configure --localstatedir=/var --sysconfdir=/etc ${PFX}
  259: 		${MK} clean
  260: 		${MK}
  261: 		${MK} install
  262: 		echo ">>> Now rebuild elwix $CMD program ..."
  263: 		;;
  264: 	libiconv)
  265: 		cd libiconv
  266: 		./configure --enable-static --without-libintl-prefix ${PFX}
  267: 		${MK} clean
  268: 		${MK}
  269: 		${MK} install
  270: 		echo ">>> Now rebuild elwix $CMD program ..."
  271: 		;;
  272: 	quagga)
  273: 		cd quagga
  274: 		./configure --enable-user=quagga --enable-group=quagga \
  275: 				--sysconfdir=/etc/quagga --localstatedir=/var/run/quagga \
  276: 				--enable-vtysh --enable-opaque-lsa --enable-rtadv ${PFX}
  277: 		${MK} clean
  278: 		${MK}
  279: 		${MK} install
  280: 		echo ">>> Now rebuild elwix $CMD program ..."
  281: 		;;
  282: 	pcre)
  283: 		cd pcre
  284: 		./configure --enable-utf8 --enable-unicode-properties ${PFX}
  285: 		${MK} clean
  286: 		${MK}
  287: 		${MK} install
  288: #		install .libs/libpcre.so.* ${P}/lib
  289: #		install .libs/libpcreposix.so.* ${P}/lib
  290: #		install .libs/libpcrecpp.so.* ${P}/lib
  291: #		rm -f ${P}/lib/libpcrecpp.so*T ${P}/lib/libpcreposix.so*T
  292: 		echo ">>> Now rebuild elwix $CMD program ..."
  293: 		;;
  294: 	libxml2)
  295: 		cd libxml2
  296: 		./configure --without-python ${PFX}
  297: 		${MK} clean
  298: 		${MK}
  299: 		${MK} install
  300: 		echo ">>> Now rebuild elwix $CMD program ..."
  301: 		;;
  302: 	php)
  303: 		cd php
  304: 		./configure --with-layout=GNU --localstatedir=/var --with-config-file-scan-dir=/etc/php \
  305: 			--disable-all --enable-libxml --enable-xml --with-libxml-dir=${P} --with-openssl \
  306: 			--enable-zip --enable-sqlite-utf8 ${PFX}
  307: 		${MK} clean
  308: 		${MK}
  309: 		${MK} install
  310: #		strip -s ${P}/bin/php
  311: 		rm -f ${P}/bin/php
  312: 		strip -s ${P}/bin/php-cgi
  313: 		echo ">>> Now rebuild elwix $CMD program ..."
  314: 		;;
  315: 	scan_ffs)
  316: 		cd scan_ffs
  317: 		${MK} clean
  318: 		${MK}
  319: 		install scan_ffs ${P}/bin
  320: 		echo ">>> Now rebuild elwix $CMD program ..."
  321: 		;;
  322: 	rsync)
  323: 		cd rsync
  324: 		./configure.sh --disable-debug --enable-ipv6 --with-rsyncd-conf=/etc/rsyncd.conf \
  325: 			--disable-iconv --with-included-popt ${PFX}
  326: 		${MK} clean
  327: 		${MK}
  328: 		${MK} install
  329: 		echo ">>> Now rebuild elwix $CMD program ..."
  330: 		;;
  331: 	pciutils)
  332: 		cd pciutils
  333: 		${MK} clean
  334: 		${MK}
  335: 		install lspci ${P}/bin
  336: 		install setpci ${P}/bin
  337: 		echo ">>> Now rebuild elwix $CMD program ..."
  338: 		;;
  339: 	istgt)
  340: 		cd istgt
  341: 		./configure --enable-symlink-device ${PFX}
  342: 		${MK} clean
  343: 		${MK}
  344: 		install src/istgt ${P}/bin
  345: 		install src/istgtcontrol ${P}/bin
  346: 		echo ">>> Now rebuild elwix $CMD program ..."
  347: 		;;
  348: 	ntp)
  349: 		cd ntp
  350: 		./configure --without-ntpsnmpd --with-crypto --enable-ipv6 --enable-BANCOMM \
  351: 			--enable-GPSVME --enable-ACTS --enable-ARBITER --enable-ARCRON_MSF \
  352: 			--enable-AS2201 --enable-ATOM --enable-CHRONOLOG --enable-CHU \
  353: 			--enable-AUDIO_CHU --enable-DATUM --enable-DUMBCLOCK --enable-FG \
  354: 			--enable-HEATH --enable-HOPFSERIAL --enable-HOPFPCI --enable-HPGPS \
  355: 			--enable-IRIG --enable-JJY --enable-JUPITER --enable-LEITCH \
  356: 			--enable-LOCAL_CLOCK --enable-MX4200 --enable-NEOCLOCK4X --enable-NMEA \
  357: 			--enable-ONCORE --enable-PALISADE --enable-PCF --enable-PST \
  358: 			--enable-RIPENCC --enable-SHM --enable-SPECTRACOM --enable-TRUETIME \
  359: 			--enable-ULINK --enable-WWV --enable-ZYFER --enable-COMPUTIME \
  360: 			--enable-DCF7000 --enable-HOPF6021 --enable-MEINBERG --enable-RAWDCF \
  361: 			--enable-RCC8000 --enable-SCHMID --enable-TRIMTAIP --enable-TRIMTSIP \
  362: 			--enable-WHARTON --enable-VARITEXT ${PFX}
  363: 		${MK} clean
  364: 		${MK}
  365: 		${MK} install
  366: 		echo ">>> Now rebuild elwix $CMD program ..."
  367: 		;;
  368: 	*)
  369: 		echo "Package not supported at this moment ..."
  370: 		exit 1
  371: esac

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