123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- %define pkg_name yaml
- %define pkg_version 0.8.21.2
- %define pkg_release 1%{?_dist_release}
- %define ghc_version 8.0.1
- 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: exceptions-0.8.3.tar.gz
- Source12: mmorph-1.0.6.tar.gz
- Source13: semigroups-0.18.1.tar.gz
- Source14: transformers-base-0.4.4.tar.gz
- Source15: monad-control-1.0.0.5.tar.gz
- Source16: lifted-base-0.2.3.6.tar.gz
- Source17: enclosed-exceptions-1.0.1.1.tar.gz
- Source18: resourcet-1.1.7.2.tar.gz
- Source19: conduit-1.2.6.2.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}/%{name}-%{version} \
- --libsubdir= \
- --datadir=%{_datadir}/%{name}/%{name}-%{version} \
- --datasubdir= \
- --docdir=%{_docdir}/%{name}/%{name}-%{version}
- cabal build
- cabal haddock
- cabal copy --destdir=${RPM_BUILD_ROOT}
- cabal register --inplace
- cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{name}-%{version}.conf
- %install
- cabal copy --destdir=${RPM_BUILD_ROOT}
- %{__cp} ChangeLog.md LICENSE README.md \
- ${RPM_BUILD_ROOT}%{_docdir}/%{name}/%{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
- * Fri Feb 03 2017 Toshiaki Ara <ara_t@384.jp> 0.8.21.2-1
- - update to 0.8.21.2
- - build using ghc-8.0.1
- * Wed May 04 2016 Toshiaki Ara <ara_t@384.jp> 0.8.16-3
- - rebuilt
- * Tue Apr 12 2016 Toshiaki Ara <ara_t@384.jp> 0.8.16-2
- - correct SPEC file
- * Tue Mar 01 2016 Toshiaki Ara <ara_t@384.jp> 0.8.16-1
- - new package
|