ocaml-3.10.0 建包出错[已自行解决]
现在看起来 ocaml 这东西还是需要的,kdeedu/kalzium 依赖编译,mldonkey 依赖编译。。。我自己很想要 kalzium 的化学方程式配平功能,还有 mldonkey 的电骡下载,现在没法弄了。。
修改好了 spec 文件贴出来,自认为没什么问题,可就是报错,从来没遇到过的错误。。:( :(
# 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 文件内容:
%define version 3.10.0
%define release 1mgc
Name: ocaml
Summary: The Objective Caml compiler and programming environment
Summary(zh_CN): Objective Caml 编译器和编程环境
Version: %{version}
Release: %{release}
License: part LGPL, part QPL
Group: Development/Languages
Group(zh_CN): 开发/语言
URL: http://caml.inria.fr/
Source0: http://caml.inria.fr/distrib/ocaml-3.10/ocaml-3.10.0.tar.gz
Source1: http://caml.inria.fr/distrib/ocaml-3.10/ocaml-3.10-refman.html.tar.gz
Source2: http://caml.inria.fr/distrib/ocaml-3.10/ocaml-3.10-refman.ps.gz
Source3: http://caml.inria.fr/distrib/ocaml-3.10/ocaml-3.10-refman.info.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot-%(%{__id_u} -n)
Packager: Ni Hui <shuizhuyuanluo [at} 126 'dot' com>
Prefix: %{_prefix}
Provides: labltk
BuildRequires: %{_includedir}/tcl.h %{_includedir}/tk.h
BuildRequires: ncurses-devel
BuildRequires: gdbm-devel
BuildRequires: tcl-devel, tk-devel
BuildRequires: emacs, perl
BuildRequires: libICE-devel
BuildRequires: libSM-devel
BuildRequires: libX11-devel
BuildRequires: libXaw-devel
BuildRequires: libXext-devel
BuildRequires: libXft-devel
BuildRequires: libXmu-devel
BuildRequires: libXrender-devel
BuildRequires: libXt-devel
BuildRequires: mesa-libGL-devel
BuildRequires: mesa-libGLU-devel
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
Patch1: ocaml-3.08-wish1804.patch
%define debug_package %{nil}
%description
Objective Caml is a high-level, strongly-typed, functional and
object-oriented programming language from the ML family of languages.
This package comprises two batch compilers (a fast bytecode compiler
and an optimizing native-code compiler), an interactive toplevel system,
parsing tools (Lex,Yacc,Camlp4), a replay debugger, a documentation generator,
and a comprehensive library.
%prep
%setup -T -q -b 0
%patch1 -p0
%setup -T -q -D -a 1
%setup -T -q -D -a 3
cp %{SOURCE2} refman.ps.gz
%build
#CFLAGS="$RPM_OPT_FLAGS" ./configure -bindir %{_bindir} -libdir %{_libdir}/ocaml -mandir %{_mandir}/man1 -with-pthread
%configure -bindir %{_bindir} -libdir %{_libdir}/ocaml -mandir %{_mandir}/man1 -with-pthread
make world opt opt.opt
# %{?_smp_mflags} breaks the build
%install
rm -rf %{buildroot}
%makeinstall BINDIR=%{buildroot}%{_bindir} LIBDIR=%{buildroot}%{_libdir}/ocaml MANDIR=%{buildroot}%{_mandir}
# 安装 emacs/site-lisp 内容
cd emacs
make install BINDIR=%{buildroot}%{_bindir} EMACSDIR=%{buildroot}%{_datadir}/emacs/site-lisp
# 安装 info 文件夹的内容
mkdir -p %{buildroot}%{_infodir}
cd infoman
cp ocaml*.gz %{buildroot}%{_infodir}
%clean
%{__rm} -rf %{buildroot}
%{__rm} -rf %{_builddir}/%{name}-%{version}
%post
/sbin/install-info \
--entry "* ocaml: (ocaml). The Objective Caml compiler and programming environment" \
--section "Programming Languages" \
%{_infodir}/%{name}.info \
%{_infodir}/dir 2>/dev/null || :
%preun
if [ $1 -eq 0 ]; then
/sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir 2>/dev/null || :
fi
# Disable build root strip policy:
# executables generated by ocamlc -custom MUST NOT BE STRIPPED
# But now that we have dynamic loading of C code, none of the executables
# in the distribution is generated by ocamlc -custom, so leave default.
# %define __spec_install_post /usr/lib/rpm/brp-compress
%files
%defattr(-, root, root)
%{_bindir}/*
%{_mandir}/man1/*
%{_mandir}/man3/*
%{_libdir}/ocaml
%{_datadir}/emacs/site-lisp/*
%{_infodir}/*
%doc README LICENSE refman.ps.gz htmlman Changes
%changelog
* Mon Jul 30 2007 Ni Hui <shuizhuyuanluo {at }126 com> - 3.10.0-1mgc
- 去除 configure 补丁,恢复 /usr/bin 中可执行文件的路径
- 修改 spec 文件,移植至 Magic Linux-2.1
* Mon May 21 2007Aleksey Nogin <[email protected]> 3.10.0-1
- Updated for 3.10.0
* Tue May 09 2006Aleksey Nogin <[email protected]> 3.09.2-1
- Updated for 3.09.2
* Fri Jan 20 2006Aleksey Nogin <[email protected]> 3.09.1-1
- Updated for 3.09.1
* Thu Oct 27 2005 Aleksey Nogin <[email protected]> 3.09.0-1
- Updated for 3.09.0
* Tue Aug 16 2005 Aleksey Nogin <[email protected]> 3.08.4-1
- Updated for 3.08.4
* Sun Jun 19 2005 Aleksey Nogin <[email protected]> 3.08.3-3
- Borrowed couple small patches from Fedora Extras 4
- Added a post/preun scripts for installing/removing infos
(again, borrowed from the FE4)
一个补丁:
Index: Makefile
===================================================================
RCS file: /caml/ocaml/Makefile,v
retrieving revision 1.184
diff -u -u -r1.184 Makefile
--- Makefile 2003/07/03 15:13:21 1.184
+++ Makefile 2003/10/29 10:11:35
@@ -250,6 +250,10 @@
cp toplevel/toplevellib.cma $(LIBDIR)/toplevellib.cma
cp expunge $(LIBDIR)/expunge$(EXE)
cp typing/outcometree.cmi typing/outcometree.mli $(LIBDIR)
+ cp typing/typecore.cmi typing/typecore.mli $(LIBDIR)
+ cp parsing/location.cmi parsing/location.mli $(LIBDIR)
+ cp parsing/longident.cmi parsing/longident.mli $(LIBDIR)
+ cp parsing/parsetree.cmi parsing/parsetree.mli $(LIBDIR)
cp toplevel/topstart.cmo $(LIBDIR)
cp toplevel/toploop.cmi toplevel/topdirs.cmi toplevel/topmain.cmi $(LIBDIR)
cd tools; $(MAKE) install
[ 本帖最后由 nihui 于 2007-7-30 12:02 编辑 ] 原来的那个是 %{release} 写错一个字母。。
编译需要 emacs,还是没有进行下去。。 呵呵,仓库里应该都有,用srpm重建一次应该就可以了。
回复 #3 sejishikong 的帖子
你是说 ml2.0 的,还是 ml2.1 的仓库?仓库里面是没有 ocaml 的哦~:) 2.0里。
2.1好像还没有。
页:
[1]