nopan っていうレポジトリから直接ソフトウェアをインストールするインストーラを作り始めた件

perl の場合、CPAN モジュールは sudo cpan -i Module の1コマンドでインストールできる。でも、svn や git レポジトリのコードは、チェックアウトして perl Makefile.PL && make all test && sudo make install とか、めんどくさい。

なので、svn や git レポジトリからソースコードをダウンロードしてインストールするツールを作り始めた。名前は、CPAN モジュール以外も簡単にインストールできるところから、Not-only CPAN、略して nopan。

こんな感じで動きます。まだ適当だけど。

$ sudo nopan http://github.com/kazuho/kaztools.git
downloading files from URL:http://github.com/kazuho/kaztools.git/
MANIFEST.SKIP
Makefile.PL
bt_cores
(略)
perl Makefile.PL
include /private/var/folders/Ir/IrCH-1REGVWgdCXFghbSTE+++TI/-Tmp-/YnLMkjg4Qg/inc/Module/Install.pm
(略)
$ sudo nopan http://svn.coderepos.org/share/lang/c/swifty/trunk/
downloading files from URL:http://svn.coderepos.org/share/lang/c/swifty/trunk/
AUTHORS
COPYING
ChangeLog
(略)
autoreconf -i
Using `AC_PROG_RANLIB' is rendered obsolete by `AC_PROG_LIBTOOL'
glibtoolize: `config.guess' exists: use `--force' to overwrite
glibtoolize: `config.sub' exists: use `--force' to overwrite
glibtoolize: `ltmain.sh' exists: use `--force' to overwrite
./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
(略)

社内 svn からサーバへのデプロイとか、簡単になるといいなぁ。

今後の ToDo としては、

  • 対応インストール方式を増やす
    • 現状は perl モジュールの Makefile.PL 方式と autoconf 系のみ対応
    • ruby とか python モジュールとかどうやるんだろ...
  • CPAN::Shell を使うことで、CPAN モジュールへの依存を自動解決

あたりでしょうか。誰かやってくれないかな...

18:24追記:

えっと、nopan は nopan がインストール済の環境なら、

$ sudo nopan http://github.com/kazuho/nopan.git

でインストールできます。nopan をインストールするには、http://github.com/kazuho/nopan/ から git clone して perl Makefile.PL && make all test && sudo make install してください。