QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1685|回复: 4

ocaml-3.10.0 建包出错[已自行解决]

[复制链接]
发表于 2007-7-30 11:50:09 | 显示全部楼层 |阅读模式
现在看起来 ocaml 这东西还是需要的,kdeedu/kalzium 依赖编译,mldonkey 依赖编译。。。
我自己很想要 kalzium 的化学方程式配平功能,还有 mldonkey 的电骡下载,现在没法弄了。。

修改好了 spec 文件贴出来,自认为没什么问题,可就是报错,从来没遇到过的错误。。

[root@MagicLinux SPECS]# rpmbuild -ba --target=i686 ocaml.spec
Building target platforms: i686
Building for target i686
error: Recursion depth(17) greater than max(16)
15<                               (empty)
14<                             (empty)
13<                           (empty)
12<                         (empty)
11<                       (empty)
10<                     (empty)
  9<                   (empty)
  8<                 (empty)
  7<               (empty)
  6<             (empty)
  5<           (empty)
  4<         (empty)
  3<       (empty)
  2<     (empty)
  1<   (empty)
  0< BuildRoot: /var/tmp/ocaml-3.10.0-
error: line 17: BuildRoot: /var/tmp/ocaml-3.10.0-
error: Package has no %description: ocaml


贴出 spec 文件内容:

  1. %define version 3.10.0
  2. %define release 1mgc

  3. Name: ocaml
  4. Summary: The Objective Caml compiler and programming environment
  5. Summary(zh_CN): Objective Caml 编译器和编程环境
  6. Version: %{version}
  7. Release: %{release}
  8. License: part LGPL, part QPL
  9. Group: Development/Languages
  10. Group(zh_CN): 开发/语言
  11. URL: [url]http://caml.inria.fr/[/url]
  12. Source0: [url]http://caml.inria.fr/distrib/ocaml-3.10/ocaml-3.10.0.tar.gz[/url]
  13. Source1: [url]http://caml.inria.fr/distrib/ocaml-3.10/ocaml-3.10-refman.html.tar.gz[/url]
  14. Source2: [url]http://caml.inria.fr/distrib/ocaml-3.10/ocaml-3.10-refman.ps.gz[/url]
  15. Source3: [url]http://caml.inria.fr/distrib/ocaml-3.10/ocaml-3.10-refman.info.tar.gz[/url]
  16. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot-%(%{__id_u} -n)
  17. Packager: Ni Hui <shuizhuyuanluo [at}   126    'dot  '    com>
  18. Prefix: %{_prefix}
  19. Provides: labltk
  20. BuildRequires: %{_includedir}/tcl.h %{_includedir}/tk.h
  21. BuildRequires: ncurses-devel
  22. BuildRequires: gdbm-devel
  23. BuildRequires: tcl-devel, tk-devel
  24. BuildRequires: emacs, perl
  25. BuildRequires: libICE-devel
  26. BuildRequires: libSM-devel
  27. BuildRequires: libX11-devel
  28. BuildRequires: libXaw-devel
  29. BuildRequires: libXext-devel
  30. BuildRequires: libXft-devel
  31. BuildRequires: libXmu-devel
  32. BuildRequires: libXrender-devel
  33. BuildRequires: libXt-devel
  34. BuildRequires: mesa-libGL-devel
  35. BuildRequires: mesa-libGLU-devel
  36. Requires(post): /sbin/install-info
  37. Requires(preun): /sbin/install-info

  38. Patch1: ocaml-3.08-wish1804.patch

  39. %define debug_package %{nil}

  40. %description
  41. Objective Caml is a high-level, strongly-typed, functional and
  42. object-oriented programming language from the ML family of languages.

  43. This package comprises two batch compilers (a fast bytecode compiler
  44. and an optimizing native-code compiler), an interactive toplevel system,
  45. parsing tools (Lex,Yacc,Camlp4), a replay debugger, a documentation generator,
  46. and a comprehensive library.

  47. %prep
  48. %setup -T -q -b 0
  49. %patch1 -p0
  50. %setup -T -q -D -a 1
  51. %setup -T -q -D -a 3
  52. cp %{SOURCE2} refman.ps.gz

  53. %build
  54. #CFLAGS="$RPM_OPT_FLAGS" ./configure -bindir %{_bindir} -libdir %{_libdir}/ocaml -mandir %{_mandir}/man1 -with-pthread
  55. %configure -bindir %{_bindir} -libdir %{_libdir}/ocaml -mandir %{_mandir}/man1 -with-pthread

  56. make world opt opt.opt
  57. # %{?_smp_mflags} breaks the build

  58. %install
  59. rm -rf %{buildroot}

  60. %makeinstall BINDIR=%{buildroot}%{_bindir} LIBDIR=%{buildroot}%{_libdir}/ocaml MANDIR=%{buildroot}%{_mandir}

  61. # 安装 emacs/site-lisp 内容
  62. cd emacs
  63. make install BINDIR=%{buildroot}%{_bindir} EMACSDIR=%{buildroot}%{_datadir}/emacs/site-lisp

  64. # 安装 info 文件夹的内容
  65. mkdir -p %{buildroot}%{_infodir}
  66. cd infoman
  67. cp ocaml*.gz %{buildroot}%{_infodir}

  68. %clean
  69. %{__rm} -rf %{buildroot}
  70. %{__rm} -rf %{_builddir}/%{name}-%{version}

  71. %post
  72. /sbin/install-info \
  73.     --entry "* ocaml: (ocaml).    The Objective Caml compiler and programming environment" \
  74.     --section "Programming Languages" \
  75.     %{_infodir}/%{name}.info \
  76.     %{_infodir}/dir 2>/dev/null || :

  77. %preun
  78. if [ $1 -eq 0 ]; then
  79.   /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir 2>/dev/null || :
  80. fi

  81. # Disable build root strip policy:
  82. # executables generated by ocamlc -custom MUST NOT BE STRIPPED
  83. # But now that we have dynamic loading of C code, none of the executables
  84. # in the distribution is generated by ocamlc -custom, so leave default.
  85. # %define __spec_install_post /usr/lib/rpm/brp-compress

  86. %files
  87. %defattr(-, root, root)
  88. %{_bindir}/*
  89. %{_mandir}/man1/*
  90. %{_mandir}/man3/*
  91. %{_libdir}/ocaml
  92. %{_datadir}/emacs/site-lisp/*
  93. %{_infodir}/*

  94. %doc README LICENSE refman.ps.gz htmlman Changes

  95. %changelog
  96. * Mon Jul 30 2007 Ni Hui <shuizhuyuanluo {at }126     com> - 3.10.0-1mgc
  97. - 去除 configure 补丁,恢复 /usr/bin 中可执行文件的路径
  98. - 修改 spec 文件,移植至 Magic Linux-2.1

  99. * Mon May 21 2007  Aleksey Nogin <[email][email protected][/email]> 3.10.0-1
  100. - Updated for 3.10.0

  101. * Tue May 09 2006  Aleksey Nogin <[email][email protected][/email]> 3.09.2-1
  102. - Updated for 3.09.2

  103. * Fri Jan 20 2006  Aleksey Nogin <[email][email protected][/email]> 3.09.1-1
  104. - Updated for 3.09.1

  105. * Thu Oct 27 2005 Aleksey Nogin <[email][email protected][/email]> 3.09.0-1
  106. - Updated for 3.09.0

  107. * Tue Aug 16 2005 Aleksey Nogin <[email][email protected][/email]> 3.08.4-1
  108. - Updated for 3.08.4

  109. * Sun Jun 19 2005 Aleksey Nogin <[email][email protected][/email]> 3.08.3-3
  110. - Borrowed couple small patches from Fedora Extras 4
  111. - Added a post/preun scripts for installing/removing infos
  112.   (again, borrowed from the FE4)
复制代码


一个补丁:
  1. Index: Makefile
  2. ===================================================================
  3. RCS file: /caml/ocaml/Makefile,v
  4. retrieving revision 1.184
  5. diff -u -u -r1.184 Makefile
  6. --- Makefile        2003/07/03 15:13:21        1.184
  7. +++ Makefile        2003/10/29 10:11:35
  8. @@ -250,6 +250,10 @@
  9.         cp toplevel/toplevellib.cma $(LIBDIR)/toplevellib.cma
  10.         cp expunge $(LIBDIR)/expunge$(EXE)
  11.         cp typing/outcometree.cmi typing/outcometree.mli $(LIBDIR)
  12. +        cp typing/typecore.cmi typing/typecore.mli $(LIBDIR)
  13. +        cp parsing/location.cmi parsing/location.mli $(LIBDIR)
  14. +        cp parsing/longident.cmi parsing/longident.mli $(LIBDIR)
  15. +        cp parsing/parsetree.cmi parsing/parsetree.mli $(LIBDIR)
  16.         cp toplevel/topstart.cmo $(LIBDIR)
  17.         cp toplevel/toploop.cmi toplevel/topdirs.cmi toplevel/topmain.cmi $(LIBDIR)
  18.         cd tools; $(MAKE) install
复制代码

[ 本帖最后由 nihui 于 2007-7-30 12:02 编辑 ]
 楼主| 发表于 2007-7-30 12:04:20 | 显示全部楼层
原来的那个是 %{release} 写错一个字母。。

编译需要 emacs,还是没有进行下去。。
回复

使用道具 举报

发表于 2007-7-30 13:10:24 | 显示全部楼层
呵呵,仓库里应该都有,用srpm重建一次应该就可以了。
回复

使用道具 举报

 楼主| 发表于 2007-7-30 13:22:38 | 显示全部楼层

回复 #3 sejishikong 的帖子

你是说 ml2.0 的,还是 ml2.1 的仓库?
仓库里面是没有 ocaml 的哦~
回复

使用道具 举报

发表于 2007-7-30 13:37:47 | 显示全部楼层
2.0里。
2.1好像还没有。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-24 01:35 , Processed in 0.037884 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表