kind: autotools
depends:
- tools.bst
- pcre-utils.bst
- python2-core.bst
sources:
- kind: git
  url: upstream:apache/apr
  track: trunk
  ref: 3c818c6d7351f0130282d212a69035642f5fecad
config:
  configure-commands:
  - ./buildconf
  - |
    ./configure --prefix="%{prefix}" \
                --disable-static \
                --enable-threads \
                --with-installbuilddir="%{prefix}"/share/apr-1/build
  install-commands:
    (>):
    - |
      for file in find_apr.m4 apr_common.m4 install.sh gen-build.py get-version.sh \
                  config.guess config.sub; do
        cp build/"$file" "%{install-root}%{prefix}"/share/apr-1/build/"$file";
      done
    - ln -sf /usr/include/apr-2 "%{install-root}%{prefix}"/share/apr-1/build/
    - cp include/private/apr_support.h "%{install-root}%{prefix}"/include/apr-2
    - cp include/arch/unix/apr_private.h "%{install-root}%{prefix}"/include/apr-2
