haskell-platform-vl.spec 6.2 KB

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