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