yaml-vl.spec 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. %define pkg_name yaml
  2. %define pkg_version 0.8.25.1
  3. %define pkg_release 1%{?_dist_release}
  4. %define ghc_version 8.2.2
  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: mmorph-1.1.0.tar.gz
  16. Source12: semigroups-0.18.3.tar.gz
  17. Source13: transformers-base-0.4.4.tar.gz
  18. Source14: unliftio-core-0.1.1.0.tar.gz
  19. Source15: monad-control-1.0.2.2.tar.gz
  20. Source16: lifted-base-0.2.3.11.tar.gz
  21. Source17: resourcet-1.1.10.tar.gz
  22. Source18: conduit-1.2.12.1.tar.gz
  23. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  24. BuildRequires: ghc haskell-platform
  25. BuildRequires: libffi-devel gmp-devel zlib-devel
  26. BuildRequires: libghc-dlist
  27. BuildRequires: libghc-aeson
  28. BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl
  29. Requires: ghc haskell-platform
  30. Requires: libghc-dlist
  31. Requires: libghc-aeson
  32. Vendor: Project Vine
  33. Distribution: Vine Linux
  34. Packager: ara_t
  35. %description
  36. This package includes the full libyaml C library version 0.1.5
  37. by Kirill Simonov in the package so you don't need to worry
  38. about any non-Haskell dependencies.
  39. The package is broken down into two primary modules.
  40. "Data.Yaml" provides a high-level interface based around the JSON datatypes
  41. provided by the @aeson@ package.
  42. "Text.Libyaml" provides a lower-level, streaming interface.
  43. For most users, "Data.Yaml" is recommended.
  44. #'
  45. %prep
  46. %{__rm} -rf ${RPM_BUILD_ROOT}
  47. %{__rm} -rf %{_builddir}/package.conf
  48. %{__rm} -rf ${HOME}/.ghc
  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 %{SOURCE1}`; 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}/%{pkg_name}-%{version} \
  79. --libsubdir= \
  80. --datadir=%{_datadir}/%{name}/%{pkg_name}-%{version} \
  81. --datasubdir= \
  82. --docdir=%{_docdir}/%{name}/%{pkg_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}/%{pkg_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}/%{pkg_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. * Tue Jan 09 2018 Toshiaki Ara <ara_t@384.jp> 0.8.25.1-1
  106. - update to 0.8.25.1
  107. - build using ghc-8.2.2
  108. * Tue Feb 21 2017 Toshiaki Ara <ara_t@384.jp> 0.8.21.2-2
  109. - build using ghc-8.0.2
  110. * Fri Feb 03 2017 Toshiaki Ara <ara_t@384.jp> 0.8.21.2-1
  111. - update to 0.8.21.2
  112. - build using ghc-8.0.1
  113. * Wed May 04 2016 Toshiaki Ara <ara_t@384.jp> 0.8.16-3
  114. - rebuilt
  115. * Tue Apr 12 2016 Toshiaki Ara <ara_t@384.jp> 0.8.16-2
  116. - correct SPEC file
  117. * Tue Mar 01 2016 Toshiaki Ara <ara_t@384.jp> 0.8.16-1
  118. - new package