yaml-vl.spec 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. %define pkg_name yaml
  2. %define pkg_version 0.8.16
  3. %define pkg_release 3%{?_dist_release}
  4. %define ghc_version 7.10.3
  5. Summary: Support for parsing and rendering YAML documents
  6. Name: %{pkg_name}
  7. Version: %{pkg_version}
  8. Release: %{pkg_release}
  9. License: BSD3
  10. Group: Applications/Text
  11. URL: http://hackage.haskell.org
  12. Source0: %{name}-%{version}.tar.gz
  13. Source1: fail-4.9.0.0.tar.gz
  14. Source2: mmorph-1.0.6.tar.gz
  15. Source3: tagged-0.8.3.tar.gz
  16. Source4: semigroups-0.18.1.tar.gz
  17. Source5: transformers-base-0.4.4.tar.gz
  18. Source6: monad-control-1.0.0.5.tar.gz
  19. Source7: lifted-base-0.2.3.6.tar.gz
  20. Source8: enclosed-exceptions-1.0.1.1.tar.gz
  21. Source9: resourcet-1.1.7.2.tar.gz
  22. Source10: conduit-1.2.6.2.tar.gz
  23. Source100: packages
  24. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  25. BuildRequires: ghc haskell-platform-base cabal-install
  26. BuildRequires: libffi-devel gmp-devel zlib-devel
  27. BuildRequires: libghc-dlist
  28. BuildRequires: libghc-aeson
  29. BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl
  30. BuildRequires: hscolour
  31. Requires: ghc haskell-platform-base cabal-install
  32. Requires: libghc-dlist
  33. Requires: libghc-aeson
  34. Vendor: Project Vine
  35. Distribution: Vine Linux
  36. Packager: ara_t
  37. %description
  38. This package includes the full libyaml C library version 0.1.5
  39. by Kirill Simonov in the package so you don't need to worry
  40. about any non-Haskell dependencies.
  41. The package is broken down into two primary modules.
  42. "Data.Yaml" provides a high-level interface based around the JSON datatypes
  43. provided by the @aeson@ package.
  44. "Text.Libyaml" provides a lower-level, streaming interface.
  45. For most users, "Data.Yaml" is recommended.
  46. #'
  47. %prep
  48. %{__rm} -rf ${RPM_BUILD_ROOT}
  49. %setup -q
  50. %build
  51. # Initialise the package db
  52. ghc-pkg init %{_builddir}/package.conf
  53. PKG_CONF_DIR=${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_version}/package.conf.d
  54. %{__mkdir_p} ${PKG_CONF_DIR}
  55. # install dependent packages
  56. cd %{_builddir}
  57. for pkg in `cat %{SOURCE100}`; do
  58. %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz
  59. cd ${pkg}
  60. cabal configure \
  61. --prefix=%{_prefix} \
  62. --libdir=%{_libdir}/ghc-lib/%{name}/${pkg} \
  63. --libsubdir= \
  64. --datadir=%{_datadir}/%{name}/${pkg} \
  65. --datasubdir= \
  66. --docdir=%{_docdir}/%{name}/${pkg}
  67. cabal build
  68. cabal haddock || : # avoid Error
  69. cabal copy --destdir=${RPM_BUILD_ROOT}
  70. cabal register --inplace
  71. cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{name}_${pkg}.conf
  72. cd ..
  73. done
  74. # build
  75. cd %{_builddir}/%{name}-%{version}
  76. cabal configure \
  77. --prefix=%{_prefix} \
  78. --libdir=%{_libdir}/ghc-lib/%{name}/%{name}-%{version} \
  79. --libsubdir= \
  80. --datadir=%{_datadir}/%{name}/%{name}-%{version} \
  81. --datasubdir= \
  82. --docdir=%{_docdir}/%{name}/%{name}-%{version}
  83. cabal build
  84. cabal haddock
  85. cabal copy --destdir=${RPM_BUILD_ROOT}
  86. cabal register --inplace
  87. cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{name}-%{version}.conf
  88. %install
  89. cabal copy --destdir=${RPM_BUILD_ROOT}
  90. %{__cp} ChangeLog.md LICENSE README.md \
  91. ${RPM_BUILD_ROOT}%{_docdir}/%{name}/%{name}-%{version}
  92. %clean
  93. %{__rm} -rf ${RPM_BUILD_ROOT}
  94. %post
  95. ghc-pkg recache
  96. %postun
  97. ghc-pkg recache
  98. %files
  99. %defattr(-, root, root)
  100. %{_bindir}/
  101. %{_libdir}/ghc-%{ghc_version}/
  102. %{_libdir}/ghc-lib/
  103. %{_docdir}/%{name}/
  104. %changelog
  105. * Wed May 04 2016 Toshiaki Ara <ara_t@384.jp> 0.8.16-3
  106. - rebuilt
  107. * Tue Apr 12 2016 Toshiaki Ara <ara_t@384.jp> 0.8.16-2
  108. - correct SPEC file
  109. * Tue Mar 01 2016 Toshiaki Ara <ara_t@384.jp> 0.8.16-1
  110. - new package