case ${spf_version?} in
  1.12)
    spf_cc_ cpp_args &&
    spf_cc_ cc_args -O2 &&
    spf_cc_ ld_args &&
    spf_cc_ make_args &&
    spf_cc_ nls &&
    spf_do_install() {
      if test n = "${spf_ccv_nls?}"
        then set x --disable-nls
        else set x
      fi && shift &&
      ./configure "$@" --prefix="${spf_path_prefix?}" &&
      set setowner= \
        CFLAGS="${spf_args_cpp?} ${spf_args_cc?}" \
        LDFLAGS="${spf_args_cc?} ${spf_args_ld?}" &&
      eval 'make "$@" '"${spf_args_make?} all install"
    };;
  *)
    spf_template gnu &&
    case ${spf_version?} in
      1.14|1.15.1)
        spf_depend autoconf flags none &&
        spf_template_gnu_do_before_configure() { autoconf; };;
      1.15) #### report this
        spf_template_gnu_do_before_configure() {
          prj_sedfile src/fgconsole.c '/^#include <linux\/serial\.h>/i\
#include <linux/types.h>\
'
        };;
      *) :;;
    esac &&
    spf_cc_ nls &&
    case ${spf_version?} in
      1.14) spf_cmd_noop strip;;
      *) :;;
    esac;;
esac &&
spf_url home  'http://www.kernel.org/pub/linux/utils/kbd/' &&
spf_url watch 'http://www.kernel.org/pub/linux/utils/kbd/' &&
spf_url src \
  "http://kernel.org/pub/linux/utils/kbd/kbd-${spf_version?}.tar.bz2" &&
case ${spf_version?} in
  *wip-*)
    prj_u2 prj_capture pkg_version \
      prj_sedarg1 's/wip-[0-9]*$/wip/' "${spf_version?}" &&
    spf_srcdir kbd-"${pkg_version?}";;
  *) :;;
esac &&
case ${spf_version?}. in
  1.1[24].*) spf_no_check;; ## there are no tests
  *) :;;
esac &&
spf_tested_version 1.15.3 &&
spf_tested_version 1.15.2 &&
spf_tested_version 1.15 &&
spf_tested_version 1.14.1 &&
spf_tested_version 1.14 &&
spf_tested_version 1.12

