星期四, 十二月 07, 2006

compile gaim with nss for MSN

安装 gaim 之后运行连接 MSN,提示需要 SSL 支持,configure 如下:
$ ./configure
......
SSL Library/Libraries......... : None
......

查看 gaim 的 SSL FAQ 中关于从源代码编译的部分,说明需要 mozilla nss 和 GnuTLS 两者之一来支持 SSL,选择 mozilla nss。但开始安装 nss-3.9.2 无法通过编译,查看 BLFS development 有 nss 的安装,使用 nss-3.11.3:
$ cat /usr/src/nss/.config
pkgname = "nss";
version = "3.11.3";
user = "nss";
groups = "";
group = "nss";
archive = "nss-3.11.3-with-nspr-4.6.3.tar.gz";
patch = "nss-3.11.3-with-nspr-4.6.3-fedora_fixes-1.patch";
command = "tar xfz nss-3.11.3-with-nspr-4.6.3.tar.gz";
command = "cd nss-3.11.3";
command = "patch -Np1 -i ../nss-3.11.3-with-nspr-4.6.3-fedora_fixes-1.patch";
command = "cd mozilla/security/nss";
command = "make BUILD_OPT=1 nss_build_all";
command = "make BUILD_OPT=1 install";
command = "mkdir /usr/include/nspr";
command = "find ../../dist/*/lib -type l \( -name "*.so" -o -name "*.chk" \) -exec cp -L {} /usr/lib \;";
command = "cp -Lr ../../dist/public/* /usr/include";
command = "cp -Lr ../../dist/*/include/* /usr/include/nspr";
command = "cd ../../../../";
command = "rm -rf nss-3.11.3";
time = "20061207 18:32:26 Thu";
这里并没有万全参照 BLFS 文档,而是将:
FAQ-SSL-Gaim
安装 nss 的后面的部分加过来,将 $HOME 替换为 /usr。

然后重新编译 gaim:
# upm i -f /blfs/gaim-1.5.0.tar.bz2
crablfs> cmd tar xfj gaim-1.5.0.tar.bz2
crablfs> cmd cd gaim-1.5.0
crablfs> cmd ./configure --with-nss-includes=/usr/include/nss --with-nspr-includes=/usr/include/nspr --with-nss-libs=/usr/lib --with-nspr-libs=/usr/lib
......
SSL Library/Libraries......... : Mozilla NSS
......
crablfs> cmd make
crablfs> cmd make install
crablfs> cmd cd ..
crablfs> cmd rm -rf gaim-1.5.0
crablfs> cmt

mozilla NSS 是一个 library,而在其底层可以使用 SSLv3, SSLv2, TSL 等加密机制。

没有评论: