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

1.2       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.3.2.1 ! misho       7: # $Id: rc.3thparty_helper,v 1.3 2017/02/13 16:52:46 misho Exp $
1.2       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
1.3       misho      28:        PFX="${PFX} --host ${B}"
1.2       misho      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: 
                     55: find ${ADDSRC} -name .deps -type d -exec rm -rf {} \;
                     56: 
                     57: case $CMD in
1.3       misho      58:        automake)
                     59:                cd ${ADDSRC}/automake
                     60:                echo ">>> Now rebuild elwix $CMD program ..."
                     61:                ;;
1.2       misho      62:        sudo)
                     63:                cd ${ADDSRC}/sudo
                     64:                ./configure --sysconfdir=/etc --libexecdir=/usr/local/libexec --with-ignore-dot \
                     65:                                        --with-tty-tickets --with-env-editor --with-logincap \
                     66:                                        --with-long-otp-prompt --with-pam --with-logfac=local2 \
                     67:                                        --with-bsm-audit ${PFX} || exit 1
                     68:                ${MK} clean || exit 1
                     69:                ${MK} || exit 1
                     70:                install src/sudo ${P}/bin || exit 1
                     71:                ln ${P}/bin/sudo ${P}/bin/sudoedit || exit 1
                     72:                install plugins/sudoers/sudoreplay ${P}/bin || exit 1
                     73:                install plugins/sudoers/visudo ${P}/sbin || exit 1
                     74:                install plugins/sudoers/.libs/sudoers.so ${P}/libexec || exit 1
                     75:                install src/.libs/libsudo_noexec.so ${P}/libexec || exit 1
                     76:                echo ">>> Now rebuild elwix $CMD program ..."
                     77:                ;;
                     78:        expat)
                     79:                cd ${ADDSRC}/expat
                     80:                ./configure ${PFX} || exit 1
                     81:                ${MK} clean || exit 1
                     82:                ${MK} || exit 1
                     83:                ${MK} install || exit 1
                     84:                echo ">>> Now rebuild elwix $CMD program ..."
                     85:                ;;
                     86:        readline)
                     87:                cd ${ADDSRC}/readline
1.3       misho      88:                ${CEXEC} INSTALL="/usr/bin/install" ./configure ${PFX} || exit 1
                     89:                ${MK} clean || exit 1
                     90:                ${MK} || exit 1
                     91:                ${MK} install || exit 1
                     92:                echo ">>> Now rebuild elwix $CMD program ..."
                     93:                ;;
                     94:        confuse)
                     95:                cd ${ADDSRC}/confuse
                     96:                ${CEXEC} INSTALL="/usr/bin/install" ./configure --disable-nls --enable-shared ${PFX} || exit 1
1.2       misho      97:                ${MK} clean || exit 1
                     98:                ${MK} || exit 1
                     99:                ${MK} install || exit 1
                    100:                echo ">>> Now rebuild elwix $CMD program ..."
                    101:                ;;
                    102:        mpd)
                    103: #              cd ${ADDSRC}/libpdel
                    104: #              ${MK} clean || exit 1
                    105: #              ${MK} || exit 1
                    106: #              find . -name \*.so\* -type f -exec install {} ${P}/lib \;
                    107: #              cd ..
                    108:                cd ${ADDSRC}/mpd/src
1.3       misho     109:                ${CEXEC} INSTALL="/usr/bin/install" DESTDIR=${WORLD} ./configure
                    110:                ${MK} DESTDIR=${WORLD} clean || exit 1
                    111:                ${MK} DESTDIR=${WORLD} || exit 1
1.2       misho     112:                install mpd5 ${P}/sbin || exit 1
                    113:                echo ">>> Now rebuild elwix $CMD program ..."
                    114:                ;;
                    115:        libevent)
                    116:                cd ${ADDSRC}/libevent
                    117:                ./configure ${PFX} --mandir=${P}/man --infodir=${P}/info || exit 1
                    118:                ${MK} clean || exit 1
                    119:                ${MK} || exit 1
                    120:                ${MK} install || exit 1
                    121:                echo ">>> Now rebuild elwix $CMD program ..."
                    122:                ;;
                    123:        mini_sendmail)
                    124:                cd ${ADDSRC}/mini_sendmail
                    125:                ${MK} clean || exit 1
                    126:                ${MK} || exit 1
                    127:                install mini_sendmail ${P}/sbin || exit 1
                    128:                echo ">>> Now rebuild elwix $CMD program ..."
                    129:                ;;
                    130:        choparp)
                    131:                cd ${ADDSRC}/choparp
                    132:                rm -f choparp
                    133:                ${MK} choparp || exit 1
                    134:                install choparp ${P}/sbin || exit 1
                    135:                echo ">>> Now rebuild elwix $CMD program ..."
                    136:                ;;
                    137:        ttcp)
                    138:                cd ${ADDSRC}/ttcp
                    139:                rm -f ttcp
                    140:                ${MK} ttcp || exit 1
                    141:                install ttcp ${P}/bin || exit 1
                    142:                echo ">>> Now rebuild elwix $CMD program ..."
                    143:                ;;
