haskell-platform-vl.spec 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  1. %define pkg_name haskell-platform
  2. %define year_version 2016
  3. %define pkg_version 8.0.1
  4. %define pkg_release 1%{?_dist_release}
  5. %define ghc_version 8.0.1
  6. %define hscolour_version 1.24
  7. %define cabal_version 1.24.0.0
  8. %define stack_version 1.1.2
  9. # to fix wrong dependencies in cabal files
  10. # do not use '-'
  11. %define ed25519_version 0.0.5.0
  12. %define hackagesecurity_version 0.5.2.2
  13. %define hastache_version 0.6.1
  14. %define oldlocale_version 1.0.0.7
  15. %define oldtime_version 1.1.0.3
  16. %define utf8string_version 1.0.1.1
  17. %ifarch %{ix86}
  18. %define rpmarch i386
  19. %endif
  20. %ifarch x86_64
  21. %define rpmarch x86_64
  22. %endif
  23. Summary: An advanced purely-functional programming language
  24. Name: %{pkg_name}
  25. Version: %{year_version}.%{pkg_version}
  26. Release: %{pkg_release}
  27. License: BSD-like
  28. Group: Applications/Languages
  29. Source0: %{name}-%{pkg_version}.tar.gz
  30. Source1: packages.cabal-install
  31. Source2: packages.stack
  32. # LTS Haskell 7.18 (ghc-8.0.1): Published on 2017-01-29
  33. # cabal-install
  34. # num=11; for pkg in `cat packages.cabal-install`; do echo "Source${num}: ${pkg}.tar.gz"; num=`expr ${num} + 1`; done
  35. Source11: base16-bytestring-0.1.1.6.tar.gz
  36. Source12: base64-bytestring-1.0.0.1.tar.gz
  37. Source13: cryptohash-sha256-0.11.100.1.tar.gz
  38. Source14: ed25519-0.0.5.0.tar.gz
  39. Source15: tar-0.5.0.3.tar.gz
  40. Source16: hackage-security-0.5.2.2.tar.gz
  41. Source17: cabal-install-1.24.0.0.tar.gz
  42. # stack
  43. # num=101; for pkg in `cat packages.stack`; do echo "Source${num}: ${pkg}.tar.gz"; num=`expr ${num} + 1`; done
  44. Source101: SHA-1.6.4.2.tar.gz
  45. Source102: ansi-terminal-0.6.2.3.tar.gz
  46. Source103: ansi-wl-pprint-0.6.7.3.tar.gz
  47. Source104: auto-update-0.1.4.tar.gz
  48. Source105: base-compat-0.9.1.tar.gz
  49. Source106: base-orphans-0.5.4.tar.gz
  50. Source107: blaze-builder-0.4.0.2.tar.gz
  51. Source108: blaze-markup-0.7.1.1.tar.gz
  52. Source109: blaze-html-0.8.1.3.tar.gz
  53. Source110: byteable-0.1.1.tar.gz
  54. Source111: bytestring-builder-0.10.8.1.0.tar.gz
  55. Source112: cereal-0.5.4.0.tar.gz
  56. Source113: data-default-class-0.1.2.0.tar.gz
  57. Source114: digest-0.0.1.2.tar.gz
  58. Source115: dlist-0.8.0.2.tar.gz
  59. Source116: transformers-compat-0.5.1.4.tar.gz
  60. Source117: Glob-0.7.14.tar.gz
  61. Source118: easy-file-0.2.1.tar.gz
  62. Source119: edit-distance-0.2.2.1.tar.gz
  63. Source120: extra-1.4.10.tar.gz
  64. Source121: fail-4.9.0.0.tar.gz
  65. Source122: filelock-0.1.0.1.tar.gz
  66. Source123: generic-deriving-1.11.1.tar.gz
  67. Source124: generics-sop-0.2.3.0.tar.gz
  68. Source125: gitrev-1.2.0.tar.gz
  69. Source126: hinotify-0.3.9.tar.gz
  70. Source127: hourglass-0.2.10.tar.gz
  71. Source128: http-types-0.9.1.tar.gz
  72. Source129: ieee754-0.7.9.tar.gz
  73. Source130: hastache-0.6.1.tar.gz
  74. Source131: memory-0.13.tar.gz
  75. Source132: asn1-types-0.3.2.tar.gz
  76. Source133: asn1-encoding-0.9.4.tar.gz
  77. Source134: asn1-parse-0.9.4.tar.gz
  78. Source135: cryptonite-0.21.tar.gz
  79. Source136: cryptohash-0.11.9.tar.gz
  80. Source137: microlens-0.4.7.0.tar.gz
  81. Source138: mime-types-0.1.0.7.tar.gz
  82. Source139: monad-loops-0.4.3.tar.gz
  83. Source140: nats-1.1.1.tar.gz
  84. Source141: old-locale-1.0.0.7.tar.gz
  85. Source142: cookie-0.4.2.1.tar.gz
  86. Source143: old-time-1.1.0.3.tar.gz
  87. Source144: open-browser-0.2.1.0.tar.gz
  88. Source145: path-pieces-0.2.1.tar.gz
  89. Source146: patience-0.1.1.tar.gz
  90. Source147: pem-0.2.2.tar.gz
  91. Source148: prelude-extras-0.4.0.3.tar.gz
  92. Source149: regex-applicative-0.3.3.tar.gz
  93. Source150: regex-applicative-text-0.1.0.1.tar.gz
  94. Source151: safe-0.3.11.tar.gz
  95. Source152: semigroups-0.18.2.tar.gz
  96. Source153: silently-1.2.5.tar.gz
  97. Source154: socks-0.5.5.tar.gz
  98. Source155: split-0.2.3.1.tar.gz
  99. Source156: stm-chans-3.0.0.4.tar.gz
  100. Source157: streaming-commons-0.1.17.tar.gz
  101. Source158: system-filepath-0.4.13.4.tar.gz
  102. Source159: system-fileio-0.3.16.3.tar.gz
  103. Source160: tagged-0.8.5.tar.gz
  104. Source161: aeson-0.11.3.0.tar.gz
  105. Source162: binary-tagged-0.1.4.2.tar.gz
  106. Source163: text-binary-0.2.1.1.tar.gz
  107. Source164: time-locale-compat-0.1.1.3.tar.gz
  108. Source165: http-api-data-0.2.4.tar.gz
  109. Source166: MonadRandom-0.4.2.3.tar.gz
  110. Source167: constraints-0.8.tar.gz
  111. Source168: distributive-0.5.1.tar.gz
  112. Source169: exceptions-0.8.3.tar.gz
  113. Source170: aeson-compat-0.3.6.tar.gz
  114. Source171: http-client-0.4.31.2.tar.gz
  115. Source172: mmorph-1.0.9.tar.gz
  116. Source173: optparse-applicative-0.12.1.0.tar.gz
  117. Source174: path-0.5.11.tar.gz
  118. Source175: retry-0.7.4.2.tar.gz
  119. Source176: temporary-1.2.0.4.tar.gz
  120. Source177: unix-compat-0.4.3.1.tar.gz
  121. Source178: path-io-1.2.2.tar.gz
  122. Source179: transformers-base-0.4.4.tar.gz
  123. Source180: monad-control-1.0.1.0.tar.gz
  124. Source181: lifted-base-0.2.3.8.tar.gz
  125. Source182: enclosed-exceptions-1.0.2.tar.gz
  126. Source183: monad-unlift-0.2.0.tar.gz
  127. Source184: resource-pool-0.2.3.2.tar.gz
  128. Source185: resourcet-1.1.9.tar.gz
  129. Source186: conduit-1.2.8.tar.gz
  130. Source187: conduit-extra-1.1.15.tar.gz
  131. Source188: cryptohash-conduit-0.1.1.tar.gz
  132. Source189: project-template-0.2.0.tar.gz
  133. Source190: unexceptionalio-0.3.0.tar.gz
  134. Source191: errors-2.1.3.tar.gz
  135. Source192: fsnotify-0.2.1.tar.gz
  136. Source193: unix-time-0.3.7.tar.gz
  137. Source194: fast-logger-2.4.8.tar.gz
  138. Source195: monad-logger-0.3.20.1.tar.gz
  139. Source196: persistent-2.6.tar.gz
  140. Source197: persistent-sqlite-2.6.tar.gz
  141. Source198: persistent-template-2.5.1.6.tar.gz
  142. Source199: utf8-string-1.0.1.1.tar.gz
  143. Source200: vector-binary-instances-0.2.3.4.tar.gz
  144. Source201: void-0.7.1.tar.gz
  145. Source202: contravariant-1.4.tar.gz
  146. Source203: comonad-5.tar.gz
  147. Source204: bifunctors-5.4.1.tar.gz
  148. Source205: profunctors-5.2.tar.gz
  149. Source206: semigroupoids-5.1.tar.gz
  150. Source207: free-4.12.4.tar.gz
  151. Source208: either-4.4.1.1.tar.gz
  152. Source209: optparse-simple-0.0.3.tar.gz
  153. Source210: x509-1.6.5.tar.gz
  154. Source211: x509-store-1.6.2.tar.gz
  155. Source212: x509-system-1.6.4.tar.gz
  156. Source213: x509-validation-1.6.5.tar.gz
  157. Source214: tls-1.3.9.tar.gz
  158. Source215: connection-0.2.7.tar.gz
  159. Source216: http-client-tls-0.2.4.1.tar.gz
  160. Source217: http-conduit-2.1.11.tar.gz
  161. Source218: yaml-0.8.21.2.tar.gz
  162. Source219: hpack-0.14.1.tar.gz
  163. Source220: zip-archive-0.3.0.5.tar.gz
  164. Source221: zlib-bindings-0.1.1.5.tar.gz
  165. Source222: hit-0.6.3.tar.gz
  166. Source223: stack-1.1.2.tar.gz
  167. # to fix wrong dependencies in cabal files
  168. Source301: ed25519.cabal
  169. Source401: hastache.cabal
  170. Source402: old-locale.cabal
  171. Source403: old-time.cabal
  172. Source404: utf8-string.cabal
  173. Source405: stack.cabal
  174. BuildRoot: %{_tmppath}/%{name}-%{pkg_version}-root
  175. BuildRequires: ghc = %{ghc_version}
  176. BuildRequires: gmp-devel zlib-devel freeglut-devel
  177. BuildRequires: libffi-devel
  178. BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl
  179. Requires: ghc = %{ghc_version}
  180. Requires: freeglut-devel
  181. Conflicts: alex
  182. Conflicts: happy
  183. Conflicts: haskell-platform-base
  184. Conflicts: cabal-install
  185. Conflicts: hscolour
  186. Vendor: Project Vine
  187. Distribution: Vine Linux
  188. Packager: ara_t
  189. %description
  190. Haskell is a computer programming language.
  191. In particular, it is a polymorphically statically typed, lazy, purely
  192. functional language, quite different from most other programming languages.
  193. The language is named for Haskell Brooks Curry, whose work in mathematical
  194. logic serves as a foundation for functional languages.
  195. %prep
  196. %{__rm} -rf ${RPM_BUILD_ROOT}
  197. %setup -q -n %{name}-%{pkg_version}
  198. %build
  199. PKGNAME=%{name}-%{version}
  200. PKGCONFDIR=${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_version}/package.conf.d
  201. %{__mkdir_p} ${PKGCONFDIR}
  202. export PATH=${RPM_BUILD_ROOT}%{_bindir}:${HOME}/.cabal/bin:${PATH}
  203. export LANG=en_US.utf8
  204. # hscolour (bootstrap)
  205. pkg=hscolour-%{hscolour_version}
  206. cd %{_builddir}/%{name}-%{pkg_version}/packages/${pkg}
  207. ghc --make Setup
  208. ./Setup configure --user
  209. ./Setup build
  210. ./Setup copy
  211. ./Setup register --inplace
  212. # haskell-platform
  213. cd %{_builddir}/%{name}-%{pkg_version}
  214. cd packages
  215. for pkg in `cat ../etc/build.packages`; do
  216. cd ${pkg}
  217. ghc --make Setup
  218. ./Setup configure \
  219. --user \
  220. --prefix=%{_prefix} \
  221. --libdir=%{_libdir}/${PKGNAME}/${pkg} \
  222. --libsubdir= \
  223. --datadir=%{_datadir}/${PKGNAME}/${pkg} \
  224. --datasubdir= \
  225. --docdir=%{_docdir}/${PKGNAME}/${pkg}
  226. ./Setup build
  227. ./Setup haddock || :
  228. ./Setup copy --destdir=${RPM_BUILD_ROOT}
  229. ./Setup register --inplace
  230. ./Setup register --gen-pkg-config=${PKGCONFDIR}/${pkg}.conf
  231. cd ..
  232. done
  233. # cabal-install
  234. cd %{_builddir}
  235. for pkg in `cat %{SOURCE1}`; do
  236. %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz
  237. cd ${pkg}
  238. # fix wrong dependencies
  239. case ${pkg} in
  240. "ed25519-%{ed25519_version}") %{__cp} %{SOURCE301} . ;;
  241. *) ;;
  242. esac
  243. ghc --make Setup
  244. if [ ${pkg} = "cabal-install-%{cabal_version}" ]
  245. then
  246. ./Setup configure \
  247. --user \
  248. --prefix=%{_prefix} \
  249. --docdir=%{_docdir}/${PKGNAME}/${pkg}
  250. ./Setup build
  251. ./Setup copy --destdir=${RPM_BUILD_ROOT}
  252. else
  253. ./Setup configure --user
  254. ./Setup build
  255. ./Setup copy
  256. ./Setup register --inplace
  257. fi
  258. cd ..
  259. done
  260. # stack
  261. cd %{_builddir}
  262. for pkg in `cat %{SOURCE2}`; do
  263. %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz
  264. cd ${pkg}
  265. # fix wrong dependencies
  266. case ${pkg} in
  267. "hastache-%{hastache_version}") %{__cp} %{SOURCE401} . ;;
  268. "old-locale-%{oldlocale_version}") %{__cp} %{SOURCE402} . ;;
  269. "old-time-%{oldtime_version}") %{__cp} %{SOURCE403} . ;;
  270. "utf8-string-%{utf8string_version}") %{__cp} %{SOURCE404} . ;;
  271. "stack-%{stack_version}") %{__cp} %{SOURCE405} . ;;
  272. *) ;;
  273. esac
  274. if [ ${pkg} = "stack-%{stack_version}" ]
  275. then
  276. cabal install --enable-documentation
  277. else
  278. cabal install
  279. fi
  280. cd ..
  281. done
  282. %install
  283. # stack
  284. %{__install} -m 755 ${HOME}/.cabal/bin/stack \
  285. ${RPM_BUILD_ROOT}%{_bindir}
  286. cd ${HOME}/.cabal/share/doc/%{rpmarch}-linux-ghc-%{ghc_version}
  287. %{__mv} stack-%{stack_version} \
  288. ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}
  289. # hscolour
  290. cd ${RPM_BUILD_ROOT}%{_bindir}
  291. %{__ln_s} HsColour hscolour
  292. %clean
  293. %{__rm} -rf ${RPM_BUILD_ROOT}
  294. %post
  295. ghc-pkg recache
  296. %postun
  297. ghc-pkg recache
  298. %files
  299. %defattr(-, root, root)
  300. %{_bindir}/
  301. %{_libdir}/%{name}-%{version}/
  302. %{_libdir}/ghc-%{ghc_version}/package.conf.d/
  303. %{_datadir}/%{name}-%{version}/
  304. %{_docdir}/%{name}-%{version}/
  305. %{_mandir}/man1/
  306. %changelog
  307. * Wed Feb 01 2017 Toshiaki Ara <ara_t@384.jp> 2016.8.0.1-1
  308. - update to 2016.8.0.1
  309. * Tue May 03 2016 Toshiaki Ara <ara_t@384.jp> 2015.7.10.3-3
  310. - modify SPEC file without usage of cabal-install
  311. * Mon Apr 11 2016 Toshiaki Ara <ara_t@384.jp> 2015.7.10.3-2
  312. - correct SPEC file
  313. * Fri Feb 19 2016 Toshiaki Ara <ara_t@384.jp> 2015.7.10.3-1
  314. - update to 7.10.3
  315. * Mon Feb 15 2016 Toshiaki Ara <ara_t@384.jp> 2013.2.0.0-4
  316. - delete subpackage cabal-install
  317. - delete %%{cabal_version} from Requires: cabal-install-%%{cabal_version}
  318. - add BuildRequires: libffi-devel
  319. * Thu Feb 11 2016 Toshiaki Ara <ara_t@384.jp> 2013.2.0.0-3
  320. - correct Requires
  321. * Thu Feb 11 2016 Toshiaki Ara <ara_t@384.jp> 2013.2.0.0-2
  322. - install Haskell libraries into %%{_libdir}/ghc-lib
  323. - add BuildRequires: hscolour
  324. - devide insto subpackages
  325. * Thu Feb 04 2016 Toshiaki Ara <ara_t@384.jp> 2013.2.0.0-1
  326. - new package