APR (Apache Portable Runtime) のインストール

Apache HTTP ServerやSubversionなどに使われるAPR (Apache Portable Runtime)をソースコードからインストールする。
APRはOSのインターフェイスの違いを吸収してくれるライブラリーであり,APRを使うことでクロスプラットフォームなソフトがしやすくなるらしい。
項目 | 説明 |
---|---|
配布元 | Welcome! – The Apache Portable Runtime Project |
リポジトリー | |
手順 | apr/README at 1.6.5 · apache/apr |
依存情報 | apr/README at 1.6.5 · apache/apr |
依存先 (必須) | GNU Make |
依存先 (任意) | リポジトリーからのビルド用: autoconf, libtool 1.4+, python |
依存元 |
|
sh -eux <<-"EOT"
PKG=apr VER=1.6.5 TAG=$VER
LOCAL=~/.local J=$(grep -cs '^processor' /proc/cpuinfo || echo 2)
mkdir -p "$LOCAL/src"
cd "$LOCAL/src"
if command -v git >/dev/null; then
[ -e $PKG ] || git clone --depth 1 https://github.com/apache/$PKG
cd $PKG
git fetch --depth 1 origin tag $TAG
git checkout -f $TAG
git clean -dfX
./buildconf
else
[ -e $PKG-VER ] || wget http://archive.apache.org/dist/apr/$PKG-$VER.tar.bz2
tar -xf $PKG-$VER.*
cd $PKG-$VER
make -kj $J distclean clean || :
fi
./configure --prefix="$LOCAL/stow/$PKG-$VER"
make -j $J
make -j $J test
make -j $J install
cd "$LOCAL/stow"
echo $PKG-[0-9]* | xargs -n 1 stow --ignore=dir -D
stow --ignore=dir $PKG-$VER
EOT
日付 | バージョン | OS | 依存関係 |
---|---|---|---|
2018-03-31 | 1.6.3 | Ubuntu 16.04 | GNU Make 4.2.1, GCC 8.1.0 |
2019-03-03 | 1.6.5 | Ubuntu 18.04 | GNU Make 4.2.1, GCC 8.1.0 |
2019-03-31 | 1.6.5 | Ubuntu 18.04 | GNU Make 4.2.1, GCC 7.4.0, libtool2.4.6 |
APRをインストールしたら,セットでよく使われるAPR-utilもインストールしておこう。