language: perl
perl:
  - "5.18"
  - "5.16"
  - "5.14"
  - "5.12"
  - "5.10"
before_install:
  - cpanm Carton
  - carton install
  - git submodule update --init --recursive
  - git clone git://github.com/maxmind/libmaxminddb
  - cd libmaxminddb
  - ./bootstrap
  - ./configure
  - make
  - sudo make install
  - sudo ldconfig
  - cd ..
  - sudo apt-get install --assume-yes apache2-mpm-prefork apache2.2-bin apache2.2-common apache2-prefork-dev apache2-utils
  - git clone git://github.com/ttkzw/mod_remoteip-httpd22
  - cd mod_remoteip-httpd22
  - sudo apxs2 -i -c -n mod_remoteip.so mod_remoteip.c
  - cd ..
install:
  - cpanm --verbose --installdeps --notest .
script:
  - perl Makefile.PL -configure -httpd_conf t/setup/apache2.conf -src_dir /usr/lib/apache2/modules
  - carton exec "t/TEST -v"
after_failure:
  - cat t/logs/error_log
notifications:
  email:
    recipients:
      - oalders@maxmind.com
    on_success: change
    on_failure: always

language: perl
perl:
  - "5.18"
  - "5.16"
  - "5.14"
  - "5.12"
  - "5.10"
before_install:
  - cpanm Carton
  - carton install
  - git submodule update --init --recursive
  - git clone git://github.com/maxmind/libmaxminddb
  - cd libmaxminddb
  - ./bootstrap
  - ./configure
  - make
  - sudo make install
  - sudo ldconfig
  - cd ..
  - sudo apt-get install --assume-yes apache2-mpm-prefork apache2.2-bin apache2.2-common apache2-prefork-dev apache2-utils
  - git clone git://github.com/ttkzw/mod_remoteip-httpd22
  - cd mod_remoteip-httpd22
  - sudo apxs2 -i -c -n mod_remoteip.so mod_remoteip.c
  - cd ..
  - sudo mkdir -p /usr/local/share/GeoIP
  - sudo cp maxmind-db/test-data/GeoIP2-City-Test.mmdb /usr/local/share/GeoIP/
install:
  - cpanm --verbose --installdeps --notest .
script:
  - perl Makefile.PL -configure -httpd_conf t/setup/apache2.conf -src_dir /usr/lib/apache2/modules
  - carton exec "t/TEST -v"
after_failure:
  - cat t/logs/error_log
notifications:
  email:
    recipients:
      - oalders@maxmind.com
    on_success: change
    on_failure: always

Copy test GeoIP db to /usr/local/share/GeoIP
Copy test GeoIP db to /usr/local/share/GeoIP
