Annotation of elwix/config/rc.3thparty_helper, revision 1.1.2.3

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

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