ocaml-vl.spec 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428
  1. Name: ocaml
  2. Summary: OCaml compiler and programming environment
  3. Summary(ja): OCaml コンパイラとプログラミング環境
  4. Version: 4.02.1
  5. Release: 1%{?_dist_release}
  6. Source0: http://caml.inria.fr/distrib/ocaml-4.02/ocaml-%{version}.tar.xz
  7. Source1: http://caml.inria.fr/distrib/ocaml-4.02/ocaml-4.02-refman-html.tar.gz
  8. Source2: http://caml.inria.fr/distrib/ocaml-4.02/ocaml-4.02-refman.pdf
  9. Source3: http://caml.inria.fr/distrib/ocaml-4.02/ocaml-4.02-refman.info.tar.gz
  10. Source4: ocamlbyteinfo.ml
  11. # Vine Source(s)
  12. Source10: caml-mode-install.sh
  13. Source11: caml-mode-remove.sh
  14. License: QPL and (LGPLv2+ with exceptions)
  15. Group: Development/Languages
  16. URL: http://caml.inria.fr/
  17. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  18. # Add BFD support so that ocamlobjinfo supports *.cmxs format (RHBZ#1113735).
  19. BuildRequires: binutils-devel
  20. BuildRequires: ncurses-devel
  21. BuildRequires: gdbm-devel
  22. BuildRequires: emacs
  23. BuildRequires: gawk
  24. BuildRequires: perl
  25. BuildRequires: util-linux
  26. BuildRequires: libICE-devel
  27. BuildRequires: libSM-devel
  28. BuildRequires: libX11-devel
  29. BuildRequires: libXaw-devel
  30. BuildRequires: libXext-devel
  31. BuildRequires: libXft-devel
  32. BuildRequires: libXmu-devel
  33. BuildRequires: libXrender-devel
  34. BuildRequires: libXt-devel
  35. BuildRequires: mesa-libGL-devel
  36. BuildRequires: mesa-libGLU-devel
  37. BuildRequires: chrpath
  38. Requires: gcc
  39. Requires: rpm-build >= 4.8.0
  40. Requires: util-linux
  41. Provides: ocaml(runtime) = %{version}
  42. Provides: ocaml(compiler) = %{version}
  43. Vendor: Project Vine
  44. Distribution: Vine Linux
  45. Packager: inagaki, kenta
  46. %define debug_package %{nil}
  47. %global __ocaml_requires_opts -c -f '%{buildroot}%{_bindir}/ocamlrun %{buildroot}%{_bindir}/ocamlobjinfo'
  48. %global __ocaml_provides_opts -f '%{buildroot}%{_bindir}/ocamlrun %{buildroot}%{_bindir}/ocamlobjinfo'
  49. %description
  50. OCaml is a high-level, strongly-typed, functional and object-oriented
  51. programming language from the ML family of languages.
  52. This package comprises two batch compilers (a fast bytecode compiler
  53. and an optimizing native-code compiler), an interactive toplevel system,
  54. parsing tools (Lex,Yacc), a replay debugger, a documentation generator,
  55. and a comprehensive library.
  56. %description -l ja
  57. OCaml は ML 系言語の方言で、高水準で強い型付けを備えた関数型と
  58. オブジェクト指向を併せ持ったプログラミング言語です。
  59. このパッケージには、2 つのバッチコンパイラ (コンパイル速度が高速な
  60. バイトコードコンパイラと最適化を行なうネイティブコードコンパイラ)、
  61. トップレベル対話環境、構文解析ツール (Lex, Yacc)、リプレイデバッガ、
  62. ドキュメント生成ツール、そして広範囲に渡るライブラリが含まれています。
  63. #%package labltk
  64. #Summary: Tk bindings for Objective Caml
  65. #Summary(ja): Objective Caml の Tk バインディング
  66. #Group: Development/Languages
  67. #Requires: ocaml = %{version}-%{release}
  68. #Requires: tk tcl
  69. #Obsoletes: labltk <= %{version}
  70. #
  71. #%description labltk
  72. #A library for interfacing Objective Caml with the scripting language
  73. #Tcl/Tk. It include the OCamlBrowser code editor / library browser.
  74. #
  75. #%package camlp4
  76. #Summary: Pre-Processor-Pretty-Printer for OCaml
  77. #Group: Development/Languages
  78. #Requires: ocaml = %{version}-%{release}
  79. #Obsoletes: camlp4 <= %{version}
  80. #
  81. #%description camlp4
  82. #Camlp4 is a Pre-Processor-Pretty-Printer for OCaml, parsing a source
  83. #file and printing some result on standard output.
  84. %package docs
  85. Summary: Documentation for OCaml
  86. Summary(ja): OCaml のドキュメント
  87. Group: Documentation
  88. Requires: ocaml = %{version}-%{release}
  89. Requires(post): /sbin/install-info
  90. Requires(preun): /sbin/install-info
  91. %description docs
  92. OCaml is a high-level, strongly-typed, functional and object-oriented
  93. programming language from the ML family of languages.
  94. This package contains documentation in PDF and HTML format as well as
  95. man pages and info files.
  96. %package source
  97. Summary: Source code for OCaml libraries
  98. Summary(ja): OCaml ライブラリのソースコード
  99. Group: Development/Libraries
  100. Requires: ocaml = %{version}-%{release}
  101. %description source
  102. Source code for OCaml libraries.
  103. %package mode
  104. Summary: Emacs mode for OCaml
  105. Summary(ja): OCaml 用 Emacs mode
  106. Group: Applications/Editors/Emacs
  107. Requires: ocaml = %{version}-%{release}
  108. Requires: emacsen-common
  109. Requires: emacs
  110. Obsoletes: ocaml-emacs <= %{version}
  111. %description mode
  112. Emacs mode for OCaml.
  113. %description -l ja mode
  114. OCaml 用の Emacs mode です.
  115. %prep
  116. %setup -q -T -b 0 -n %{name}-%{version}
  117. %setup -q -T -D -a 1 -n %{name}-%{version}
  118. %setup -q -T -D -a 3 -n %{name}-%{version}
  119. cp %{SOURCE2} refman.pdf
  120. %build
  121. # make -jN (N > 1) breaks the build. Therefore we cannot use
  122. # %{?_smp_mflags} nor MAKEFLAGS.
  123. unset MAKEFLAGS
  124. CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \
  125. ./configure \
  126. -bindir %{_bindir} \
  127. -libdir %{_libdir}/ocaml \
  128. -x11lib %{_libdir} \
  129. -x11include %{_includedir} \
  130. -mandir %{_mandir}/man1 \
  131. -no-curses
  132. make world opt opt.opt
  133. make -C emacs ocamltags
  134. #(cd infoman; gzip -cd ocaml.info.gz >> ocaml-info-entry; mv ocaml-info-entry ocaml.info; gzip -f ocaml.info)
  135. # for dumpobj, objinfo
  136. #(cd tools; make dumpobj; make objinfo; cd ..)
  137. # Currently these tools are supplied by Debian, but are expected
  138. # to go upstream at some point.
  139. includes="-nostdlib -I stdlib -I utils -I parsing -I typing -I bytecomp -I asmcomp -I driver -I otherlibs/unix -I otherlibs/str -I otherlibs/dynlink"
  140. boot/ocamlrun ./ocamlc $includes dynlinkaux.cmo %{SOURCE4} -o ocamlbyteinfo
  141. %install
  142. rm -rf $RPM_BUILD_ROOT
  143. make install \
  144. BINDIR=$RPM_BUILD_ROOT%{_bindir} \
  145. LIBDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \
  146. MANDIR=$RPM_BUILD_ROOT%{_mandir}
  147. perl -pi -e "s|^$RPM_BUILD_ROOT||" $RPM_BUILD_ROOT%{_libdir}/ocaml/ld.conf
  148. (
  149. # install info files
  150. mkdir -p $RPM_BUILD_ROOT%{_infodir};
  151. cd infoman; cp ocaml*.gz $RPM_BUILD_ROOT%{_infodir}
  152. )
  153. (
  154. # for dumpobj, objinfo
  155. cd tools;
  156. install dumpobj objinfo $RPM_BUILD_ROOT%{_bindir}
  157. )
  158. # for Emacs Lisp
  159. make -C emacs install install-ocamltags BINDIR=$RPM_BUILD_ROOT%{_bindir} \
  160. EMACSDIR=$RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/caml-mode
  161. # emacsen-common-ize
  162. mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/emacsen-common/packages/install
  163. mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/emacsen-common/packages/remove
  164. %_installemacsenscript caml-mode %{SOURCE10}
  165. %_removeemacsenscript caml-mode %{SOURCE11}
  166. # Remove rpaths from stublibs .so files.
  167. chrpath --delete $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/*.so
  168. install -m 0755 ocamlbyteinfo $RPM_BUILD_ROOT%{_bindir}
  169. find $RPM_BUILD_ROOT -name .ignore -delete
  170. # Disable build root strip policy:
  171. # executables generated by ocamlc -custom MUST NOT BE STRIPPED
  172. # But now that we have dynamic loading of C code, none of the executables
  173. # in the distribution is generated by ocamlc -custom, so leave default.
  174. # %define __spec_install_post /usr/lib/rpm/brp-compress
  175. %clean
  176. rm -rf $RPM_BUILD_ROOT
  177. %post docs
  178. /sbin/install-info \
  179. --entry="* ocaml: (ocaml). The OCaml compiler and programming environment" \
  180. --section="Programming Languages" \
  181. %{_infodir}/%{name}.info \
  182. %{_infodir}/dir 2>/dev/null || :
  183. %preun docs
  184. if [ $1 -eq 0 ]; then
  185. /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir 2>/dev/null || :
  186. fi
  187. %post mode
  188. if [ "$1" = 2 ]; then
  189. %_emacsenPackageRemove caml-mode
  190. fi
  191. %_addemacsenlist caml-mode
  192. %_emacsenPackageInstall caml-mode
  193. %preun mode
  194. if [ "$1" = 0 ]; then
  195. %_emacsenPackageRemove caml-mode
  196. %_removeemacsenlist caml-mode
  197. fi
  198. %files
  199. %defattr(-, root, root)
  200. %doc README LICENSE
  201. %{_bindir}/*
  202. %{_libdir}/ocaml
  203. ### in ocaml-camlp4
  204. #%exclude %{_bindir}/camlp4*
  205. #%exclude %{_bindir}/mkcamlp4
  206. #%exclude %{_libdir}/ocaml/camlp4/
  207. ### in ocaml-labltk
  208. #%exclude %{_bindir}/labltk
  209. #%exclude %{_bindir}/ocamlbrowser
  210. #%exclude %{_libdir}/ocaml/labltk/
  211. #%exclude %{_libdir}/ocaml/stublibs/dlllabltk.so
  212. ### in ocaml-mode
  213. %exclude %{_bindir}/ocamltags
  214. ### in ocaml-source
  215. %exclude %{_libdir}/ocaml/*.ml
  216. #%files camlp4
  217. #%defattr(-, root, root, 0755)
  218. #%{_bindir}/camlp4*
  219. #%{_bindir}/mkcamlp4
  220. #%dir %{_libdir}/ocaml/
  221. #%{_libdir}/ocaml/camlp4/
  222. #%files labltk
  223. #%defattr(-, root, root, 0755)
  224. #%doc otherlibs/labltk/examples_*tk
  225. #%{_bindir}/labltk
  226. #%{_bindir}/ocamlbrowser
  227. #%dir %{_libdir}/ocaml/
  228. #%dir %{_libdir}/ocaml/stublibs/
  229. #%{_libdir}/ocaml/labltk/
  230. #%{_libdir}/ocaml/stublibs/dlllabltk.so
  231. %files docs
  232. %doc refman.pdf htmlman
  233. %{_infodir}/*
  234. %{_mandir}/man1/*
  235. %{_mandir}/man3/*
  236. %files source
  237. %doc LICENSE
  238. %{_libdir}/ocaml/*.ml
  239. %files mode
  240. %defattr(-, root, root, 0755)
  241. %doc emacs/README
  242. %{_bindir}/ocamltags
  243. %dir %{_datadir}/emacs/
  244. %dir %{_datadir}/emacs/site-lisp/caml-mode
  245. %{_datadir}/emacs/site-lisp/caml-mode/*.el
  246. %{_datadir}/emacs/site-lisp/caml-mode/*.elc
  247. %{_prefix}/lib/emacsen-common/packages/install/caml-mode
  248. %{_prefix}/lib/emacsen-common/packages/remove/caml-mode
  249. %changelog
  250. * Sun Jan 25 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 4.02.1-1
  251. - new upstream relase
  252. - spilt documents to docs subpackage
  253. - spilt *.ml to source subpackage
  254. - added SOURCE4
  255. * Tue May 15 2012 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.12.1-2
  256. - fixed SOURCEs URL typo
  257. - updated SOURCE1
  258. * Sun Jan 15 2012 NAKAMURA Kenta <kenta@vinelinux.org> 3.12.1-1
  259. - new upstream version 3.12.1
  260. - rebuild with rpm-4.9.1.2
  261. * Wed Apr 27 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.12.0-1
  262. - new upstream release
  263. * Fri Apr 16 2010 Shu KONNO <owa@bg.wakwak.com> 3.11.0-2
  264. - rebuilt with new tool chain
  265. * Sat May 9 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.11.0-1
  266. - new upstream release
  267. - spec in UTF-8
  268. * Sat Jul 12 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.10.2-1vl5
  269. - new upstream release for VineSeed
  270. * Sat Jul 12 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.10.2-1vl4
  271. - new upstream release
  272. * Wed Feb 6 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.10.1-0vl1
  273. - new upstream release
  274. * Sun Sep 23 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.10.0-0vl2
  275. - rebuilt with VineSeed
  276. * Sun Sep 23 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.10.0-0vl1
  277. - new upstream release
  278. * Tue Nov 28 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.09.3-0vl2
  279. - rebuilt for VinePlus/4.0
  280. * Mon Nov 27 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.09.3-0vl1
  281. - new upstream release
  282. * Tue Sep 12 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.09.2-0vl4
  283. - changed ocaml-mode Group to Appliations/Editors/Emacs <BTS:VineLinux:163>
  284. * Wed Aug 30 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> - 3.09.2-0vl3
  285. - add BuildRequires: XOrg-devel, ncurses-devel, gdbm-devel, emacsen
  286. - use %%{_prefix}/lib instead of %%{_libdir} for elisp directory
  287. * Wed Jun 7 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 3.09.2-0vl2
  288. - rebuilt for VineSeed Plus
  289. * Wed Jun 7 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 3.09.2-0vl1
  290. - new upstream release
  291. * Sat Feb 25 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 3.09.1-0vl3
  292. - rebuilt for VineSeed Plus
  293. * Sat Feb 25 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 3.09.1-0vl2
  294. - rebuilt for VinePlus/3.0
  295. - added BuildRequires: expect, thread
  296. * Sat Jan 28 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 3.09.1-0vl1
  297. - new upstream release
  298. * Sat Nov 5 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 3.09.0-0vl2
  299. - rebuild for VineSeed Plus
  300. * Thu Nov 3 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 3.09.0-0vl1
  301. - new upstream release
  302. * Tue Oct 18 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 3.08.4-0vl3
  303. - rebuild with VineSeed Plus
  304. * Mon Oct 17 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 3.08.4-0vl2
  305. - rebuild with VinePlus/3.0
  306. - added dumpobj, objinfo
  307. * Sat Oct 8 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 3.08.4-0vl1
  308. - new upstream release
  309. - split to caml4p, labltk, mode packages
  310. * Thu Mar 24 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 3.08.3-0vl1
  311. - new upstream release
  312. * Sat Dec 4 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 3.08.2-0vl1
  313. - new upstream release
  314. * Fri Oct 15 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 3.08.1-0vl1
  315. - new upstream release
  316. * Fri Aug 20 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 3.08.0-0vl4
  317. - fixed typo based on 3.08.0-0vl3
  318. * Thu Aug 12 2004 IKEDA Katsumi <ikeda@webmasters.gr.jp> 3.08.0-0vl3
  319. - Modified typo: %%descriptin -l ja into %description -l ja
  320. * Tue Aug 17 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 3.08.0-0vl3
  321. - rebuild for VinePlus/3.0 and VineSeedPlus
  322. - updated Japanese description
  323. - merged VinePlus/2.6 spec file
  324. * Fri Jul 23 2004 IKEDA Katsumi <ikeda@webmasters.gr.jp> 3.08.0-0vl2
  325. - Modified the character code of this file into euc-jp.
  326. * Tue Jul 21 2004 by IKEDA Katsumi <ikeda@rg8.so-net.ne.jp> 3.08.0-0vl1
  327. - new upstream release.
  328. - Modified Copyright.
  329. - Added Summary(ja), %%descriptin -l ja, Prereq and %%clean.
  330. - Added %%post and %%preun for running /sbin/install-info.
  331. * Wed Apr 7 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 3.07-2vl2
  332. - rebuild for VineSeed
  333. - s/Copyright/License/
  334. * Thu Feb 12 2004 by IKEDA Katsumi <ikedak@rg8.so-net.ne.jp>
  335. - 3.07-2vl1
  336. - Modified %Vendor and %BuildRoot.
  337. - Add %Distribution.