123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377 |
- %define pkg_name haskell-platform
- %define year_version 2016
- %define pkg_version 8.0.1
- %define pkg_release 1%{?_dist_release}
- %define ghc_version 8.0.1
- %define hscolour_version 1.24
- %define cabal_version 1.24.0.0
- %define stack_version 1.1.2
- # to fix wrong dependencies in cabal files
- # do not use '-'
- %define ed25519_version 0.0.5.0
- %define hackagesecurity_version 0.5.2.2
- %define hastache_version 0.6.1
- %define oldlocale_version 1.0.0.7
- %define oldtime_version 1.1.0.3
- %define utf8string_version 1.0.1.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.cabal-install
- Source2: packages.stack
- # LTS Haskell 7.18 (ghc-8.0.1): Published on 2017-01-29
- # cabal-install
- # num=11; for pkg in `cat packages.cabal-install`; do echo "Source${num}: ${pkg}.tar.gz"; num=`expr ${num} + 1`; done
- Source11: base16-bytestring-0.1.1.6.tar.gz
- Source12: base64-bytestring-1.0.0.1.tar.gz
- Source13: cryptohash-sha256-0.11.100.1.tar.gz
- Source14: ed25519-0.0.5.0.tar.gz
- Source15: tar-0.5.0.3.tar.gz
- Source16: hackage-security-0.5.2.2.tar.gz
- Source17: cabal-install-1.24.0.0.tar.gz
- # stack
- # num=101; for pkg in `cat packages.stack`; do echo "Source${num}: ${pkg}.tar.gz"; num=`expr ${num} + 1`; done
- Source101: SHA-1.6.4.2.tar.gz
- Source102: ansi-terminal-0.6.2.3.tar.gz
- Source103: ansi-wl-pprint-0.6.7.3.tar.gz
- Source104: auto-update-0.1.4.tar.gz
- Source105: base-compat-0.9.1.tar.gz
- Source106: base-orphans-0.5.4.tar.gz
- Source107: blaze-builder-0.4.0.2.tar.gz
- Source108: blaze-markup-0.7.1.1.tar.gz
- Source109: blaze-html-0.8.1.3.tar.gz
- Source110: byteable-0.1.1.tar.gz
- Source111: bytestring-builder-0.10.8.1.0.tar.gz
- Source112: cereal-0.5.4.0.tar.gz
- Source113: data-default-class-0.1.2.0.tar.gz
- Source114: digest-0.0.1.2.tar.gz
- Source115: dlist-0.8.0.2.tar.gz
- Source116: transformers-compat-0.5.1.4.tar.gz
- Source117: Glob-0.7.14.tar.gz
- Source118: easy-file-0.2.1.tar.gz
- Source119: edit-distance-0.2.2.1.tar.gz
- Source120: extra-1.4.10.tar.gz
- Source121: fail-4.9.0.0.tar.gz
- Source122: filelock-0.1.0.1.tar.gz
- Source123: generic-deriving-1.11.1.tar.gz
- Source124: generics-sop-0.2.3.0.tar.gz
- Source125: gitrev-1.2.0.tar.gz
- Source126: hinotify-0.3.9.tar.gz
- Source127: hourglass-0.2.10.tar.gz
- Source128: http-types-0.9.1.tar.gz
- Source129: ieee754-0.7.9.tar.gz
- Source130: hastache-0.6.1.tar.gz
- Source131: memory-0.13.tar.gz
- Source132: asn1-types-0.3.2.tar.gz
- Source133: asn1-encoding-0.9.4.tar.gz
- Source134: asn1-parse-0.9.4.tar.gz
- Source135: cryptonite-0.21.tar.gz
- Source136: cryptohash-0.11.9.tar.gz
- Source137: microlens-0.4.7.0.tar.gz
- Source138: mime-types-0.1.0.7.tar.gz
- Source139: monad-loops-0.4.3.tar.gz
- Source140: nats-1.1.1.tar.gz
- Source141: old-locale-1.0.0.7.tar.gz
- Source142: cookie-0.4.2.1.tar.gz
- Source143: old-time-1.1.0.3.tar.gz
- Source144: open-browser-0.2.1.0.tar.gz
- Source145: path-pieces-0.2.1.tar.gz
- Source146: patience-0.1.1.tar.gz
- Source147: pem-0.2.2.tar.gz
- Source148: prelude-extras-0.4.0.3.tar.gz
- Source149: regex-applicative-0.3.3.tar.gz
- Source150: regex-applicative-text-0.1.0.1.tar.gz
- Source151: safe-0.3.11.tar.gz
- Source152: semigroups-0.18.2.tar.gz
- Source153: silently-1.2.5.tar.gz
- Source154: socks-0.5.5.tar.gz
- Source155: split-0.2.3.1.tar.gz
- Source156: stm-chans-3.0.0.4.tar.gz
- Source157: streaming-commons-0.1.17.tar.gz
- Source158: system-filepath-0.4.13.4.tar.gz
- Source159: system-fileio-0.3.16.3.tar.gz
- Source160: tagged-0.8.5.tar.gz
- Source161: aeson-0.11.3.0.tar.gz
- Source162: binary-tagged-0.1.4.2.tar.gz
- Source163: text-binary-0.2.1.1.tar.gz
- Source164: time-locale-compat-0.1.1.3.tar.gz
- Source165: http-api-data-0.2.4.tar.gz
- Source166: MonadRandom-0.4.2.3.tar.gz
- Source167: constraints-0.8.tar.gz
- Source168: distributive-0.5.1.tar.gz
- Source169: exceptions-0.8.3.tar.gz
- Source170: aeson-compat-0.3.6.tar.gz
- Source171: http-client-0.4.31.2.tar.gz
- Source172: mmorph-1.0.9.tar.gz
- Source173: optparse-applicative-0.12.1.0.tar.gz
- Source174: path-0.5.11.tar.gz
- Source175: retry-0.7.4.2.tar.gz
- Source176: temporary-1.2.0.4.tar.gz
- Source177: unix-compat-0.4.3.1.tar.gz
- Source178: path-io-1.2.2.tar.gz
- Source179: transformers-base-0.4.4.tar.gz
- Source180: monad-control-1.0.1.0.tar.gz
- Source181: lifted-base-0.2.3.8.tar.gz
- Source182: enclosed-exceptions-1.0.2.tar.gz
- Source183: monad-unlift-0.2.0.tar.gz
- Source184: resource-pool-0.2.3.2.tar.gz
- Source185: resourcet-1.1.9.tar.gz
- Source186: conduit-1.2.8.tar.gz
- Source187: conduit-extra-1.1.15.tar.gz
- Source188: cryptohash-conduit-0.1.1.tar.gz
- Source189: project-template-0.2.0.tar.gz
- Source190: unexceptionalio-0.3.0.tar.gz
- Source191: errors-2.1.3.tar.gz
- Source192: fsnotify-0.2.1.tar.gz
- Source193: unix-time-0.3.7.tar.gz
- Source194: fast-logger-2.4.8.tar.gz
- Source195: monad-logger-0.3.20.1.tar.gz
- Source196: persistent-2.6.tar.gz
- Source197: persistent-sqlite-2.6.tar.gz
- Source198: persistent-template-2.5.1.6.tar.gz
- Source199: utf8-string-1.0.1.1.tar.gz
- Source200: vector-binary-instances-0.2.3.4.tar.gz
- Source201: void-0.7.1.tar.gz
- Source202: contravariant-1.4.tar.gz
- Source203: comonad-5.tar.gz
- Source204: bifunctors-5.4.1.tar.gz
- Source205: profunctors-5.2.tar.gz
- Source206: semigroupoids-5.1.tar.gz
- Source207: free-4.12.4.tar.gz
- Source208: either-4.4.1.1.tar.gz
- Source209: optparse-simple-0.0.3.tar.gz
- Source210: x509-1.6.5.tar.gz
- Source211: x509-store-1.6.2.tar.gz
- Source212: x509-system-1.6.4.tar.gz
- Source213: x509-validation-1.6.5.tar.gz
- Source214: tls-1.3.9.tar.gz
- Source215: connection-0.2.7.tar.gz
- Source216: http-client-tls-0.2.4.1.tar.gz
- Source217: http-conduit-2.1.11.tar.gz
- Source218: yaml-0.8.21.2.tar.gz
- Source219: hpack-0.14.1.tar.gz
- Source220: zip-archive-0.3.0.5.tar.gz
- Source221: zlib-bindings-0.1.1.5.tar.gz
- Source222: hit-0.6.3.tar.gz
- Source223: stack-1.1.2.tar.gz
- # to fix wrong dependencies in cabal files
- Source301: ed25519.cabal
- Source401: hastache.cabal
- Source402: old-locale.cabal
- Source403: old-time.cabal
- Source404: utf8-string.cabal
- Source405: stack.cabal
- BuildRoot: %{_tmppath}/%{name}-%{pkg_version}-root
- BuildRequires: ghc = %{ghc_version}
- BuildRequires: gmp-devel zlib-devel freeglut-devel
- BuildRequires: libffi-devel
- BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl
- 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.
- %prep
- %{__rm} -rf ${RPM_BUILD_ROOT}
- %setup -q -n %{name}-%{pkg_version}
- %build
- PKGNAME=%{name}-%{version}
- PKGCONFDIR=${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_version}/package.conf.d
- %{__mkdir_p} ${PKGCONFDIR}
- export PATH=${RPM_BUILD_ROOT}%{_bindir}:${HOME}/.cabal/bin:${PATH}
- export LANG=en_US.utf8
- # hscolour (bootstrap)
- pkg=hscolour-%{hscolour_version}
- cd %{_builddir}/%{name}-%{pkg_version}/packages/${pkg}
- ghc --make Setup
- ./Setup configure --user
- ./Setup build
- ./Setup copy
- ./Setup register --inplace
- # haskell-platform
- cd %{_builddir}/%{name}-%{pkg_version}
- cd packages
- for pkg in `cat ../etc/build.packages`; do
- cd ${pkg}
- ghc --make Setup
- ./Setup configure \
- --user \
- --prefix=%{_prefix} \
- --libdir=%{_libdir}/${PKGNAME}/${pkg} \
- --libsubdir= \
- --datadir=%{_datadir}/${PKGNAME}/${pkg} \
- --datasubdir= \
- --docdir=%{_docdir}/${PKGNAME}/${pkg}
- ./Setup build
- ./Setup haddock || :
- ./Setup copy --destdir=${RPM_BUILD_ROOT}
- ./Setup register --inplace
- ./Setup register --gen-pkg-config=${PKGCONFDIR}/${pkg}.conf
- cd ..
- done
- # cabal-install
- cd %{_builddir}
- for pkg in `cat %{SOURCE1}`; do
- %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz
- cd ${pkg}
- # fix wrong dependencies
- case ${pkg} in
- "ed25519-%{ed25519_version}") %{__cp} %{SOURCE301} . ;;
- *) ;;
- esac
- ghc --make Setup
- if [ ${pkg} = "cabal-install-%{cabal_version}" ]
- then
- ./Setup configure \
- --user \
- --prefix=%{_prefix} \
- --docdir=%{_docdir}/${PKGNAME}/${pkg}
- ./Setup build
- ./Setup copy --destdir=${RPM_BUILD_ROOT}
- else
- ./Setup configure --user
- ./Setup build
- ./Setup copy
- ./Setup register --inplace
- fi
- cd ..
- done
- # stack
- cd %{_builddir}
- for pkg in `cat %{SOURCE2}`; do
- %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz
- cd ${pkg}
- # fix wrong dependencies
- case ${pkg} in
- "hastache-%{hastache_version}") %{__cp} %{SOURCE401} . ;;
- "old-locale-%{oldlocale_version}") %{__cp} %{SOURCE402} . ;;
- "old-time-%{oldtime_version}") %{__cp} %{SOURCE403} . ;;
- "utf8-string-%{utf8string_version}") %{__cp} %{SOURCE404} . ;;
- "stack-%{stack_version}") %{__cp} %{SOURCE405} . ;;
- *) ;;
- esac
- if [ ${pkg} = "stack-%{stack_version}" ]
- then
- cabal install --enable-documentation
- else
- cabal install
- fi
- cd ..
- done
- %install
- # 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}
- # hscolour
- cd ${RPM_BUILD_ROOT}%{_bindir}
- %{__ln_s} HsColour hscolour
- %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}/
- %{_mandir}/man1/
- %changelog
- * Wed Feb 01 2017 Toshiaki Ara <ara_t@384.jp> 2016.8.0.1-1
- - update to 2016.8.0.1
- * Tue May 03 2016 Toshiaki Ara <ara_t@384.jp> 2015.7.10.3-3
- - modify SPEC file without usage of cabal-install
- * Mon Apr 11 2016 Toshiaki Ara <ara_t@384.jp> 2015.7.10.3-2
- - correct SPEC file
- * Fri Feb 19 2016 Toshiaki Ara <ara_t@384.jp> 2015.7.10.3-1
- - update to 7.10.3
- * Mon Feb 15 2016 Toshiaki Ara <ara_t@384.jp> 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 <ara_t@384.jp> 2013.2.0.0-3
- - correct Requires
- * Thu Feb 11 2016 Toshiaki Ara <ara_t@384.jp> 2013.2.0.0-2
- - install Haskell libraries into %%{_libdir}/ghc-lib
- - add BuildRequires: hscolour
- - devide insto subpackages
- * Thu Feb 04 2016 Toshiaki Ara <ara_t@384.jp> 2013.2.0.0-1
- - new package
|