ocaml-camlp5-vl.spec 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. %global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
  2. %if !%{opt}
  3. %global debug_package %{nil}
  4. %endif
  5. Name: ocaml-camlp5
  6. Summary: Classical version of camlp4 OCaml preprocessor
  7. Summary(ja): Camlp4 OCaml プリプロセッサの古典的な実装
  8. Version: 6.12
  9. Release: 2%{?_dist_release}
  10. License: BSD
  11. Group: Development/Languages
  12. URL: http://camlp5.gforge.inria.fr/
  13. Source0: http://camlp5.gforge.inria.fr/distrib/src/camlp5-%{version}.tgz
  14. # Kill -warn-error A
  15. Patch0: camlp5-6.11-kill-warn-error.patch
  16. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  17. BuildRequires: ocaml
  18. Obsoletes: camlp5 < %{version}-%{release}
  19. Provides: camlp5 = %{version}-%{release}
  20. Vendor: Project Vine
  21. Distribution: Vine Linux
  22. Packager: inagaki
  23. %global __ocaml_requires_opts -i Asttypes -i Parsetree -i Pa_extend
  24. %global __ocaml_provides_opts -i Dynlink -i Dynlinkaux -i Pa_extend
  25. %description
  26. Camlp5 is a preprocessor-pretty-printer of OCaml.
  27. It is the continuation of the classical camlp4 with new features.
  28. OCaml 3.10 and above have an official camlp4 which is incompatible
  29. with classical (<= 3.09) versions. You can find that in the
  30. ocaml-camlp4 package.
  31. %package devel
  32. Summary: Development files for %{name}
  33. Summary(ja): %{name} の開発用ファイル
  34. Group: Development/Libraries
  35. Requires: %{name} = %{version}-%{release}
  36. %description devel
  37. The %{name}-devel package contains libraries and signature files for
  38. developing applications that use %{name}.
  39. %prep
  40. %setup -q -n camlp5-%{version}
  41. %patch0 -p1
  42. # Build with debug information
  43. sed -i 's,WARNERR="",WARNERR="-g",' configure
  44. sed -i 's,-linkall,& -g,g' top/Makefile
  45. for fil in compile/compile.sh $(find . -name Makefile); do
  46. sed -i 's,\$[({]OCAMLN[})]c,& -g,;s,\$[({]OCAMLN[})]opt,& -g,;s,LINKFLAGS=,&-g ,' $fil
  47. done
  48. %build
  49. ./configure
  50. %if %opt
  51. # For ppc64 we need a larger stack than default to compile some files
  52. # because the stages in the OCaml compiler are not mutually tail
  53. # recursive.
  54. %ifarch ppc64 ppc64le
  55. ulimit -a
  56. ulimit -Hs 65536
  57. ulimit -Ss 65536
  58. %endif
  59. make world.opt
  60. %else
  61. make world
  62. %endif
  63. make -C doc/htmlp
  64. %install
  65. if [ -d $RPM_BUILD_ROOT ]; then rm -rf $RPM_BUILD_ROOT; fi
  66. mkdir -p $RPM_BUILD_ROOT%{_libdir}/ocaml
  67. mkdir -p $RPM_BUILD_ROOT%{_bindir}
  68. mkdir -p $RPM_BUILD_ROOT%{_mandir}
  69. make install \
  70. LIBDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \
  71. OLIBDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \
  72. BINDIR=$RPM_BUILD_ROOT%{_bindir} \
  73. MANDIR=$RPM_BUILD_ROOT%{_mandir}
  74. cp -p etc/META $RPM_BUILD_ROOT%{_libdir}/ocaml/camlp5
  75. rm -f doc/html/.cvsignore doc/htmlp/{.cvsignore,*.sh,Makefile,html2*}
  76. %clean
  77. if [ -d $RPM_BUILD_ROOT ]; then %{__rm} -rf $RPM_BUILD_ROOT; fi
  78. %files
  79. %defattr (-,root,root)
  80. %doc README LICENSE
  81. %{_libdir}/ocaml/camlp5
  82. %if %opt
  83. %exclude %{_libdir}/ocaml/camlp5/*.a
  84. %exclude %{_libdir}/ocaml/camlp5/*.cmxa
  85. %exclude %{_libdir}/ocaml/camlp5/*.cmx
  86. %endif
  87. %exclude %{_libdir}/ocaml/camlp5/*.mli
  88. %files devel
  89. %doc CHANGES ICHANGES DEVEL UPGRADING doc/html
  90. %if %opt
  91. %{_libdir}/ocaml/camlp5/*.a
  92. %{_libdir}/ocaml/camlp5/*.cmxa
  93. %{_libdir}/ocaml/camlp5/*.cmx
  94. %endif
  95. %{_libdir}/ocaml/camlp5/*.mli
  96. %{_bindir}/camlp5*
  97. %{_bindir}/mkcamlp5*
  98. %{_bindir}/ocpp5
  99. %{_mandir}/man1/*
  100. %changelog
  101. * Mon Jan 26 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 6.12-2
  102. - added Obsoletes and Provides tag
  103. * Mon Jan 26 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 6.12-1
  104. - changed package name
  105. - updated to 6.12
  106. - built with ocaml 4.02.1
  107. - split development files into devel subpackage
  108. * Thu Dec 26 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 6.11-1
  109. - new upstream release
  110. * Fri Apr 16 2010 Shu KONNO <owa@bg.wakwak.com> - 5.11-2
  111. - rebuilt with new tool chain and ocaml 3.11.0-2
  112. * Sat May 9 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 5.11-1
  113. - new upstream release
  114. - built with ocaml 3.11.0
  115. - added Packager tag
  116. * Sun Aug 3 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 5.08-1
  117. - new upstream release
  118. - built with ocaml 3.10.2
  119. * Wed Feb 6 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 5.07-0vl2
  120. - rebuilt for VineSeed
  121. * Wed Feb 6 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 5.07-0vl1
  122. - new upstream release
  123. - rebuilt with Ocaml 3.10.1
  124. * Sun Dec 30 2007 Shu KONNO <owa@bg.wakwak.com> - 5.00-0vl2
  125. - added option libdir to configure
  126. * Sun Sep 30 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 5.00-0vl1
  127. - initial package for Vine Linux