%define pkg_name yaml %define pkg_version 0.8.25.1 %define pkg_release 1%{?_dist_release} %define ghc_version 8.2.2 Summary: Support for parsing and rendering YAML documents Name: %{pkg_name} Version: %{pkg_version} Release: %{pkg_release} License: BSD3 Group: Applications/Text URL: http://hackage.haskell.org Source0: %{name}-%{version}.tar.gz Source1: packages # num=11; for pkg in `cat packages`; do echo "Source${num}: ${pkg}.tar.gz"; num=`expr ${num} + 1`; done Source11: mmorph-1.1.0.tar.gz Source12: semigroups-0.18.3.tar.gz Source13: transformers-base-0.4.4.tar.gz Source14: unliftio-core-0.1.1.0.tar.gz Source15: monad-control-1.0.2.2.tar.gz Source16: lifted-base-0.2.3.11.tar.gz Source17: resourcet-1.1.10.tar.gz Source18: conduit-1.2.12.1.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: ghc haskell-platform BuildRequires: libffi-devel gmp-devel zlib-devel BuildRequires: libghc-dlist BuildRequires: libghc-aeson BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl Requires: ghc haskell-platform Requires: libghc-dlist Requires: libghc-aeson Vendor: Project Vine Distribution: Vine Linux Packager: ara_t %description This package includes the full libyaml C library version 0.1.5 by Kirill Simonov in the package so you don't need to worry about any non-Haskell dependencies. The package is broken down into two primary modules. "Data.Yaml" provides a high-level interface based around the JSON datatypes provided by the @aeson@ package. "Text.Libyaml" provides a lower-level, streaming interface. For most users, "Data.Yaml" is recommended. #' %prep %{__rm} -rf ${RPM_BUILD_ROOT} %{__rm} -rf %{_builddir}/package.conf %{__rm} -rf ${HOME}/.ghc %setup -q %build # Initialise the package db ghc-pkg init %{_builddir}/package.conf PKG_CONF_DIR=${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_version}/package.conf.d %{__mkdir_p} ${PKG_CONF_DIR} # install dependent packages cd %{_builddir} for pkg in `cat %{SOURCE1}`; do %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz cd ${pkg} cabal configure \ --prefix=%{_prefix} \ --libdir=%{_libdir}/ghc-lib/%{name}/${pkg} \ --libsubdir= \ --datadir=%{_datadir}/%{name}/${pkg} \ --datasubdir= \ --docdir=%{_docdir}/%{name}/${pkg} cabal build cabal haddock || : # avoid Error cabal copy --destdir=${RPM_BUILD_ROOT} cabal register --inplace cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{name}_${pkg}.conf cd .. done # build cd %{_builddir}/%{name}-%{version} cabal configure \ --prefix=%{_prefix} \ --libdir=%{_libdir}/ghc-lib/%{name}/%{pkg_name}-%{version} \ --libsubdir= \ --datadir=%{_datadir}/%{name}/%{pkg_name}-%{version} \ --datasubdir= \ --docdir=%{_docdir}/%{name}/%{pkg_name}-%{version} cabal build cabal haddock cabal copy --destdir=${RPM_BUILD_ROOT} cabal register --inplace cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{pkg_name}-%{version}.conf %install cabal copy --destdir=${RPM_BUILD_ROOT} %{__cp} ChangeLog.md LICENSE README.md \ ${RPM_BUILD_ROOT}%{_docdir}/%{name}/%{pkg_name}-%{version} %clean %{__rm} -rf ${RPM_BUILD_ROOT} %post ghc-pkg recache %postun ghc-pkg recache %files %defattr(-, root, root) %{_bindir}/ %{_libdir}/ghc-%{ghc_version}/ %{_libdir}/ghc-lib/ %{_docdir}/%{name}/ %changelog * Tue Jan 09 2018 Toshiaki Ara 0.8.25.1-1 - update to 0.8.25.1 - build using ghc-8.2.2 * Tue Feb 21 2017 Toshiaki Ara 0.8.21.2-2 - build using ghc-8.0.2 * Fri Feb 03 2017 Toshiaki Ara 0.8.21.2-1 - update to 0.8.21.2 - build using ghc-8.0.1 * Wed May 04 2016 Toshiaki Ara 0.8.16-3 - rebuilt * Tue Apr 12 2016 Toshiaki Ara 0.8.16-2 - correct SPEC file * Tue Mar 01 2016 Toshiaki Ara 0.8.16-1 - new package