%bcond_with bootstrap %bcond_without stack %define pkg_name haskell-platform %define year_version 2018 %define pkg_version 8.4.2 %define pkg_release 1%{?_dist_release} %define ghc_version %{pkg_version} %define cabal_version 2.2.0.0 %define stack_version 1.7.1 %ifarch %{ix86} %define rpmarch i386 %endif %ifarch x86_64 %define rpmarch x86_64 %endif Summary: An advanced purely-functional programming language Name: %{pkg_name} Version: %{year_version}.%{pkg_version} Release: %{pkg_release} License: BSD-like Group: Applications/Languages Source0: %{name}-%{pkg_version}.tar.gz Source1: packages.haskell Source2: packages.cabal-install Source3: packages.stack Source11: macros.cabal Source21: download-packages.pl Source22: generate-list.sh # ./download-packages.pl # ./generate-list.sh Source101: ObjectName-1.1.0.1.tar.gz Source102: ObjectName.cabal Source103: call-stack-0.1.0.tar.gz Source104: call-stack.cabal Source105: HUnit-1.6.0.0.tar.gz Source106: HUnit.cabal Source107: fgl-5.6.0.0.tar.gz Source108: fgl.cabal Source109: fixed-0.2.1.1.tar.gz Source110: fixed.cabal Source111: half-0.2.2.3.tar.gz Source112: half.cabal Source113: html-1.0.1.2.tar.gz Source114: html.cabal Source115: integer-logarithms-1.0.2.1.tar.gz Source116: integer-logarithms.cabal Source117: network-2.6.3.5.tar.gz Source118: network.cabal Source119: parallel-3.2.1.1.tar.gz Source120: parallel.cabal Source121: primitive-0.6.3.0.tar.gz Source122: primitive.cabal Source123: random-1.1.tar.gz Source124: random.cabal Source125: regex-base-0.93.2.tar.gz Source126: regex-base.cabal Source127: regex-posix-0.95.2.tar.gz Source128: regex-posix.cabal Source129: regex-compat-0.95.1.tar.gz Source130: regex-compat.cabal Source131: split-0.2.3.3.tar.gz Source132: split.cabal Source133: async-2.2.1.tar.gz Source134: async.cabal Source135: StateVar-1.1.0.4.tar.gz Source136: StateVar.cabal Source137: syb-0.7.tar.gz Source138: syb.cabal Source139: haskell-src-1.0.3.0.tar.gz Source140: haskell-src.cabal Source141: network-uri-2.6.1.0.tar.gz Source142: network-uri.cabal Source143: hashable-1.2.7.0.tar.gz Source144: hashable.cabal Source145: scientific-0.3.5.2.tar.gz Source146: scientific.cabal Source147: case-insensitive-1.2.0.10.tar.gz Source148: case-insensitive.cabal Source149: attoparsec-0.13.2.2.tar.gz Source150: attoparsec.cabal Source151: OpenGLRaw-3.2.7.0.tar.gz Source152: OpenGLRaw.cabal Source153: HTTP-4000.3.11.tar.gz Source154: HTTP.cabal Source155: GLURaw-2.0.0.3.tar.gz Source156: GLURaw.cabal Source157: OpenGL-3.0.2.0.tar.gz Source158: OpenGL.cabal Source159: GLUT-2.7.0.12.tar.gz Source160: GLUT.cabal Source161: tf-random-0.5.tar.gz Source162: tf-random.cabal Source163: QuickCheck-2.11.3.tar.gz Source164: QuickCheck.cabal Source165: unordered-containers-0.2.9.0.tar.gz Source166: unordered-containers.cabal Source167: vector-0.12.0.1.tar.gz Source168: vector.cabal Source169: zlib-0.6.2.tar.gz Source170: zlib.cabal Source171: base16-bytestring-0.1.1.6.tar.gz Source172: base16-bytestring.cabal Source173: base64-bytestring-1.0.0.1.tar.gz Source174: base64-bytestring.cabal Source175: cryptohash-sha256-0.11.101.0.tar.gz Source176: cryptohash-sha256.cabal Source177: ed25519-0.0.5.0.tar.gz Source178: ed25519.cabal Source179: tar-0.5.1.0.tar.gz Source180: tar.cabal Source181: hackage-security-0.5.3.0.tar.gz Source182: hackage-security.cabal Source183: echo-0.1.3.tar.gz Source184: echo.cabal Source185: edit-distance-0.2.2.1.tar.gz Source186: edit-distance.cabal Source187: resolv-0.1.1.1.tar.gz Source188: resolv.cabal Source189: cabal-install-2.2.0.0.tar.gz Source190: cabal-install.cabal Source191: annotated-wl-pprint-0.7.0.tar.gz Source192: annotated-wl-pprint.cabal Source193: auto-update-0.1.4.tar.gz Source194: auto-update.cabal Source195: base-compat-0.9.3.tar.gz Source196: base-compat.cabal Source197: base-orphans-0.7.tar.gz Source198: base-orphans.cabal Source199: base-prelude-1.2.0.1.tar.gz Source200: base-prelude.cabal Source201: basement-0.0.7.tar.gz Source202: basement.cabal Source203: bindings-uname-0.1.tar.gz Source204: bindings-uname.cabal Source205: bitarray-0.0.1.1.tar.gz Source206: bitarray.cabal Source207: blaze-builder-0.4.1.0.tar.gz Source208: blaze-builder.cabal Source209: byteable-0.1.1.tar.gz Source210: byteable.cabal Source211: cabal-doctest-1.0.6.tar.gz Source212: cabal-doctest.cabal Source213: cereal-0.5.5.0.tar.gz Source214: cereal.cabal Source215: clock-0.7.2.tar.gz Source216: clock.cabal Source217: cmdargs-0.10.20.tar.gz Source218: cmdargs.cabal Source219: colour-2.3.4.tar.gz Source220: colour.cabal Source221: data-default-class-0.1.2.0.tar.gz Source222: data-default-class.cabal Source223: digest-0.0.1.2.tar.gz Source224: digest.cabal Source225: dlist-0.8.0.4.tar.gz Source226: dlist.cabal Source227: easy-file-0.2.1.tar.gz Source228: easy-file.cabal Source229: fail-4.9.0.0.tar.gz Source230: fail.cabal Source231: file-embed-0.0.10.1.tar.gz Source232: file-embed.cabal Source233: filelock-0.1.1.2.tar.gz Source234: filelock.cabal Source235: generic-deriving-1.12.1.tar.gz Source236: generic-deriving.cabal Source237: hinotify-0.3.10.tar.gz Source238: hinotify.cabal Source239: hourglass-0.2.11.tar.gz Source240: hourglass.cabal Source241: hspec-discover-2.5.0.tar.gz Source242: hspec-discover.cabal Source243: hspec-expectations-0.8.2.tar.gz Source244: hspec-expectations.cabal Source245: http-types-0.12.1.tar.gz Source246: http-types.cabal Source247: logict-0.6.0.2.tar.gz Source248: logict.cabal Source249: microlens-0.4.9.1.tar.gz Source250: microlens.cabal Source251: mime-types-0.1.0.7.tar.gz Source252: mime-types.cabal Source253: mintty-0.1.2.tar.gz Source254: mintty.cabal Source255: monad-loops-0.4.3.tar.gz Source256: monad-loops.cabal Source257: old-locale-1.0.0.7.tar.gz Source258: old-locale.cabal Source259: open-browser-0.2.1.0.tar.gz Source260: open-browser.cabal Source261: path-pieces-0.2.1.tar.gz Source262: path-pieces.cabal Source263: polyparse-1.12.tar.gz Source264: polyparse.cabal Source265: quickcheck-io-0.2.0.tar.gz Source266: quickcheck-io.cabal Source267: regex-applicative-0.3.3.tar.gz Source268: regex-applicative.cabal Source269: safe-0.3.17.tar.gz Source270: safe.cabal Source271: semigroups-0.18.4.tar.gz Source272: semigroups.cabal Source273: setenv-0.1.1.3.tar.gz Source274: setenv.cabal Source275: silently-1.2.5.tar.gz Source276: silently.cabal Source277: stm-chans-3.0.0.4.tar.gz Source278: stm-chans.cabal Source279: streaming-commons-0.2.0.0.tar.gz Source280: streaming-commons.cabal Source281: text-metrics-0.3.0.tar.gz Source282: text-metrics.cabal Source283: th-abstraction-0.2.6.0.tar.gz Source284: th-abstraction.cabal Source285: th-expand-syns-0.4.4.0.tar.gz Source286: th-expand-syns.cabal Source287: th-lift-0.7.8.tar.gz Source288: th-lift.cabal Source289: time-locale-compat-0.1.1.4.tar.gz Source290: time-locale-compat.cabal Source291: transformers-compat-0.6.1.6.tar.gz Source292: transformers-compat.cabal Source293: typed-process-0.2.2.0.tar.gz Source294: typed-process.cabal Source295: unix-compat-0.5.0.1.tar.gz Source296: unix-compat.cabal Source297: unliftio-core-0.1.1.0.tar.gz Source298: unliftio-core.cabal Source299: uuid-types-1.0.3.tar.gz Source300: uuid-types.cabal Source301: vector-algorithms-0.7.0.1.tar.gz Source302: vector-algorithms.cabal Source303: void-0.7.2.tar.gz Source304: void.cabal Source305: gitrev-1.3.1.tar.gz Source306: gitrev.cabal Source307: attoparsec-iso8601-1.0.0.0.tar.gz Source308: attoparsec-iso8601.cabal Source309: neat-interpolation-0.3.2.1.tar.gz Source310: neat-interpolation.cabal Source311: foundation-0.0.20.tar.gz Source312: foundation.cabal Source313: unicode-transforms-0.3.4.tar.gz Source314: unicode-transforms.cabal Source315: blaze-markup-0.8.2.1.tar.gz Source316: blaze-markup.cabal Source317: socks-0.5.6.tar.gz Source318: socks.cabal Source319: extra-1.6.6.tar.gz Source320: extra.cabal Source321: ansi-terminal-0.8.0.4.tar.gz Source322: ansi-terminal.cabal Source323: cookie-0.4.4.tar.gz Source324: cookie.cabal Source325: store-core-0.4.1.tar.gz Source326: store-core.cabal Source327: smallcheck-1.1.3.1.tar.gz Source328: smallcheck.cabal Source329: old-time-1.1.0.3.tar.gz Source330: old-time.cabal Source331: regex-applicative-text-0.1.0.1.tar.gz Source332: regex-applicative-text.cabal Source333: microlens-th-0.4.2.1.tar.gz Source334: microlens-th.cabal Source335: th-reify-many-0.1.8.tar.gz Source336: th-reify-many.cabal Source337: th-lift-instances-0.1.11.tar.gz Source338: th-lift-instances.cabal Source339: transformers-base-0.4.5.2.tar.gz Source340: transformers-base.cabal Source341: tagged-0.8.5.tar.gz Source342: tagged.cabal Source343: exceptions-0.8.3.tar.gz Source344: exceptions.cabal Source345: contravariant-1.4.1.tar.gz Source346: contravariant.cabal Source347: Glob-0.9.2.tar.gz Source348: Glob.cabal Source349: fsnotify-0.2.1.2.tar.gz Source350: fsnotify.cabal Source351: unliftio-0.2.7.0.tar.gz Source352: unliftio.cabal Source353: mono-traversable-1.0.8.1.tar.gz Source354: mono-traversable.cabal Source355: memory-0.14.16.tar.gz Source356: memory.cabal Source357: blaze-html-0.9.0.1.tar.gz Source358: blaze-html.cabal Source359: hspec-core-2.5.0.tar.gz Source360: hspec-core.cabal Source361: ansi-wl-pprint-0.6.8.2.tar.gz Source362: ansi-wl-pprint.cabal Source363: zip-archive-0.3.2.4.tar.gz Source364: zip-archive.cabal Source365: unix-time-0.3.8.tar.gz Source366: unix-time.cabal Source367: cpphs-1.20.8.tar.gz Source368: cpphs.cabal Source369: uri-bytestring-0.3.1.1.tar.gz Source370: uri-bytestring.cabal Source371: th-orphans-0.13.5.tar.gz Source372: th-orphans.cabal Source373: monad-control-1.0.2.3.tar.gz Source374: monad-control.cabal Source375: distributive-0.5.3.tar.gz Source376: distributive.cabal Source377: aeson-1.2.4.0.tar.gz Source378: aeson.cabal Source379: temporary-1.2.1.1.tar.gz Source380: temporary.cabal Source381: retry-0.7.6.2.tar.gz Source382: retry.cabal Source383: resourcet-1.2.1.tar.gz Source384: resourcet.cabal Source385: rio-0.1.2.0.tar.gz Source386: rio.cabal Source387: pem-0.2.4.tar.gz Source388: pem.cabal Source389: http-client-0.5.12.1.tar.gz Source390: http-client.cabal Source391: cryptonite-0.25.tar.gz Source392: cryptonite.cabal Source393: asn1-types-0.3.2.tar.gz Source394: asn1-types.cabal Source395: hspec-smallcheck-0.5.2.tar.gz Source396: hspec-smallcheck.cabal Source397: hspec-2.5.0.tar.gz Source398: hspec.cabal Source399: optparse-applicative-0.14.2.0.tar.gz Source400: optparse-applicative.cabal Source401: fast-logger-2.4.11.tar.gz Source402: fast-logger.cabal Source403: haskell-src-exts-1.20.2.tar.gz Source404: haskell-src-exts.cabal Source405: http-api-data-0.3.8.1.tar.gz Source406: http-api-data.cabal Source407: th-utilities-0.2.0.1.tar.gz Source408: th-utilities.cabal Source409: resource-pool-0.2.3.2.tar.gz Source410: resource-pool.cabal Source411: lifted-base-0.2.3.12.tar.gz Source412: lifted-base.cabal Source413: comonad-5.0.3.tar.gz Source414: comonad.cabal Source415: path-0.6.1.tar.gz Source416: path.cabal Source417: aeson-compat-0.3.7.1.tar.gz Source418: aeson-compat.cabal Source419: conduit-1.3.0.2.tar.gz Source420: conduit.cabal Source421: cryptohash-0.11.9.tar.gz Source422: cryptohash.cabal Source423: asn1-encoding-0.9.5.tar.gz Source424: asn1-encoding.cabal Source425: optparse-simple-0.1.0.tar.gz Source426: optparse-simple.cabal Source427: haskell-src-meta-0.8.0.2.tar.gz Source428: haskell-src-meta.cabal Source429: bifunctors-5.5.2.tar.gz Source430: bifunctors.cabal Source431: path-io-1.3.3.tar.gz Source432: path-io.cabal Source433: yaml-0.8.30.tar.gz Source434: yaml.cabal Source435: conduit-extra-1.3.0.tar.gz Source436: conduit-extra.cabal Source437: asn1-parse-0.9.4.tar.gz Source438: asn1-parse.cabal Source439: semigroupoids-5.2.2.tar.gz Source440: semigroupoids.cabal Source441: profunctors-5.2.2.tar.gz Source442: profunctors.cabal Source443: project-template-0.2.0.1.tar.gz Source444: project-template.cabal Source445: monad-logger-0.3.28.5.tar.gz Source446: monad-logger.cabal Source447: cryptonite-conduit-0.2.2.tar.gz Source448: cryptonite-conduit.cabal Source449: x509-1.7.3.tar.gz Source450: x509.cabal Source451: free-5.0.2.tar.gz Source452: free.cabal Source453: either-5.tar.gz Source454: either.cabal Source455: persistent-2.8.2.tar.gz Source456: persistent.cabal Source457: x509-store-1.6.6.tar.gz Source458: x509-store.cabal Source459: store-0.4.3.2.tar.gz Source460: store.cabal Source461: mustache-2.3.0.tar.gz Source462: mustache.cabal Source463: persistent-template-2.5.4.tar.gz Source464: persistent-template.cabal Source465: persistent-sqlite-2.8.1.2.tar.gz Source466: persistent-sqlite.cabal Source467: x509-validation-1.6.10.tar.gz Source468: x509-validation.cabal Source469: x509-system-1.6.6.tar.gz Source470: x509-system.cabal Source471: tls-1.4.1.tar.gz Source472: tls.cabal Source473: connection-0.2.8.tar.gz Source474: connection.cabal Source475: http-client-tls-0.3.5.3.tar.gz Source476: http-client-tls.cabal Source477: http-conduit-2.3.1.tar.gz Source478: http-conduit.cabal Source479: hpack-0.28.2.tar.gz Source480: hpack.cabal Source481: stack-1.7.1.tar.gz Source482: stack.cabal BuildRoot: %{_tmppath}/%{name}-%{pkg_version}-root BuildRequires: ghc = %{ghc_version} BuildRequires: gmp-devel zlib-devel freeglut-devel BuildRequires: libffi-devel %if !%{with bootstrap} BuildRequires: haskell-platform = %{%version} %if %{with stack} BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl %endif %endif Requires: ghc = %{ghc_version} Requires: freeglut-devel Conflicts: alex Conflicts: happy Conflicts: haskell-platform-base Conflicts: cabal-install Conflicts: hscolour Vendor: Project Vine Distribution: Vine Linux Packager: ara_t %description Haskell is a computer programming language. In particular, it is a polymorphically statically typed, lazy, purely functional language, quite different from most other programming languages. The language is named for Haskell Brooks Curry, whose work in mathematical logic serves as a foundation for functional languages. %if !%{with bootstrap} %package dep Summary: Dummy package to delete haskell-related packages Group: Applications/Languages BuildArch: noarch Requires: haskell-platform = %{version}-%{release} %description dep This package is a dummy package to delete haskell-related packages such as libghc-*, yaml and xmonad. %endif %prep %{__rm} -rf ${RPM_BUILD_ROOT} %setup -q -n %{name}-%{pkg_version} %{__mkdir_p} %{ghc_pkg_confdir} %build export PATH=${RPM_BUILD_ROOT}%{_bindir}:${PATH} export LANG=en_US.utf8 PKGNAME=%{name}-%{version} ######################################## # alex / happy / HsColour ######################################## cd %{_builddir}/%{name}-%{pkg_version} cd packages for pkg in `cat ../etc/build.packages`; do pushd ${pkg} %ghc_make_setup %ghc_setup_configure ${PKGNAME} ${pkg} %ghc_setup_build %if !%{with bootstrap} %if %{with stack} %{ghc_setup_haddock} %endif %endif %ghc_setup_copy_resister ${pkg} popd done ######################################## # haskell-platform (full packages without stack) ######################################## %if !%{with bootstrap} for pkg in `cat %{SOURCE1}`; do %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz pushd ${pkg} %ghc_fix_dependencies ${pkg} %ghc_make_setup %ghc_setup_configure ${PKGNAME} ${pkg} %ghc_setup_build %if %{with stack} %ghc_setup_haddock %endif %ghc_setup_copy_resister ${pkg} popd done # cabal-install cd %{_builddir} for pkg in `cat %{SOURCE2}`; do %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz pushd ${pkg} %ghc_fix_dependencies ${pkg} %ghc_make_setup if [ ${pkg} = "cabal-install-%{cabal_version}" ] then %ghc_setup configure \ --user \ --prefix=%{_prefix} \ --docdir=%{_docdir}/${PKGNAME}/${pkg} %ghc_setup_build %ghc_setup copy --destdir=${RPM_BUILD_ROOT} else %ghc_setup configure --user %ghc_setup_build %ghc_setup copy %ghc_setup register --inplace fi popd done %endif # %if !%{with bootstrap} ######################################## # haskell-platform (stack) ######################################## %if !%{with bootstrap} %if %{with stack} cd %{_builddir} for pkg in `cat %{SOURCE3}`; do %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz pushd ${pkg} %ghc_fix_dependencies ${pkg} case ${pkg} in "stack-%{stack_version}") cabal install --enable-documentation ;; *) cabal install --force-reinstalls ;; esac popd done %endif # %if %{with stack} %endif # %if !%{with bootstrap} %install %if !%{with bootstrap} # hscolour cd ${RPM_BUILD_ROOT}%{_bindir} %{__ln_s} HsColour hscolour # stack %if %{with stack} %{__install} -m 755 ${HOME}/.cabal/bin/stack \ ${RPM_BUILD_ROOT}%{_bindir} cd ${HOME}/.cabal/share/doc/%{rpmarch}-linux-ghc-%{ghc_version} %{__mv} stack-%{stack_version} \ ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version} %endif # %if %{with stack} %endif # %if !%{with bootstrap} # macros for building haskell-platform-related packages %{__mkdir_p} ${RPM_BUILD_ROOT}%{_sysconfdir}/rpm %{__cp} %{SOURCE11} ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm/ %clean %{__rm} -rf ${RPM_BUILD_ROOT} %post %ghc_pkg_recache %postun %ghc_pkg_recache %files %defattr(-, root, root) %{_bindir}/ %{_libdir}/%{name}-%{version}/ %{_libdir}/ghc-%{ghc_version}/package.conf.d/ %{_datadir}/%{name}-%{version}/ %{_docdir}/%{name}-%{version}/ %if !%{with bootstrap} %{_mandir}/man1/ %endif %{_sysconfdir}/rpm/ %if !%{with bootstrap} %files dep %endif %changelog * Thu May 17 2018 Toshiaki Ara 2018.8.4.2-1 - update to 8.4.2 - add /etc/rpm/macros.cabal - add haskell-platform-dep package for deleting haskell-related packages - rewrite using macro * Sat Jan 06 2018 Toshiaki Ara 2017.8.2.2-1 - update to 8.2.2 * Wed Feb 01 2017 Toshiaki Ara 2016.8.0.1-1 - update to 2016.8.0.1 * Tue May 03 2016 Toshiaki Ara 2015.7.10.3-3 - modify SPEC file without usage of cabal-install * Mon Apr 11 2016 Toshiaki Ara 2015.7.10.3-2 - correct SPEC file * Fri Feb 19 2016 Toshiaki Ara 2015.7.10.3-1 - update to 7.10.3 * Mon Feb 15 2016 Toshiaki Ara 2013.2.0.0-4 - delete subpackage cabal-install - delete %%{cabal_version} from Requires: cabal-install-%%{cabal_version} - add BuildRequires: libffi-devel * Thu Feb 11 2016 Toshiaki Ara 2013.2.0.0-3 - correct Requires * Thu Feb 11 2016 Toshiaki Ara 2013.2.0.0-2 - install Haskell libraries into %%{_libdir}/ghc-lib - add BuildRequires: hscolour - devide insto subpackages * Thu Feb 04 2016 Toshiaki Ara 2013.2.0.0-1 - new package