haskell-platform-vl.spec 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. %define pkg_name haskell-platform
  2. %define year_version 2015
  3. %define pkg_version 7.10.3
  4. %define pkg_release 2%{?_dist_release}
  5. %define ghc_version 7.10.3
  6. %define alex_version 3.1.4
  7. %define cabal_version 1.22.6.0
  8. %define happy_version 1.19.5
  9. %define hscolour_version 1.23
  10. %ifarch %{ix86}
  11. %define rpmarch i386
  12. %endif
  13. %ifarch x86_64
  14. %define rpmarch x86_64
  15. %endif
  16. Summary: An advanced purely-functional programming language
  17. Name: %{pkg_name}
  18. Version: %{year_version}.%{pkg_version}
  19. Release: %{pkg_release}
  20. License: BSD-like
  21. Group: Applications/Languages
  22. Source0: %{name}-%{pkg_version}.tar.gz
  23. BuildRoot: %{_tmppath}/%{name}-%{pkg_version}-root
  24. BuildRequires: ghc cabal-install
  25. BuildRequires: ghc-bindist
  26. BuildRequires: gmp-devel zlib-devel freeglut-devel
  27. BuildRequires: libffi-devel
  28. BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl
  29. BuildRequires: hscolour
  30. Requires: haskell-platform-base = %{version}
  31. Requires: alex
  32. Requires: happy
  33. Requires: cabal-install
  34. Requires: hscolour
  35. Vendor: Project Vine
  36. Distribution: Vine Linux
  37. Packager: ara_t
  38. %description
  39. Haskell is a computer programming language.
  40. In particular, it is a polymorphically statically typed, lazy, purely
  41. functional language, quite different from most other programming languages.
  42. The language is named for Haskell Brooks Curry, whose work in mathematical
  43. logic serves as a foundation for functional languages.
  44. This is a meta package for installing haskell-platform, alex, happy and
  45. cabal-install.
  46. %package base
  47. Version: %{version}
  48. Summary: base package of haskell-platform
  49. Summary(ja): haskell-platformの基本パッケージ
  50. License: BSD-like
  51. Group: Applications/Languages
  52. Requires: ghc = %{ghc_version}
  53. Requires: freeglut
  54. %description base
  55. Base package for haskell-platform without alex, cabal, happy and HsColour.
  56. # %package -n cabal-install
  57. # Version: %{cabal_version}
  58. # Summary: A command-line program simplifies the process of managing Haskell software
  59. # License: BSD3
  60. # Group: Applications/Languages
  61. # %description -n cabal-install
  62. # The 'cabal' command-line program simplifies the process of
  63. # managing Haskell software by automating the fetching, configuration,
  64. # compilation and installation of Haskell libraries and programs.
  65. %package -n alex
  66. Version: %{alex_version}
  67. Summary: lexical analyser generator for Haskell
  68. Summary(ja): Haskell用の構文解析器生成器
  69. License: BSD3
  70. Group: Applications/Text
  71. %description -n alex
  72. Alex is a tool for generating lexical analysers in Haskell,
  73. given a description of the tokens to be recognised
  74. in the form of regular expressions.
  75. It is similar to the tool lex or flex for C/C++.
  76. %description -l ja -n alex
  77. AlexはHaskellで字句解析器を生成するツールで、
  78. トークン群の記述を正規表現の形式で認識します。
  79. C/C++用のlexやflexといったツールに似ています。
  80. %package -n happy
  81. Version: %{happy_version}
  82. Summary: a parser generator system for Haskell
  83. Summary(ja): Haskell 用の構文解析器生成器
  84. License: BSD3
  85. Group: Applications/Text
  86. %description -n happy
  87. Happy is a parser generator system for Haskell, similar to the tool 'yacc'
  88. for C. Like 'yacc', it takes a file containing an annotated BNF specification
  89. of a grammar and produces a Haskell module containing a parser for the grammar.
  90. %description -l ja -n happy
  91. HappyはHaskell用の構文解析器生成器のシステムで、C用ツールの'yacc'に似ています。
  92. 'yacc'の様に注釈付きのBNF形式の文法の仕様を含んだファイルを受け取って、
  93. その文法の構文解析器を含んだHaskellモジュールを生成します。
  94. %prep
  95. %{__rm} -rf ${RPM_BUILD_ROOT}
  96. %setup -q -n %{name}-%{pkg_version}
  97. %build
  98. # build hptool
  99. ./platform.sh
  100. # build haskell-platform
  101. export LANG=en_US.utf8
  102. hptool/dist/build/hptool/hptool --prefix=%{_prefix} \
  103. %{_usrsrc}/ghc-%{ghc_version}-%{rpmarch}-vine-linux.tar.bz2 \
  104. build-target
  105. %install
  106. # make directories for alex and happy
  107. %{__mkdir_p} ${RPM_BUILD_ROOT}%{_bindir}
  108. %{__mkdir_p} ${RPM_BUILD_ROOT}%{_libdir}
  109. %{__mkdir_p} ${RPM_BUILD_ROOT}%{_datadir}
  110. %{__mkdir_p} ${RPM_BUILD_ROOT}%{_docdir}
  111. %{__cp} -r build/target/usr/ ${RPM_BUILD_ROOT}/
  112. # move files for subpackages
  113. cd ${RPM_BUILD_ROOT}%{_usr}/ghc-%{ghc_version}-%{rpmarch}
  114. ## alex
  115. %{__mv} bin/alex ${RPM_BUILD_ROOT}%{_bindir}
  116. %{__mv} share/alex-%{alex_version} ${RPM_BUILD_ROOT}%{_datadir}
  117. %{__rm} -rf lib/alex-%{alex_version}
  118. ## happy
  119. %{__mv} bin/happy ${RPM_BUILD_ROOT}%{_bindir}
  120. %{__mv} share/happy-%{happy_version} ${RPM_BUILD_ROOT}%{_datadir}
  121. %{__rm} -rf lib/happy-%{happy_version}
  122. ## delete files and folders from ghc, cabal and hscolour
  123. cd ${RPM_BUILD_ROOT}/usr/ghc-%{ghc_version}-%{rpmarch}
  124. %{__rm} -rf bin
  125. %{__rm} -rf lib/ghc-%{ghc_version}
  126. %{__rm} -rf lib/hscolour-%{hscolour_version}
  127. %{__rm} -rf share/hscolour-%{hscolour_version}
  128. %{__rm} -f etc/registrations/hscolour-%{hscolour_version}
  129. %{__rm} -rf share/doc
  130. %{__rm} -rf share/man
  131. %{__rm} -f haskell-platform.cabal
  132. %{__rm} -f version-*
  133. %clean
  134. %{__rm} -rf ${RPM_BUILD_ROOT}
  135. %post base
  136. cd %{_usr}/ghc-%{ghc_version}-%{rpmarch}/etc/registrations
  137. for conf in *
  138. do
  139. ghc-pkg register --verbose=0 --force $conf 2> /dev/null
  140. done
  141. %preun base
  142. cd %{_usr}/ghc-%{ghc_version}-%{rpmarch}/etc/registrations
  143. for conf in *
  144. do
  145. ghc-pkg unregister --verbose=0 --force $conf 2> /dev/null
  146. done
  147. %files
  148. %files base
  149. %defattr(-, root, root)
  150. %doc LICENSE README
  151. %{_usr}/ghc-%{ghc_version}-%{rpmarch}/
  152. # %files -n cabal-install
  153. # %doc packages/cabal-install-%{cabal_version}/LICENSE
  154. # %doc packages/cabal-install-%{cabal_version}/README
  155. # %{_bindir}/cabal
  156. %files -n alex
  157. %doc packages/alex-%{alex_version}/LICENSE
  158. %doc packages/alex-%{alex_version}/README
  159. %{_bindir}/alex
  160. %{_datadir}/alex-%{alex_version}/
  161. %files -n happy
  162. %doc packages/happy-%{happy_version}/LICENSE
  163. %doc packages/happy-%{happy_version}/README
  164. %{_bindir}/happy
  165. %{_datadir}/happy-%{happy_version}/
  166. %changelog
  167. * Mon Apr 11 2016 Toshiaki Ara <ara_t@384.jp> 7.10.3-2
  168. - correct SPEC file
  169. * Fri Feb 19 2016 Toshiaki Ara <ara_t@384.jp> 7.10.3-1
  170. - update to 7.10.3
  171. * Mon Feb 15 2016 Toshiaki Ara <ara_t@384.jp> 2013.2.0.0-4
  172. - delete subpackage cabal-install
  173. - delete %{cabal_version} from Requires: cabal-install-%{cabal_version}
  174. - add BuildRequires: libffi-devel
  175. * Thu Feb 11 2016 Toshiaki Ara <ara_t@384.jp> 2013.2.0.0-3
  176. - correct Requires
  177. * Thu Feb 11 2016 Toshiaki Ara <ara_t@384.jp> 2013.2.0.0-2
  178. - install Haskell libraries into %{_libdir}/ghc-lib
  179. - add BuildRequires: hscolour
  180. - devide insto subpackages
  181. * Thu Feb 04 2016 Toshiaki Ara <ara_t@384.jp> 2013.2.0.0-1
  182. - new package