nihui 发表于 2007-6-20 14:35:17

Ocaml 和 facile 模块 for kdeedu之kalzium

很喜欢 kdeedu 组件中的软件。
但是在源里装的话,kalzuim 元素周期表的“方程式配平”功能就没有了。
这个功能依赖 Ocaml 和 facile 模块,所以想请开发组在打包的时候把这个加上。

贴上自己写的两个 spec 文件,在 magiclinux 2.1beta0 的系统上测试通过 ^ ^

Summary:        Objective Caml compiler and programming environment
Name:                ocaml
Version:                3.09.3
Release:         1mgc
Group:                Development/Languages
License:                QPL/LGPL
URL:                http://www.ocaml.org
Source:                http://caml.inria.fr/distrib/ocaml-3.09/ocaml-3.09.3.tar.bz2
BuildRoot:        %{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildRequires:        ncurses-devel
BuildRequires:gdbm-devel
BuildRequires:        tcl-devel, tk-devel
BuildRequires:        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

%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
./configure --bindir %{_bindir} -libdir %{_libdir}/ocaml -mandir %{_mandir}/man1

%build
make world opt opt.opt

%install
%makeinstall BINDIR=$RPM_BUILD_ROOT%{_bindir} LIBDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml MANDIR=$RPM_BUILD_ROOT%{_mandir}

%clean
rm -rf $RPM_BUILD_ROOT
rm -rf $RPM_BUILD_DIR/%{name}-%{version}

%files
%defattr(-,root,root)
%{_prefix}
%exclude %{_prefix}/*/debug*
%exclude %{_prefix}/src
%{_bindir}/*
%{_libdir}/ocaml
%{_datadir}
%{_mandir}/man1/*

%changelog
* Tue May 4 2007 Ni Hui <shuizhuyuanluo126.com>
- modify the spec file and port to Magiclinux 2.1beta0

* Sat Dec2 2006 Gerard Milmeister <[email protected]> - 3.09.3-1
- new version 3.09.3

* Mon Aug 28 2006 Gerard Milmeister <[email protected]> - 3.09.2-2
- Rebuild for FE6

* Sun Apr 30 2006 Gerard Milmeister <[email protected]> - 3.09.2-1
- new version 3.09.2

* Fri Feb 17 2006 Gerard Milmeister <[email protected]> - 3.09.1-2
- Rebuild for Fedora Extras 5

* Thu Jan5 2006 Gerard Milmeister <[email protected]> - 3.09.1-1
- new version 3.09.1

* Sun Jan1 2006 Gerard Milmeister <[email protected]> - 3.09.0-1
- new version 3.09.0

* Sun Sep 11 2005 Gerard Milmeister <[email protected]> - 3.08.4-1
- New Version 3.08.4

* Wed May 25 2005 Toshio Kuratomi <toshio-tiki-lounge.com> - 3.08.3-5
- Bump and re-release as last build failed due to rawhide syncing.

* Sun May 22 2005 Toshio Kuratomi <toshio-tiki-lounge.com> - 3.08.3-4
- Fix for gcc4 and the 32 bit assembly in otherlibs/num.
- Fix to allow compilation with RPM_OPT_FLAG defined -O level.

* Sun May 22 2005 Jeremy Katz <[email protected]> - 3.08.3-3
- rebuild on all arches

* Fri Apr7 2005 Michael Schwendt <mschwendtusers.sf.net>
- rebuilt

* Sat Mar 26 2005 Gerard Milmeister <[email protected]> - 3.08.3-1
- New Version 3.08.3

* Sat Feb 12 2005 Gerard Milmeister <[email protected]> - 0:3.08.2-2
- Added patch for removing rpath from shared libs

* Sat Feb 12 2005 Gerard Milmeister <[email protected]> - 0:3.08.2-1
- New Version 3.08.2

* Thu Dec 30 2004 Thorsten Leemhuis <fedoraleemhuisinfo> - 0:3.07-6
- add -x11lib %%{_prefix}/X11R6/%%{_lib} to configure; fixes labltk build
on x86_64

* Tue Dec2 2003 Gerard Milmeister <[email protected]> - 0:3.07-0.fdr.5
- ocamldoc -> ocaml-ocamldoc
- ocaml-doc -> ocaml-docs

* Fri Nov 28 2003 Gerard Milmeister <[email protected]> - 0:3.07-0.fdr.4
- Make separate packages for labltk, camlp4, ocamldoc, emacs and documentation

* Thu Nov 27 2003 Gerard Milmeister <[email protected]> - 0:3.07-0.fdr.2
- Changed license tag
- Register info files
- Honor RPM_OPT_FLAGS
- New Patch

* Fri Oct 31 2003 Gerard Milmeister <[email protected]> - 0:3.07-0.fdr.1
- First Fedora release

* Mon Oct 13 2003 Axel Thimm <[email protected]>
- Updated to 3.07.

* Wed Apr9 2003 Axel Thimm <[email protected]>
- Rebuilt for Red Hat 9.

* Tue Nov 26 2002 Axel Thimm <[email protected]>
- Added %{_mandir}/mano/* entry


Summary: Ocaml Constraint Programming Library
Name: facile
Version: 1.1
Release: 1mgc
URL: http://www.recherche.enac.fr/opti/facile
License: GPL
Group: Development/Libraries/Other
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Source0: %{name}-%{version}.tar.gz
BuildRequires: ocaml
Requires: ocaml

%description
FaCiLe is a constraint programming library on integer and integer set
finite domains written in OCaml. It offers all usual faciliti es to
create and manipulate finite domain variables, arithmetic expressions
and constraints (possibly non-linear), built-in global constraints
(difference, cardinality, sorting etc.) and search and optimization
goals. FaCiLe allows as well to build easily user-d efined constraints
and goals (including recursive ones), making pervasive use of OCaml
higher-order functionals to provide a simple and flexible interface for
the user. As FaCiLe is an OCaml library and not "yet another language",
the user benefits from type inf erence and strong typing discipline,
high level of abstraction, modules and objects system, as well as
native code compilation effi ciency, garbage collection and replay
debugger, all features of OCaml (among many others) that allow to
prototype and experiment qu ickly: modeling, data processing and
interface are implemented with the same powerful and efficient
language.

%prep
%setup

%build
./configure -faciledir %{buildroot}/%{_libdir}/ocaml/facile
make
%install
%__install -d -m 755 %{buildroot}/%{_libdir}/ocaml/facile
%makeinstall

%clean
rm -rf $RPM_BUILD_ROOT
rm -rf $RPM_BUILD_DIR/%{name}-%{version}

%files
%defattr(-,root,root)
%{_libdir}/ocaml/facile

%changelog
* Tue Jun 19 2007 Ni Hui <shuizhuyuanluo126.com> - 1.1-1mgc
- built for MagicLinux-2.1beta0


[ 本帖最后由 nihui 于 2007-6-20 14:39 编辑 ]

KDE 发表于 2007-6-21 13:36:51

ocaml 仓库里有,facile 不清楚。
这两个 spec 修改得很好,就是有点小毛病,再接再厉。:mrgreen:

nihui 发表于 2007-6-21 14:10:28

ocaml 仓库里有?
叫什么名字呀?
没找到啊~:o :o :o
页: [1]
查看完整版本: Ocaml 和 facile 模块 for kdeedu之kalzium