1.3       misho     144:        iperf)
                    145:                cd ${ADDSRC}/iperf
                    146:                ./configure --disable-silent-rules ${PFX} || exit 1
                    147:                ${MK} clean || exit 1
                    148:                ${MK} || exit 1
                    149:                ${MK} install || exit 1
                    150:                echo ">>> Now rebuild elwix $CMD program ..."
                    151:                ;;
1.2       misho     152:        trafshow)
                    153:                cd ${ADDSRC}/trafshow
                    154:                ./configure --sysconfdir=/etc ${PFX} || exit 1
                    155:                ${MK} clean || exit 1
                    156:                ${MK} || exit 1
                    157:                ${MK} install || exit 1
                    158:                echo ">>> Now rebuild elwix $CMD program ..."
                    159:                ;;
                    160:        ipsec-tools)
                    161:                cd ${ADDSRC}/ipsec-tools
1.3       misho     162:                ./configure --enable-shared --sysconfdir=/etc/racoon --localstatedir=/var/run --with-pkgversion=elwix-0.8.2 \
1.2       misho     163:                                 --enable-debug --enable-ipv6 --enable-adminport --enable-stats \
                    164:                                 --enable-dpd --enable-natt=yes --enable-frag --enable-hybrid \
                    165:                                 --without-libpam --disable-gssapi --with-libradius --without-libldap \
                    166:                                 --disable-samode-unspec --disable-rc5 --disable-idea ${PFX} || exit 1
                    167:                ${MK} clean || exit 1
                    168:                ${MK} || exit 1
                    169:                ${MK} install || exit 1
                    170:                echo ">>> Now rebuild elwix $CMD program ..."
                    171:                ;;
                    172:        dhcp)
                    173:                cd ${ADDSRC}/dhcp
                    174:                ./configure --localstatedir=/var --enable-paranoia --enable-early-chroot \
                    175:                                --enable-dhcpv6 ${PFX} || exit 1
                    176:                ${MK} clean || exit 1
                    177:                ${MK} || exit 1
                    178:                install server/dhcpd ${P}/sbin || exit 1
                    179:                install relay/dhcrelay ${P}/sbin || exit 1
                    180:                install dhcpctl/omshell ${P}/bin || exit 1
                    181:                echo ">>> Now rebuild elwix $CMD program ..."
                    182:                ;;
                    183:        dhcping)
                    184:                cd ${ADDSRC}/dhcping
                    185:                ./configure ${PFX} || exit 1
                    186:                ${MK} clean || exit 1
                    187:                ${MK} || exit 1
                    188:                ${MK} install || exit 1
                    189:                echo ">>> Now rebuild elwix $CMD program ..."
                    190:                ;;
                    191:        mrouted)
                    192:                cd ${ADDSRC}/mrouted
                    193:                ${MK} clean || exit 1
                    194:                ${MK} || exit 1
                    195:                install map-mbone ${P}/sbin || exit 1
                    196:                install mrinfo ${P}/sbin || exit 1
                    197:                install mrouted ${P}/sbin || exit 1
                    198:                install mtrace ${P}/sbin || exit 1
                    199:                echo ">>> Now rebuild elwix $CMD program ..."
                    200:                ;;
                    201:        igmpproxy)
                    202:                cd ${ADDSRC}/igmpproxy
1.3       misho     203:                ${CEXEC} INSTALL="/usr/bin/install" ./configure ${PFX} || exit 1
1.2       misho     204:                ${MK} clean || exit 1
                    205:                ${MK} || exit 1
                    206:                ${MK} install || exit 1
                    207:                echo ">>> Now rebuild elwix $CMD program ..."
                    208:                ;;
                    209:        bmon)
                    210:                cd ${ADDSRC}/bmon
