LoginSignup
6
6

More than 5 years have passed since last update.

nginx-buildでnginScriptのビルドを自動化する

Posted at

前回の「nginScriptで遊んでみた」では手動でnginScriptをnginxに組み込んでビルドしてたけど、nginx-buildでビルドできるようにしてみた。(v0.6.0から可能)

nginx-buildのインストール

nginx-buildのインストールはgo getでできる。

go get -u github.com/cubicdaiya/nginx-build

あるいはここからビルド済みバイナリをダウンロードする。

nginx-buildでnginScriptを組み込む

まず以下のiniファイルを用意する。

modules3rd.ini
[njs/nginx]
form=hg
url=http://hg.nginx.org/njs
shprov=./configure && make
shprovdir=..

あとはnginx-buildを叩くだけ。

$ nginx-build -d work -m modules3rd.ini
nginx-build: 0.6.0
Compiler: gc go1.5.1
2015/10/01 08:02:13 Download njs/nginx.....
2015/10/01 08:02:13 Download nginx-1.9.5.....
2015/10/01 08:02:15 Extract nginx-1.9.5.tar.gz.....
2015/10/01 08:02:19 Generate configure script for nginx-1.9.5.....
2015/10/01 08:02:19 Configure nginx-1.9.5.....
2015/10/01 08:02:26 Build nginx-1.9.5.....
2015/10/01 08:02:29 Complete building nginx!

nginx version: nginx/1.9.5
built by clang 7.0.0 (clang-700.0.72)
configure arguments: --with-cc-opt=-Wno-deprecated-declarations --add-module=../njs/nginx

2015/10/01 08:02:29 Enter the following command for install nginx.

   $ cd work/nginx/1.9.5/nginx-1.9.5
   $ sudo make install

というわけでnginx-buildでnginScriptを組み込んでビルドできるようになりました。

6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6