yaml-vl.spec 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. %define pkg_name yaml
  2. %define pkg_version 0.8.21.2
  3. %define pkg_release 1%{?_dist_release}
  4. %define ghc_version 8.0.1
  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: packages
  14. # num=11; for pkg in `cat packages`; do echo "Source${num}: ${pkg}.tar.gz"; num=`expr ${num} + 1`; done
  15. Source11: exceptions-0.8.3.tar.gz
  16. Source12: mmorph-1.0.6.tar.gz
  17. Source13: semigroups-0.18.1.tar.gz
  18. Source14: transformers-base-0.4.4.tar.gz
  19. Source15: monad-control-1.0.0.5.tar.gz
  20. Source16: lifted-base-0.2.3.6.tar.gz
  21. Source17: enclosed-exceptions-1.0.1.1.tar.gz
  22. Source18: resourcet-1.1.7.2.tar.gz
  23. Source19: conduit-1.2.6.2.tar.gz
  24. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  25. BuildRequires: ghc haskell-platform
  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. Requires: ghc haskell-platform
  31. Requires: libghc-dlist
  32. Requires: libghc-aeson
  33. Vendor: Project Vine
  34. Distribution: Vine Linux
  35. Packager: ara_t
  36. %description
  37. This package includes the full libyaml C library version 0.1.5
  38. by Kirill Simonov in the package so you don't need to worry
  39. about any non-Haskell dependencies.
  40. The package is broken down into two primary modules.
  41. "Data.Yaml" provides a high-level interface based around the JSON datatypes
  42. provided by the @aeson@ package.
  43. "Text.Libyaml" provides a lower-level, streaming interface.
  44. For most users, "Data.Yaml" is recommended.
  45. #'
  46. %prep
  47. %{__rm} -rf ${RPM_BUILD_ROOT}
  48. %{__rm} -rf %{_builddir}/package.conf
  49. %{__rm} -rf ${HOME}/.ghc
  50. %setup -q
  51. %build
  52. # Initialise the package db
  53. ghc-pkg init %{_builddir}/package.conf
  54. PKG_CONF_DIR=${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_version}/package.conf.d
  55. %{__mkdir_p} ${PKG_CONF_DIR}
  56. # install dependent packages
  57. cd %{_builddir}
  58. for pkg in `cat %{SOURCE1}`; do
  59. %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz
  60. cd ${pkg}
  61. cabal configure \
  62. --prefix=%{_prefix} \
  63. --libdir=%{_libdir}/ghc-lib/%{name}/${pkg} \
  64. --libsubdir= \
  65. --datadir=%{_datadir}/%{name}/${pkg} \
  66. --datasubdir= \
  67. --docdir=%{_docdir}/%{name}/${pkg}
  68. cabal build
  69. cabal haddock || : # avoid Error
  70. cabal copy --destdir=${RPM_BUILD_ROOT}
  71. cabal register --inplace
  72. cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{name}_${pkg}.conf
  73. cd ..
  74. done
  75. # build
  76. cd %{_builddir}/%{name}-%{version}
  77. cabal configure \
  78. --prefix=%{_prefix} \
  79. --libdir=%{_libdir}/ghc-lib/%{name}/%{name}-%{version} \
  80. --libsubdir= \
  81. --datadir=%{_datadir}/%{name}/%{name}-%{version} \
  82. --datasubdir= \
  83. --docdir=%{_docdir}/%{name}/%{name}-%{version}
  84. cabal build
  85. cabal haddock
  86. cabal copy --destdir=${RPM_BUILD_ROOT}
  87. cabal register --inplace
  88. cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{name}-%{version}.conf
  89. %install
  90. cabal copy --destdir=${RPM_BUILD_ROOT}
  91. %{__cp} ChangeLog.md LICENSE README.md \
  92. ${RPM_BUILD_ROOT}%{_docdir}/%{name}/%{name}-%{version}
  93. %clean
  94. %{__rm} -rf ${RPM_BUILD_ROOT}
  95. %post
  96. ghc-pkg recache
  97. %postun
  98. ghc-pkg recache
  99. %files
  100. %defattr(-, root, root)
  101. %{_bindir}/
  102. %{_libdir}/ghc-%{ghc_version}/
  103. %{_libdir}/ghc-lib/
  104. %{_docdir}/%{name}/
  105. %changelog
  106. * Fri Feb 03 2017 Toshiaki Ara <ara_t@384.jp> 0.8.21.2-1
  107. - update to 0.8.21.2
  108. - build using ghc-8.0.1
  109. * Wed May 04 2016 Toshiaki Ara <ara_t@384.jp> 0.8.16-3
  110. - rebuilt
  111. * Tue Apr 12 2016 Toshiaki Ara <ara_t@384.jp> 0.8.16-2
  112. - correct SPEC file
  113. * Tue Mar 01 2016 Toshiaki Ara <ara_t@384.jp> 0.8.16-1
  114. - new package