1.3       misho     211:                LDFLAGS="-L${PKG}/lib" CFLAGS="-I${PKG}/include" ${CEXEC} INSTALL="/usr/bin/install" ./configure ${PFX} || exit 1
1.2       misho     212:                ${MK} clean || exit 1
                    213:                ${MK} || exit 1
                    214:                ${MK} install || exit 1
                    215:                echo ">>> Now rebuild elwix $CMD program ..."
                    216:                ;;
                    217:        iftop)
                    218:                cd ${ADDSRC}/iftop
                    219:                ./configure --with-resolver=netdb_1thread ${PFX} || exit 1
                    220:                ${MK} clean || exit 1
                    221:                ${MK} || exit 1
                    222:                ${MK} install || exit 1
                    223:                echo ">>> Now rebuild elwix $CMD program ..."
                    224:                ;;
1.3       misho     225:        libnet)
1.2       misho     226:                cd ${ADDSRC}/libnet
1.3       misho     227:                ${CEXEC} INSTALL="/usr/bin/install" ./configure ${PFX} || exit 1
1.2       misho     228:                ${MK} clean || exit 1
                    229:                ${MK} || exit 1
                    230:                ${MK} install || exit 1
1.3       misho     231:                echo ">>> Now rebuild elwix $CMD program ..."
                    232:                ;;
                    233:        arping)
1.2       misho     234:                cd ${ADDSRC}/arping
1.3       misho     235: #              ${CEXEC} LDFLAGS=-L${ADDSRC}/libnet/src CFLAGS=-I${ADDSRC}/libnet/include \
                    236:                LDFLAGS="-L${PKG}/lib" CFLAGS="-I${PKG}/include" ${CEXEC} INSTALL="/usr/bin/install" ./configure ${PFX} || exit 1
1.2       misho     237:                ${MK} clean || exit 1
                    238:                ${MK} || exit 1
                    239:                ${MK} install || exit 1
                    240:                echo ">>> Now rebuild elwix $CMD program ..."
                    241:                ;;
                    242:        hping2)
                    243:                cd ${ADDSRC}/hping2
1.3       misho     244:                ${CEXEC} INSTALL="/usr/bin/install" ./configure ${PFX} || exit 1
1.2       misho     245:                ${MK} clean || exit 1
1.3       misho     246:                case ${TARGET_ARCH} in
                    247:                        i386|amd64)
                    248:                                CROSSCOMPILE="-D__LITTLE_ENDIAN_BITFIELD" ${MK} || exit 1
                    249:                                ;;
                    250:                        *)
                    251:                                CROSSCOMPILE="-D__BIG_ENDIAN_BITFIELD" ${MK} || exit 1
                    252:                                ;;
                    253:                esac
                    254:                ${MK} strip
1.2       misho     255:                install hping2 ${P}/sbin || exit 1
                    256:                echo ">>> Now rebuild elwix $CMD program ..."
                    257:                ;;
                    258:        mtr)
                    259:                cd ${ADDSRC}/mtr
1.3       misho     260:                ${CEXEC} INSTALL="/usr/bin/install" ./configure --enable-ipv6 --without-gtk ${PFX} || exit 1
1.2       misho     261:                ${MK} clean || exit 1
                    262:                ${MK} || exit 1
                    263:                ${MK} install || exit 1
                    264:                echo ">>> Now rebuild elwix $CMD program ..."
                    265:                ;;
                    266:        ipguard)
                    267:                cd ${ADDSRC}/ipguard
                    268:                ${MK} clean || exit 1
1.3       misho     269:                ${MK} PREFIX="${PKG}" LOCALBASE="${PKG}" || exit 1
1.2       misho     270:                install ipguard ${P}/sbin || exit 1
                    271:                echo ">>> Now rebuild elwix $CMD program ..."
                    272:                ;;
                    273:        miniupnpd)
                    274:                cd ${ADDSRC}/miniupnpd
                    275:                ${MK} clean || exit 1
                    276:                ${MK} || exit 1
                    277:                install miniupnpd ${P}/sbin || exit 1
                    278:                install miniupnpdctl ${P}/sbin || exit 1
                    279:                echo ">>> Now rebuild elwix $CMD program ..."
                    280:                ;;
                    281:        miniupnpc)
                    282:                cd ${ADDSRC}/miniupnpc
                    283:                ${MK} clean || exit 1
                    284:                ${MK} || exit 1
                    285:                install libminiupnpc.so ${P}/lib || exit 1
                    286:                install external-ip.sh ${P}/bin || exit 1
                    287:                install upnpc-shared ${P}/bin/upnpc || exit 1
