#!/usr/bin/env beesh

# BEE_VERSION inetutils-1.9.4-1

SRCURL[0]="https://ftp.gnu.org/gnu/inetutils/inetutils-${PKGVERSION}.tar.gz"

###############################################################################
## Add URLs/pathes to patch files to the PATCHURL array.
## The sources will be patched in the order of the array.

# PATCHURL+=()

###############################################################################
## Add filename patterns to the EXCLUDE array of files that should not
## be added to you package but may be present in the image directory.

# EXCLUDE+=()

###############################################################################
## Uncomment the next statement, if the software may not be able to be build
## outside the source directory and need to be build inside the source
## directory.

# build_in_sourcedir

###############################################################################
## bee cannot detect buildtypes specified in subdirectories.
## Sometimes packages "hide" the real sources in a subdirectory named
## 'src' or 'cmake' or ..
## use 'sourcesubdir_append' to specify this directory if known.

# sourcesubdir_append src


###############################################################################
## Change the default (auto-detected) steps to
## extract, patch, configure/setup, build and install the software.
## Make sure the mee_install function does install everything to the
## image directory "${D}"

#mee_extract() {
#    bee_extract "${@}"
#}

#mee_patch() {
#    bee_patch "${@}"
#}

mee_patch_post() {
    sed -i -e 's/SUIDMODE = -o root/SUIDMODE =/' src/Makefile.am
    sed -i -e 's/SUIDMODE = -o root/SUIDMODE =/' ping/Makefile.am
    automake
}

mee_configure() {
    bee_configure \
        --disable-logger \
        --disable-syslogd \
        --disable-whois \
        --disable-traceroute
}

#mee_build() {
#    bee_build
#}

#mee_install() {
#    bee_install
#}

## by default this may be 'make install DESTDIR="${D}"'