Annotation of embedaddon/build.sh, revision 1.6
1.1 misho 1: #!/bin/sh
2: #
3: # (C)`10 PKG-Builder for elwix by Michael Pounov <misho@elwix.org>
4: #
1.6 ! misho 5: # ./build.sh [package] [make_tool] [prefix_dir] [build_arch_str]
1.1 misho 6: #
1.6 ! misho 7: # $Id: build.sh,v 1.5 2011/10/31 12:56:54 misho Exp $
1.1 misho 8: #
9:
1.2 misho 10: CMD=$1
11: MK=${2:-make}
1.6 ! misho 12: P=${3:-/tmp/elwix}
1.5 misho 13: B=$4
1.2 misho 14: PFX="--prefix ${P}"
1.5 misho 15: shift; shift; shift; shift;
1.2 misho 16: echo ">>> Working script ${MK} into ${PFX}"
1.1 misho 17:
1.5 misho 18: if [ -n "${B}" ]; then
19: PFX="${PFX} --build ${B}"
20: fi
21:
1.1 misho 22: TOP=$(pwd)
23: echo ">>> TOPDIR=${TOP}"
24:
1.6 ! misho 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:
1.2 misho 46: case $CMD in
1.1 misho 47: sudo)
48: cd sudo
1.5 misho 49: ./configure --sysconfdir=/etc --libexecdir=/usr/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}
1.2 misho 53: ${MK} clean
54: ${MK}
1.6 ! misho 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 ..."
1.1 misho 62: ;;
63: expat)
64: cd expat
1.2 misho 65: ./configure ${PFX}
66: ${MK} clean
67: ${MK}
68: ${MK} install
1.6 ! misho 69: echo ">>> Now rebuild elwix $CMD program ..."
1.1 misho 70: ;;
71: mpd)
72: cd libpdel
1.2 misho 73: ${MK} clean
74: ${MK}
75: find . -name \*.so\* -type f -exec install {} ${P}/lib \;
1.1 misho 76: cd ..
77: cd mpd/src
1.2 misho 78: ${MK} clean
79: ${MK}
80: install mpd5 ${P}/sbin
1.6 ! misho 81: echo ">>> Now rebuild elwix $CMD program ..."
1.1 misho 82: ;;
83: libevent)
84: cd libevent
1.2 misho 85: ./configure ${PFX}
86: ${MK} clean
87: ${MK}
88: ${MK} install
1.6 ! misho 89: echo ">>> Now rebuild elwix $CMD program ..."
1.1 misho 90: ;;
91: mini_sendmail)
92: cd mini_sendmail
1.2 misho 93: ${MK} clean
94: ${MK}
95: install mini_sendmail ${P}/sbin
1.6 ! misho 96: echo ">>> Now rebuild elwix $CMD program ..."
1.1 misho 97: ;;
98: choparp)
99: cd choparp
1.2 misho 100: rm -f choparp
101: ${MK} choparp
102: install choparp ${P}/sbin
1.6 ! misho 103: echo ">>> Now rebuild elwix $CMD program ..."
1.1 misho 104: ;;
105: ttcp)
106: cd ttcp
1.2 misho 107: rm -f ttcp
108: ${MK} ttcp
109: install ttcp ${P}/bin
1.6 ! misho 110: echo ">>> Now rebuild elwix $CMD program ..."
1.1 misho 111: ;;
112: trafshow)
113: cd trafshow
1.2 misho 114: ./configure --sysconfdir=/etc ${PFX}
115: ${MK} clean
116: ${MK}
117: ${MK} install
1.6 ! misho 118: echo ">>> Now rebuild elwix $CMD program ..."
1.1 misho 119: ;;
120: ipsec-tools)
121: cd ipsec-tools
122: ./configure --enable-shared --sysconfdir=/etc/racoon --localstatedir=/var/db \
123: --enable-debug --enable-ipv6 --enable-adminport --enable-stats \
124: --enable-dpd --enable-natt=yes --enable-frag --enable-hybrid \
1.6 ! misho 125: --without-libpam --disable-gssapi --with-libradius --without-libldap \
! 126: --disable-samode-unspec --disable-rc5 --disable-idea ${PFX}
1.2 misho 127: ${MK} clean
128: ${MK}
129: ${MK} install
1.6 ! misho 130: echo ">>> Now rebuild elwix $CMD program ..."
1.1 misho 131: ;;
132: dhcp)
133: cd dhcp
1.2 misho 134: ./configure --localstatedir=/var --enable-paranoia --enable-early-chroot \
135: --enable-dhcpv6 ${PFX}
136: ${MK} clean
137: ${MK}
1.4 misho 138: install server/dhcpd ${P}/sbin
139: install relay/dhcrelay ${P}/sbin
140: install dhcpctl/omshell ${P}/bin
1.6 ! misho 141: echo ">>> Now rebuild elwix $CMD program ..."
1.1 misho 142: ;;
143: dhcping)
144: cd dhcping
1.2 misho 145: ./configure ${PFX}
146: ${MK} clean
147: ${MK}
148: ${MK} install
1.6 ! misho 149: echo ">>> Now rebuild elwix $CMD program ..."
1.1 misho 150: ;;
151: dhcdrop)
152: cd dhcdrop
1.2 misho 153: ./configure ${PFX}
154: ${MK} clean
155: ${MK}
156: ${MK} install
1.6 ! misho 157: echo ">>> Now rebuild elwix $CMD program ..."
1.1 misho 158: ;;
159: mrouted)
160: cd mrouted
1.2 misho 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
1.6 ! misho 167: echo ">>> Now rebuild elwix $CMD program ..."
1.2 misho 168: ;;
169: igmpproxy)
170: cd igmpproxy
171: ./configure ${PFX}
172: ${MK} clean
173: ${MK}
174: ${MK} install
1.6 ! misho 175: echo ">>> Now rebuild elwix $CMD program ..."
1.1 misho 176: ;;
177: bmon)
178: cd bmon
1.2 misho 179: ./configure --disable-rrd --disable-asound --disable-dbi ${PFX}
180: ${MK} clean
181: ${MK}
182: ${MK} install
1.6 ! misho 183: echo ">>> Now rebuild elwix $CMD program ..."
1.1 misho 184: ;;
185: iftop)
186: cd iftop
1.2 misho 187: ./configure --with-resolver=netdb_1thread ${PFX}
188: ${MK} clean
189: ${MK}
190: ${MK} install
1.6 ! misho 191: echo ">>> Now rebuild elwix $CMD program ..."
1.1 misho 192: ;;
193: arping)
194: echo ">>> Building libnet ..."
195: cd libnet
1.2 misho 196: ./configure ${PFX}
197: ${MK} clean
198: ${MK}
199: ${MK} install
1.1 misho 200: echo ">>> Building arping ..."
201: cd ../arping
1.2 misho 202: env LDFLAGS=-L${TOP}/libnet/src CFLAGS=-I${TOP}/libnet/include ./configure ${PFX}
203: ${MK} clean
204: ${MK}
205: ${MK} install
1.6 ! misho 206: echo ">>> Now rebuild elwix $CMD program ..."
1.1 misho 207: ;;
1.6 ! misho 208: hping2)
! 209: cd hping2
1.2 misho 210: ./configure ${PFX}
211: ${MK} clean
212: ${MK}
213: install hping2 ${P}/sbin
1.6 ! misho 214: echo ">>> Now rebuild elwix $CMD program ..."
1.1 misho 215: ;;
216: mtr)
217: cd mtr
1.2 misho 218: ./configure --enable-ipv6 --without-gtk ${PFX}
219: ${MK} clean
220: ${MK}
221: ${MK} install
1.6 ! misho 222: echo ">>> Now rebuild elwix $CMD program ..."
1.1 misho 223: ;;
224: ipguard)
225: cd ipguard
1.2 misho 226: ${MK} clean
227: ${MK}
228: install ipguard ${P}/sbin
1.6 ! misho 229: echo ">>> Now rebuild elwix $CMD program ..."
1.1 misho 230: ;;
231: miniupnpd)
232: cd miniupnpd
1.2 misho 233: ${MK} clean
234: ${MK}
235: install miniupnpd ${P}/sbin
236: install miniupnpdctl ${P}/sbin
1.6 ! misho 237: echo ">>> Now rebuild elwix $CMD program ..."
1.2 misho 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
1.6 ! misho 246: echo ">>> Now rebuild elwix $CMD program ..."
1.1 misho 247: ;;
248: smartmontools)
249: cd smartmontools
1.2 misho 250: ./configure --enable-sample --disable-dependency-tracking --enable-drivedb ${PFX}
251: ${MK} clean
252: ${MK}
253: ${MK} install
1.6 ! misho 254: echo ">>> Now rebuild elwix $CMD program ..."
1.1 misho 255: ;;
256: coova-chilli)
257: cd coova-chilli
1.2 misho 258: ./configure --localstatedir=/var --sysconfdir=/etc ${PFX}
259: ${MK} clean
260: ${MK}
261: ${MK} install
1.6 ! misho 262: echo ">>> Now rebuild elwix $CMD program ..."
1.1 misho 263: ;;
264: libiconv)
265: cd libiconv
1.2 misho 266: ./configure --enable-static --without-libintl-prefix ${PFX}
267: ${MK} clean
268: ${MK}
269: ${MK} install
1.6 ! misho 270: echo ">>> Now rebuild elwix $CMD program ..."
1.1 misho 271: ;;
272: quagga)
273: cd quagga
1.2 misho 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
1.6 ! misho 280: echo ">>> Now rebuild elwix $CMD program ..."
1.2 misho 281: ;;
282: sqlite3)
283: cd sqlite3
1.6 ! misho 284: ./configure --enable-tempstore=yes --disable-tcl --enable-threadsafe \
! 285: --enable-load-extension --without-tcl ${PFX}
1.2 misho 286: ${MK} clean
287: ${MK}
288: ${MK} install
1.6 ! misho 289: echo ">>> Now rebuild elwix $CMD program ..."
1.1 misho 290: ;;
291: pcre)
292: cd pcre
1.2 misho 293: ./configure --enable-utf8 --enable-unicode-properties ${PFX}
294: ${MK} clean
295: ${MK}
296: ${MK} install
1.6 ! misho 297: # install .libs/libpcre.so.* ${P}/lib
! 298: # install .libs/libpcreposix.so.* ${P}/lib
! 299: # install .libs/libpcrecpp.so.* ${P}/lib
! 300: # rm -f ${P}/lib/libpcrecpp.so*T ${P}/lib/libpcreposix.so*T
! 301: echo ">>> Now rebuild elwix $CMD program ..."
1.1 misho 302: ;;
303: php)
304: cd libxml2
1.2 misho 305: ./configure --without-python ${PFX}
306: ${MK} clean
307: ${MK}
308: ${MK} install
1.1 misho 309: cd ..
310: cd php
1.3 misho 311: ./configure --localstatedir=/var --with-config-file-scan-dir=/etc/php --disable-all \
1.2 misho 312: --enable-libxml=../libxml2/.libs --with-openssl \
313: --enable-zip --enable-sqlite-utf8 ${PFX}
314: ${MK} clean
315: ${MK}
316: ${MK} install
1.6 ! misho 317: echo ">>> Now rebuild elwix $CMD program ..."
1.1 misho 318: ;;
1.3 misho 319: scan_ffs)
320: cd scan_ffs
321: ${MK} clean
322: ${MK}
323: install scan_ffs ${P}/bin
1.6 ! misho 324: echo ">>> Now rebuild elwix $CMD program ..."
1.3 misho 325: ;;
326: rsync)
327: cd rsync
328: ./configure.sh --disable-debug --enable-ipv6 --with-rsyncd-conf=/etc/rsyncd.conf \
329: --disable-iconv --with-included-popt ${PFX}
330: ${MK} clean
331: ${MK}
332: ${MK} install
1.6 ! misho 333: echo ">>> Now rebuild elwix $CMD program ..."
1.3 misho 334: ;;
335: pciutils)
336: cd pciutils
337: ${MK} clean
338: ${MK}
339: install lspci ${P}/bin
340: install setpci ${P}/bin
1.6 ! misho 341: echo ">>> Now rebuild elwix $CMD program ..."
1.3 misho 342: ;;
1.6 ! misho 343: istgt)
! 344: cd istgt
! 345: ./configure ${PFX}
1.3 misho 346: ${MK} clean
347: ${MK}
1.6 ! misho 348: install src/istgt ${P}/bin
! 349: install src/istgtcontrol ${P}/bin
! 350: echo ">>> Now rebuild elwix $CMD program ..."
1.3 misho 351: ;;
1.6 ! misho 352: thttpd)
! 353: cd thttpd
! 354: ./configure ${PFX}
1.3 misho 355: ${MK} clean
356: ${MK}
357: ${MK} install
1.6 ! misho 358: echo ">>> Now rebuild elwix $CMD program ..."
1.3 misho 359: ;;
1.1 misho 360: *)
361: echo "Package not supported at this moment ..."
362: exit 1
363: esac
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>