1.3.2.1 ! misho     288:                echo ">>> Now rebuild elwix $CMD program ..."
        !           289:                ;;
        !           290:        pimd)
        !           291:                cd ${ADDSRC}/pimd
        !           292:                ${CEXEC} INSTALL="/usr/bin/install" ./configure --enable-scoped-acls --prefix=${PFX} || exit 1
        !           293:                ${MK} clean || exit 1
        !           294:                install pimd ${P}/sbin || exit 1
1.2       misho     295:                echo ">>> Now rebuild elwix $CMD program ..."
                    296:                ;;
                    297:        smartmontools)
                    298:                cd ${ADDSRC}/smartmontools
                    299:                ./configure --enable-sample --disable-dependency-tracking --enable-drivedb ${PFX} || exit 1
                    300:                ${MK} clean || exit 1
                    301:                ${MK} || exit 1
                    302:                ${MK} install || exit 1
                    303:                echo ">>> Now rebuild elwix $CMD program ..."
                    304:                ;;
                    305:        libiconv)
                    306:                cd ${ADDSRC}/libiconv
                    307:                ./configure --enable-static --without-libintl-prefix ${PFX} || exit 1
                    308:                ${MK} clean || exit 1
                    309:                ${MK} || exit 1
                    310:                ${MK} install || exit 1
                    311:                echo ">>> Now rebuild elwix $CMD program ..."
                    312:                ;;
                    313:        quagga)
                    314:                cd ${ADDSRC}/quagga
1.3       misho     315:                ${CEXEC} INSTALL="/usr/bin/install" ./configure --enable-user=quagga --enable-group=quagga --disable-snmp \
1.2       misho     316:                                --sysconfdir=/etc/quagga --localstatedir=/var/run/quagga \
                    317:                                --enable-vtysh --enable-opaque-lsa --enable-rtadv ${PFX} || exit 1
                    318:                ${MK} clean || exit 1
                    319:                ${MK} || exit 1
                    320:                ${MK} install || exit 1
                    321:                echo ">>> Now rebuild elwix $CMD program ..."
                    322:                ;;
                    323:        pcre)
                    324:                cd ${ADDSRC}/pcre
                    325:                ./configure --enable-utf --enable-unicode-properties --enable-pcre8 \
                    326:                                --enable-pcre16 --enable-pcre32 ${PFX} || exit 1
                    327:                ${MK} clean || exit 1
                    328:                ${MK} || exit 1
                    329:                ${MK} install || exit 1
                    330:                echo ">>> Now rebuild elwix $CMD program ..."
                    331:                ;;
                    332:        libxml2)
                    333:                cd ${ADDSRC}/libxml2
                    334:                ./configure --without-python ${PFX} || exit 1
                    335:                ${MK} clean || exit 1
                    336:                ${MK} || exit 1
                    337:                ${MK} install || exit 1
                    338:                echo ">>> Now rebuild elwix $CMD program ..."
                    339:                ;;
                    340:        php)
                    341:                cd ${ADDSRC}/php
                    342:                ./configure --with-layout=GNU --localstatedir=/var --with-config-file-scan-dir=/etc/php \
                    343:                        --disable-all --enable-libxml --enable-xml --with-libxml-dir=${P} --with-openssl \
                    344:                        --enable-zip --enable-sqlite-utf8 ${PFX} || exit 1
                    345:                ${MK} clean || exit 1
                    346:                ${MK} || exit 1
                    347:                ${MK} install || exit 1
                    348:                rm -f ${P}/bin/php
                    349:                strip -s ${P}/bin/php-cgi
                    350:                echo ">>> Now rebuild elwix $CMD program ..."
                    351:                ;;
                    352:        scan_ffs)
                    353:                cd ${ADDSRC}/scan_ffs
                    354:                ${MK} clean || exit 1
                    355:                ${MK} || exit 1
                    356:                install scan_ffs ${P}/bin || exit 1
                    357:                echo ">>> Now rebuild elwix $CMD program ..."
                    358:                ;;
                    359:        dnsmasq)
                    360:                cd ${ADDSRC}/dnsmasq
                    361:                ${MK} clean || exit 1
                    362:                ${MK} || exit 1
                    363:                install src/dnsmasq ${P}/bin || exit 1
                    364:                echo ">>> Now rebuild elwix $CMD program ..."
                    365:                ;;
                    366:        rsync)
                    367:                cd ${ADDSRC}/rsync
