haskell-platform-vl.spec 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657
  1. %bcond_with bootstrap
  2. %bcond_without stack
  3. %define pkg_name haskell-platform
  4. %define year_version 2018
  5. %define pkg_version 8.4.2
  6. %define pkg_release 1%{?_dist_release}
  7. %define ghc_version %{pkg_version}
  8. %define cabal_version 2.2.0.0
  9. %define stack_version 1.7.1
  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. Source1: packages.haskell
  24. Source2: packages.cabal-install
  25. Source3: packages.stack
  26. Source11: macros.cabal
  27. Source21: download-packages.pl
  28. Source22: generate-list.sh
  29. # ./download-packages.pl
  30. # ./generate-list.sh
  31. Source101: ObjectName-1.1.0.1.tar.gz
  32. Source102: ObjectName.cabal
  33. Source103: call-stack-0.1.0.tar.gz
  34. Source104: call-stack.cabal
  35. Source105: HUnit-1.6.0.0.tar.gz
  36. Source106: HUnit.cabal
  37. Source107: fgl-5.6.0.0.tar.gz
  38. Source108: fgl.cabal
  39. Source109: fixed-0.2.1.1.tar.gz
  40. Source110: fixed.cabal
  41. Source111: half-0.2.2.3.tar.gz
  42. Source112: half.cabal
  43. Source113: html-1.0.1.2.tar.gz
  44. Source114: html.cabal
  45. Source115: integer-logarithms-1.0.2.1.tar.gz
  46. Source116: integer-logarithms.cabal
  47. Source117: network-2.6.3.5.tar.gz
  48. Source118: network.cabal
  49. Source119: parallel-3.2.1.1.tar.gz
  50. Source120: parallel.cabal
  51. Source121: primitive-0.6.3.0.tar.gz
  52. Source122: primitive.cabal
  53. Source123: random-1.1.tar.gz
  54. Source124: random.cabal
  55. Source125: regex-base-0.93.2.tar.gz
  56. Source126: regex-base.cabal
  57. Source127: regex-posix-0.95.2.tar.gz
  58. Source128: regex-posix.cabal
  59. Source129: regex-compat-0.95.1.tar.gz
  60. Source130: regex-compat.cabal
  61. Source131: split-0.2.3.3.tar.gz
  62. Source132: split.cabal
  63. Source133: async-2.2.1.tar.gz
  64. Source134: async.cabal
  65. Source135: StateVar-1.1.0.4.tar.gz
  66. Source136: StateVar.cabal
  67. Source137: syb-0.7.tar.gz
  68. Source138: syb.cabal
  69. Source139: haskell-src-1.0.3.0.tar.gz
  70. Source140: haskell-src.cabal
  71. Source141: network-uri-2.6.1.0.tar.gz
  72. Source142: network-uri.cabal
  73. Source143: hashable-1.2.7.0.tar.gz
  74. Source144: hashable.cabal
  75. Source145: scientific-0.3.5.2.tar.gz
  76. Source146: scientific.cabal
  77. Source147: case-insensitive-1.2.0.10.tar.gz
  78. Source148: case-insensitive.cabal
  79. Source149: attoparsec-0.13.2.2.tar.gz
  80. Source150: attoparsec.cabal
  81. Source151: OpenGLRaw-3.2.7.0.tar.gz
  82. Source152: OpenGLRaw.cabal
  83. Source153: HTTP-4000.3.11.tar.gz
  84. Source154: HTTP.cabal
  85. Source155: GLURaw-2.0.0.3.tar.gz
  86. Source156: GLURaw.cabal
  87. Source157: OpenGL-3.0.2.0.tar.gz
  88. Source158: OpenGL.cabal
  89. Source159: GLUT-2.7.0.12.tar.gz
  90. Source160: GLUT.cabal
  91. Source161: tf-random-0.5.tar.gz
  92. Source162: tf-random.cabal
  93. Source163: QuickCheck-2.11.3.tar.gz
  94. Source164: QuickCheck.cabal
  95. Source165: unordered-containers-0.2.9.0.tar.gz
  96. Source166: unordered-containers.cabal
  97. Source167: vector-0.12.0.1.tar.gz
  98. Source168: vector.cabal
  99. Source169: zlib-0.6.2.tar.gz
  100. Source170: zlib.cabal
  101. Source171: base16-bytestring-0.1.1.6.tar.gz
  102. Source172: base16-bytestring.cabal
  103. Source173: base64-bytestring-1.0.0.1.tar.gz
  104. Source174: base64-bytestring.cabal
  105. Source175: cryptohash-sha256-0.11.101.0.tar.gz
  106. Source176: cryptohash-sha256.cabal
  107. Source177: ed25519-0.0.5.0.tar.gz
  108. Source178: ed25519.cabal
  109. Source179: tar-0.5.1.0.tar.gz
  110. Source180: tar.cabal
  111. Source181: hackage-security-0.5.3.0.tar.gz
  112. Source182: hackage-security.cabal
  113. Source183: echo-0.1.3.tar.gz
  114. Source184: echo.cabal
  115. Source185: edit-distance-0.2.2.1.tar.gz
  116. Source186: edit-distance.cabal
  117. Source187: resolv-0.1.1.1.tar.gz
  118. Source188: resolv.cabal
  119. Source189: cabal-install-2.2.0.0.tar.gz
  120. Source190: cabal-install.cabal
  121. Source191: annotated-wl-pprint-0.7.0.tar.gz
  122. Source192: annotated-wl-pprint.cabal
  123. Source193: auto-update-0.1.4.tar.gz
  124. Source194: auto-update.cabal
  125. Source195: base-compat-0.9.3.tar.gz
  126. Source196: base-compat.cabal
  127. Source197: base-orphans-0.7.tar.gz
  128. Source198: base-orphans.cabal
  129. Source199: base-prelude-1.2.0.1.tar.gz
  130. Source200: base-prelude.cabal
  131. Source201: basement-0.0.7.tar.gz
  132. Source202: basement.cabal
  133. Source203: bindings-uname-0.1.tar.gz
  134. Source204: bindings-uname.cabal
  135. Source205: bitarray-0.0.1.1.tar.gz
  136. Source206: bitarray.cabal
  137. Source207: blaze-builder-0.4.1.0.tar.gz
  138. Source208: blaze-builder.cabal
  139. Source209: byteable-0.1.1.tar.gz
  140. Source210: byteable.cabal
  141. Source211: cabal-doctest-1.0.6.tar.gz
  142. Source212: cabal-doctest.cabal
  143. Source213: cereal-0.5.5.0.tar.gz
  144. Source214: cereal.cabal
  145. Source215: clock-0.7.2.tar.gz
  146. Source216: clock.cabal
  147. Source217: cmdargs-0.10.20.tar.gz
  148. Source218: cmdargs.cabal
  149. Source219: colour-2.3.4.tar.gz
  150. Source220: colour.cabal
  151. Source221: data-default-class-0.1.2.0.tar.gz
  152. Source222: data-default-class.cabal
  153. Source223: digest-0.0.1.2.tar.gz
  154. Source224: digest.cabal
  155. Source225: dlist-0.8.0.4.tar.gz
  156. Source226: dlist.cabal
  157. Source227: easy-file-0.2.1.tar.gz
  158. Source228: easy-file.cabal
  159. Source229: fail-4.9.0.0.tar.gz
  160. Source230: fail.cabal
  161. Source231: file-embed-0.0.10.1.tar.gz
  162. Source232: file-embed.cabal
  163. Source233: filelock-0.1.1.2.tar.gz
  164. Source234: filelock.cabal
  165. Source235: generic-deriving-1.12.1.tar.gz
  166. Source236: generic-deriving.cabal
  167. Source237: hinotify-0.3.10.tar.gz
  168. Source238: hinotify.cabal
  169. Source239: hourglass-0.2.11.tar.gz
  170. Source240: hourglass.cabal
  171. Source241: hspec-discover-2.5.0.tar.gz
  172. Source242: hspec-discover.cabal
  173. Source243: hspec-expectations-0.8.2.tar.gz
  174. Source244: hspec-expectations.cabal
  175. Source245: http-types-0.12.1.tar.gz
  176. Source246: http-types.cabal
  177. Source247: logict-0.6.0.2.tar.gz
  178. Source248: logict.cabal
  179. Source249: microlens-0.4.9.1.tar.gz
  180. Source250: microlens.cabal
  181. Source251: mime-types-0.1.0.7.tar.gz
  182. Source252: mime-types.cabal
  183. Source253: mintty-0.1.2.tar.gz
  184. Source254: mintty.cabal
  185. Source255: monad-loops-0.4.3.tar.gz
  186. Source256: monad-loops.cabal
  187. Source257: old-locale-1.0.0.7.tar.gz
  188. Source258: old-locale.cabal
  189. Source259: open-browser-0.2.1.0.tar.gz
  190. Source260: open-browser.cabal
  191. Source261: path-pieces-0.2.1.tar.gz
  192. Source262: path-pieces.cabal
  193. Source263: polyparse-1.12.tar.gz
  194. Source264: polyparse.cabal
  195. Source265: quickcheck-io-0.2.0.tar.gz
  196. Source266: quickcheck-io.cabal
  197. Source267: regex-applicative-0.3.3.tar.gz
  198. Source268: regex-applicative.cabal
  199. Source269: safe-0.3.17.tar.gz
  200. Source270: safe.cabal
  201. Source271: semigroups-0.18.4.tar.gz
  202. Source272: semigroups.cabal
  203. Source273: setenv-0.1.1.3.tar.gz
  204. Source274: setenv.cabal
  205. Source275: silently-1.2.5.tar.gz
  206. Source276: silently.cabal
  207. Source277: stm-chans-3.0.0.4.tar.gz
  208. Source278: stm-chans.cabal
  209. Source279: streaming-commons-0.2.0.0.tar.gz
  210. Source280: streaming-commons.cabal
  211. Source281: text-metrics-0.3.0.tar.gz
  212. Source282: text-metrics.cabal
  213. Source283: th-abstraction-0.2.6.0.tar.gz
  214. Source284: th-abstraction.cabal
  215. Source285: th-expand-syns-0.4.4.0.tar.gz
  216. Source286: th-expand-syns.cabal
  217. Source287: th-lift-0.7.8.tar.gz
  218. Source288: th-lift.cabal
  219. Source289: time-locale-compat-0.1.1.4.tar.gz
  220. Source290: time-locale-compat.cabal
  221. Source291: transformers-compat-0.6.1.6.tar.gz
  222. Source292: transformers-compat.cabal
  223. Source293: typed-process-0.2.2.0.tar.gz
  224. Source294: typed-process.cabal
  225. Source295: unix-compat-0.5.0.1.tar.gz
  226. Source296: unix-compat.cabal
  227. Source297: unliftio-core-0.1.1.0.tar.gz
  228. Source298: unliftio-core.cabal
  229. Source299: uuid-types-1.0.3.tar.gz
  230. Source300: uuid-types.cabal
  231. Source301: vector-algorithms-0.7.0.1.tar.gz
  232. Source302: vector-algorithms.cabal
  233. Source303: void-0.7.2.tar.gz
  234. Source304: void.cabal
  235. Source305: gitrev-1.3.1.tar.gz
  236. Source306: gitrev.cabal
  237. Source307: attoparsec-iso8601-1.0.0.0.tar.gz
  238. Source308: attoparsec-iso8601.cabal
  239. Source309: neat-interpolation-0.3.2.1.tar.gz
  240. Source310: neat-interpolation.cabal
  241. Source311: foundation-0.0.20.tar.gz
  242. Source312: foundation.cabal
  243. Source313: unicode-transforms-0.3.4.tar.gz
  244. Source314: unicode-transforms.cabal
  245. Source315: blaze-markup-0.8.2.1.tar.gz
  246. Source316: blaze-markup.cabal
  247. Source317: socks-0.5.6.tar.gz
  248. Source318: socks.cabal
  249. Source319: extra-1.6.6.tar.gz
  250. Source320: extra.cabal
  251. Source321: ansi-terminal-0.8.0.4.tar.gz
  252. Source322: ansi-terminal.cabal
  253. Source323: cookie-0.4.4.tar.gz
  254. Source324: cookie.cabal
  255. Source325: store-core-0.4.1.tar.gz
  256. Source326: store-core.cabal
  257. Source327: smallcheck-1.1.3.1.tar.gz
  258. Source328: smallcheck.cabal
  259. Source329: old-time-1.1.0.3.tar.gz
  260. Source330: old-time.cabal
  261. Source331: regex-applicative-text-0.1.0.1.tar.gz
  262. Source332: regex-applicative-text.cabal
  263. Source333: microlens-th-0.4.2.1.tar.gz
  264. Source334: microlens-th.cabal
  265. Source335: th-reify-many-0.1.8.tar.gz
  266. Source336: th-reify-many.cabal
  267. Source337: th-lift-instances-0.1.11.tar.gz
  268. Source338: th-lift-instances.cabal
  269. Source339: transformers-base-0.4.5.2.tar.gz
  270. Source340: transformers-base.cabal
  271. Source341: tagged-0.8.5.tar.gz
  272. Source342: tagged.cabal
  273. Source343: exceptions-0.8.3.tar.gz
  274. Source344: exceptions.cabal
  275. Source345: contravariant-1.4.1.tar.gz
  276. Source346: contravariant.cabal
  277. Source347: Glob-0.9.2.tar.gz
  278. Source348: Glob.cabal
  279. Source349: fsnotify-0.2.1.2.tar.gz
  280. Source350: fsnotify.cabal
  281. Source351: unliftio-0.2.7.0.tar.gz
  282. Source352: unliftio.cabal
  283. Source353: mono-traversable-1.0.8.1.tar.gz
  284. Source354: mono-traversable.cabal
  285. Source355: memory-0.14.16.tar.gz
  286. Source356: memory.cabal
  287. Source357: blaze-html-0.9.0.1.tar.gz
  288. Source358: blaze-html.cabal
  289. Source359: hspec-core-2.5.0.tar.gz
  290. Source360: hspec-core.cabal
  291. Source361: ansi-wl-pprint-0.6.8.2.tar.gz
  292. Source362: ansi-wl-pprint.cabal
  293. Source363: zip-archive-0.3.2.4.tar.gz
  294. Source364: zip-archive.cabal
  295. Source365: unix-time-0.3.8.tar.gz
  296. Source366: unix-time.cabal
  297. Source367: cpphs-1.20.8.tar.gz
  298. Source368: cpphs.cabal
  299. Source369: uri-bytestring-0.3.1.1.tar.gz
  300. Source370: uri-bytestring.cabal
  301. Source371: th-orphans-0.13.5.tar.gz
  302. Source372: th-orphans.cabal
  303. Source373: monad-control-1.0.2.3.tar.gz
  304. Source374: monad-control.cabal
  305. Source375: distributive-0.5.3.tar.gz
  306. Source376: distributive.cabal
  307. Source377: aeson-1.2.4.0.tar.gz
  308. Source378: aeson.cabal
  309. Source379: temporary-1.2.1.1.tar.gz
  310. Source380: temporary.cabal
  311. Source381: retry-0.7.6.2.tar.gz
  312. Source382: retry.cabal
  313. Source383: resourcet-1.2.1.tar.gz
  314. Source384: resourcet.cabal
  315. Source385: rio-0.1.2.0.tar.gz
  316. Source386: rio.cabal
  317. Source387: pem-0.2.4.tar.gz
  318. Source388: pem.cabal
  319. Source389: http-client-0.5.12.1.tar.gz
  320. Source390: http-client.cabal
  321. Source391: cryptonite-0.25.tar.gz
  322. Source392: cryptonite.cabal
  323. Source393: asn1-types-0.3.2.tar.gz
  324. Source394: asn1-types.cabal
  325. Source395: hspec-smallcheck-0.5.2.tar.gz
  326. Source396: hspec-smallcheck.cabal
  327. Source397: hspec-2.5.0.tar.gz
  328. Source398: hspec.cabal
  329. Source399: optparse-applicative-0.14.2.0.tar.gz
  330. Source400: optparse-applicative.cabal
  331. Source401: fast-logger-2.4.11.tar.gz
  332. Source402: fast-logger.cabal
  333. Source403: haskell-src-exts-1.20.2.tar.gz
  334. Source404: haskell-src-exts.cabal
  335. Source405: http-api-data-0.3.8.1.tar.gz
  336. Source406: http-api-data.cabal
  337. Source407: th-utilities-0.2.0.1.tar.gz
  338. Source408: th-utilities.cabal
  339. Source409: resource-pool-0.2.3.2.tar.gz
  340. Source410: resource-pool.cabal
  341. Source411: lifted-base-0.2.3.12.tar.gz
  342. Source412: lifted-base.cabal
  343. Source413: comonad-5.0.3.tar.gz
  344. Source414: comonad.cabal
  345. Source415: path-0.6.1.tar.gz
  346. Source416: path.cabal
  347. Source417: aeson-compat-0.3.7.1.tar.gz
  348. Source418: aeson-compat.cabal
  349. Source419: conduit-1.3.0.2.tar.gz
  350. Source420: conduit.cabal
  351. Source421: cryptohash-0.11.9.tar.gz
  352. Source422: cryptohash.cabal
  353. Source423: asn1-encoding-0.9.5.tar.gz
  354. Source424: asn1-encoding.cabal
  355. Source425: optparse-simple-0.1.0.tar.gz
  356. Source426: optparse-simple.cabal
  357. Source427: haskell-src-meta-0.8.0.2.tar.gz
  358. Source428: haskell-src-meta.cabal
  359. Source429: bifunctors-5.5.2.tar.gz
  360. Source430: bifunctors.cabal
  361. Source431: path-io-1.3.3.tar.gz
  362. Source432: path-io.cabal
  363. Source433: yaml-0.8.30.tar.gz
  364. Source434: yaml.cabal
  365. Source435: conduit-extra-1.3.0.tar.gz
  366. Source436: conduit-extra.cabal
  367. Source437: asn1-parse-0.9.4.tar.gz
  368. Source438: asn1-parse.cabal
  369. Source439: semigroupoids-5.2.2.tar.gz
  370. Source440: semigroupoids.cabal
  371. Source441: profunctors-5.2.2.tar.gz
  372. Source442: profunctors.cabal
  373. Source443: project-template-0.2.0.1.tar.gz
  374. Source444: project-template.cabal
  375. Source445: monad-logger-0.3.28.5.tar.gz
  376. Source446: monad-logger.cabal
  377. Source447: cryptonite-conduit-0.2.2.tar.gz
  378. Source448: cryptonite-conduit.cabal
  379. Source449: x509-1.7.3.tar.gz
  380. Source450: x509.cabal
  381. Source451: free-5.0.2.tar.gz
  382. Source452: free.cabal
  383. Source453: either-5.tar.gz
  384. Source454: either.cabal
  385. Source455: persistent-2.8.2.tar.gz
  386. Source456: persistent.cabal
  387. Source457: x509-store-1.6.6.tar.gz
  388. Source458: x509-store.cabal
  389. Source459: store-0.4.3.2.tar.gz
  390. Source460: store.cabal
  391. Source461: mustache-2.3.0.tar.gz
  392. Source462: mustache.cabal
  393. Source463: persistent-template-2.5.4.tar.gz
  394. Source464: persistent-template.cabal
  395. Source465: persistent-sqlite-2.8.1.2.tar.gz
  396. Source466: persistent-sqlite.cabal
  397. Source467: x509-validation-1.6.10.tar.gz
  398. Source468: x509-validation.cabal
  399. Source469: x509-system-1.6.6.tar.gz
  400. Source470: x509-system.cabal
  401. Source471: tls-1.4.1.tar.gz
  402. Source472: tls.cabal
  403. Source473: connection-0.2.8.tar.gz
  404. Source474: connection.cabal
  405. Source475: http-client-tls-0.3.5.3.tar.gz
  406. Source476: http-client-tls.cabal
  407. Source477: http-conduit-2.3.1.tar.gz
  408. Source478: http-conduit.cabal
  409. Source479: hpack-0.28.2.tar.gz
  410. Source480: hpack.cabal
  411. Source481: stack-1.7.1.tar.gz
  412. Source482: stack.cabal
  413. BuildRoot: %{_tmppath}/%{name}-%{pkg_version}-root
  414. BuildRequires: ghc = %{ghc_version}
  415. BuildRequires: gmp-devel zlib-devel freeglut-devel
  416. BuildRequires: libffi-devel
  417. %if !%{with bootstrap}
  418. BuildRequires: haskell-platform = %{%version}
  419. %if %{with stack}
  420. BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl
  421. %endif
  422. %endif
  423. Requires: ghc = %{ghc_version}
  424. Requires: freeglut-devel
  425. Conflicts: alex
  426. Conflicts: happy
  427. Conflicts: haskell-platform-base
  428. Conflicts: cabal-install
  429. Conflicts: hscolour
  430. Vendor: Project Vine
  431. Distribution: Vine Linux
  432. Packager: ara_t
  433. %description
  434. Haskell is a computer programming language.
  435. In particular, it is a polymorphically statically typed, lazy, purely
  436. functional language, quite different from most other programming languages.
  437. The language is named for Haskell Brooks Curry, whose work in mathematical
  438. logic serves as a foundation for functional languages.
  439. %if !%{with bootstrap}
  440. %package dep
  441. Summary: Dummy package to delete haskell-related packages
  442. Group: Applications/Languages
  443. BuildArch: noarch
  444. Requires: haskell-platform = %{version}-%{release}
  445. %description dep
  446. This package is a dummy package to delete haskell-related packages
  447. such as libghc-*, yaml and xmonad.
  448. %endif
  449. %prep
  450. %{__rm} -rf ${RPM_BUILD_ROOT}
  451. %setup -q -n %{name}-%{pkg_version}
  452. %{__mkdir_p} %{ghc_pkg_confdir}
  453. %build
  454. export PATH=${RPM_BUILD_ROOT}%{_bindir}:${PATH}
  455. export LANG=en_US.utf8
  456. PKGNAME=%{name}-%{version}
  457. ########################################
  458. # alex / happy / HsColour
  459. ########################################
  460. cd %{_builddir}/%{name}-%{pkg_version}
  461. cd packages
  462. for pkg in `cat ../etc/build.packages`; do
  463. pushd ${pkg}
  464. %ghc_make_setup
  465. %ghc_setup_configure ${PKGNAME} ${pkg}
  466. %ghc_setup_build
  467. %if !%{with bootstrap}
  468. %if %{with stack}
  469. %{ghc_setup_haddock}
  470. %endif
  471. %endif
  472. %ghc_setup_copy_resister ${pkg}
  473. popd
  474. done
  475. ########################################
  476. # haskell-platform (full packages without stack)
  477. ########################################
  478. %if !%{with bootstrap}
  479. for pkg in `cat %{SOURCE1}`; do
  480. %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz
  481. pushd ${pkg}
  482. %ghc_fix_dependencies ${pkg}
  483. %ghc_make_setup
  484. %ghc_setup_configure ${PKGNAME} ${pkg}
  485. %ghc_setup_build
  486. %if %{with stack}
  487. %ghc_setup_haddock
  488. %endif
  489. %ghc_setup_copy_resister ${pkg}
  490. popd
  491. done
  492. # cabal-install
  493. cd %{_builddir}
  494. for pkg in `cat %{SOURCE2}`; do
  495. %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz
  496. pushd ${pkg}
  497. %ghc_fix_dependencies ${pkg}
  498. %ghc_make_setup
  499. if [ ${pkg} = "cabal-install-%{cabal_version}" ]
  500. then
  501. %ghc_setup configure \
  502. --user \
  503. --prefix=%{_prefix} \
  504. --docdir=%{_docdir}/${PKGNAME}/${pkg}
  505. %ghc_setup_build
  506. %ghc_setup copy --destdir=${RPM_BUILD_ROOT}
  507. else
  508. %ghc_setup configure --user
  509. %ghc_setup_build
  510. %ghc_setup copy
  511. %ghc_setup register --inplace
  512. fi
  513. popd
  514. done
  515. %endif # %if !%{with bootstrap}
  516. ########################################
  517. # haskell-platform (stack)
  518. ########################################
  519. %if !%{with bootstrap}
  520. %if %{with stack}
  521. cd %{_builddir}
  522. for pkg in `cat %{SOURCE3}`; do
  523. %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz
  524. pushd ${pkg}
  525. %ghc_fix_dependencies ${pkg}
  526. case ${pkg} in
  527. "stack-%{stack_version}") cabal install --enable-documentation ;;
  528. *) cabal install --force-reinstalls ;;
  529. esac
  530. popd
  531. done
  532. %endif # %if %{with stack}
  533. %endif # %if !%{with bootstrap}
  534. %install
  535. %if !%{with bootstrap}
  536. # hscolour
  537. cd ${RPM_BUILD_ROOT}%{_bindir}
  538. %{__ln_s} HsColour hscolour
  539. # stack
  540. %if %{with stack}
  541. %{__install} -m 755 ${HOME}/.cabal/bin/stack \
  542. ${RPM_BUILD_ROOT}%{_bindir}
  543. cd ${HOME}/.cabal/share/doc/%{rpmarch}-linux-ghc-%{ghc_version}
  544. %{__mv} stack-%{stack_version} \
  545. ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}
  546. %endif # %if %{with stack}
  547. %endif # %if !%{with bootstrap}
  548. # macros for building haskell-platform-related packages
  549. %{__mkdir_p} ${RPM_BUILD_ROOT}%{_sysconfdir}/rpm
  550. %{__cp} %{SOURCE11} ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm/
  551. %clean
  552. %{__rm} -rf ${RPM_BUILD_ROOT}
  553. %post
  554. %ghc_pkg_recache
  555. %postun
  556. %ghc_pkg_recache
  557. %files
  558. %defattr(-, root, root)
  559. %{_bindir}/
  560. %{_libdir}/%{name}-%{version}/
  561. %{_libdir}/ghc-%{ghc_version}/package.conf.d/
  562. %{_datadir}/%{name}-%{version}/
  563. %{_docdir}/%{name}-%{version}/
  564. %if !%{with bootstrap}
  565. %{_mandir}/man1/
  566. %endif
  567. %{_sysconfdir}/rpm/
  568. %if !%{with bootstrap}
  569. %files dep
  570. %endif
  571. %changelog
  572. * Thu May 17 2018 Toshiaki Ara <ara_t@384.jp> 2018.8.4.2-1
  573. - update to 8.4.2
  574. - add /etc/rpm/macros.cabal
  575. - add haskell-platform-dep package for deleting haskell-related packages
  576. - rewrite using macro
  577. * Sat Jan 06 2018 Toshiaki Ara <ara_t@384.jp> 2017.8.2.2-1
  578. - update to 8.2.2
  579. * Wed Feb 01 2017 Toshiaki Ara <ara_t@384.jp> 2016.8.0.1-1
  580. - update to 2016.8.0.1
  581. * Tue May 03 2016 Toshiaki Ara <ara_t@384.jp> 2015.7.10.3-3
  582. - modify SPEC file without usage of cabal-install
  583. * Mon Apr 11 2016 Toshiaki Ara <ara_t@384.jp> 2015.7.10.3-2
  584. - correct SPEC file
  585. * Fri Feb 19 2016 Toshiaki Ara <ara_t@384.jp> 2015.7.10.3-1
  586. - update to 7.10.3
  587. * Mon Feb 15 2016 Toshiaki Ara <ara_t@384.jp> 2013.2.0.0-4
  588. - delete subpackage cabal-install
  589. - delete %%{cabal_version} from Requires: cabal-install-%%{cabal_version}
  590. - add BuildRequires: libffi-devel
  591. * Thu Feb 11 2016 Toshiaki Ara <ara_t@384.jp> 2013.2.0.0-3
  592. - correct Requires
  593. * Thu Feb 11 2016 Toshiaki Ara <ara_t@384.jp> 2013.2.0.0-2
  594. - install Haskell libraries into %%{_libdir}/ghc-lib
  595. - add BuildRequires: hscolour
  596. - devide insto subpackages
  597. * Thu Feb 04 2016 Toshiaki Ara <ara_t@384.jp> 2013.2.0.0-1
  598. - new package