1.3       misho     368:                ${CEXEC} INSTALL="/usr/bin/install" ./configure.sh --disable-debug --enable-ipv6 --with-rsyncd-conf=/etc/rsyncd.conf \
1.2       misho     369:                        --disable-iconv --with-included-popt ${PFX} || exit 1
                    370:                ${MK} clean || exit 1
                    371:                ${MK} || exit 1
                    372:                ${MK} install || exit 1
                    373:                echo ">>> Now rebuild elwix $CMD program ..."
                    374:                ;;
                    375:        istgt)
                    376:                cd ${ADDSRC}/istgt
                    377:                ./configure --enable-symlink-device ${PFX} || exit 1
                    378:                ${MK} clean || exit 1
                    379:                ${MK} || exit 1
                    380:                install src/istgt ${P}/bin || exit 1
                    381:                install src/istgtcontrol ${P}/bin || exit 1
                    382:                echo ">>> Now rebuild elwix $CMD program ..."
                    383:                ;;
                    384:        ntp)
                    385:                cd ${ADDSRC}/ntp
                    386:                ./configure --without-ntpsnmpd --with-crypto --enable-ipv6 --enable-BANCOMM \
                    387:                        --enable-GPSVME --enable-ACTS --enable-ARBITER --enable-ARCRON_MSF \
                    388:                        --enable-AS2201 --enable-ATOM --enable-CHRONOLOG --enable-CHU \
                    389:                        --enable-AUDIO_CHU --enable-DATUM --enable-DUMBCLOCK --enable-FG \
                    390:                        --enable-HEATH --enable-HOPFSERIAL --enable-HOPFPCI --enable-HPGPS \
                    391:                        --enable-IRIG --enable-JJY --enable-JUPITER --enable-LEITCH \
                    392:                        --enable-LOCAL_CLOCK --enable-MX4200 --enable-NEOCLOCK4X --enable-NMEA \
                    393:                        --enable-ONCORE --enable-PALISADE --enable-PCF --enable-PST \
                    394:                        --enable-RIPENCC --enable-SHM --enable-SPECTRACOM --enable-TRUETIME \
                    395:                        --enable-ULINK --enable-WWV --enable-ZYFER --enable-COMPUTIME \
                    396:                        --enable-DCF7000 --enable-HOPF6021 --enable-MEINBERG --enable-RAWDCF \
                    397:                        --enable-RCC8000 --enable-SCHMID --enable-TRIMTAIP --enable-TRIMTSIP \
                    398:                        --enable-WHARTON --enable-VARITEXT ${PFX} || exit 1
                    399:                ${MK} clean || exit 1
                    400:                ${MK} || exit 1
                    401:                ${MK} install || exit 1
                    402:                echo ">>> Now rebuild elwix $CMD program ..."
                    403:                ;;
                    404:        nginx)
                    405:                cd ${ADDSRC}/nginx
                    406:                ./configure --conf-path=/etc/nginx.conf --user=www --group=www \
                    407:                        --pid-path=/var/run/nginx.pid \
                    408:                        --error-log-path=/var/log/nginx-error.log \
                    409:                        --lock-path=/var/run/nging.lock \
                    410:                        --http-log-path=/var/log/nginx-access.log --with-ipv6 \
                    411:                        --with-http_ssl_module --with-http_mp4_module ${PFX} || exit 1
                    412: #              ${MK} clean || exit 1
                    413:                ${MK} || exit 1
                    414: #              ${MK} install || exit 1
                    415:                echo ">>> Now rebuild elwix $CMD program ..."
                    416:                ;;
                    417:        spawn-fcgi)
                    418:                cd ${ADDSRC}/spawn-fcgi
                    419:                ./configure ${PFX} || exit 1
                    420:                ${MK} clean || exit 1
                    421:                ${MK} || exit 1
                    422:                ${MK} install || exit 1
                    423:                echo ">>> Now rebuild elwix $CMD program ..."
                    424:                ;;
                    425:        lighttpd)
                    426:                cd ${ADDSRC}/lighttpd
1.3       misho     427:                ./configure --libdir=/usr/local/lib/lighttpd --without-attr --without-bzip2 \
                    428:                        --without-gdbm --without-libev --without-lua --without-memcached --with-openssl \
                    429:                        --without-valgrind --enable-static ${PFX} || exit 1
1.2       misho     430:                ${MK} clean || exit 1
                    431:                ${MK} || exit 1
                    432:                ${MK} install || exit 1
                    433:                echo ">>> Now rebuild elwix $CMD program ..."
                    434:                ;;
                    435:        *)
                    436:                echo "Package not supported at this moment ..."
                    437:                exit 1
                    438: esac

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