libghc-http-client-tls-vl.spec 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. %define pkg_name http-client-tls
  2. %define pkg_version 0.3.5.1
  3. %define pkg_release 1%{?_dist_release}
  4. %define ghc_version 8.2.2
  5. Summary: Haskell libraries: %{pkg_name} and dependent libraries
  6. Name: libghc-%{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: %{pkg_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: base64-bytestring-1.0.0.1.tar.gz
  16. Source12: basement-0.0.4.tar.gz
  17. Source13: blaze-builder-0.4.0.2.tar.gz
  18. Source14: byteable-0.1.1.tar.gz
  19. Source15: cereal-0.5.4.0.tar.gz
  20. Source16: exceptions-0.8.3.tar.gz
  21. Source17: hourglass-0.2.10.tar.gz
  22. Source18: http-types-0.11.tar.gz
  23. Source19: mime-types-0.1.0.7.tar.gz
  24. Source20: pem-0.2.2.tar.gz
  25. Source21: foundation-0.0.17.tar.gz
  26. Source22: streaming-commons-0.1.18.tar.gz
  27. Source23: cookie-0.4.3.tar.gz
  28. Source24: socks-0.5.6.tar.gz
  29. Source25: memory-0.14.11.tar.gz
  30. Source26: http-client-0.5.7.1.tar.gz
  31. Source27: cryptonite-0.24.tar.gz
  32. Source28: asn1-types-0.3.2.tar.gz
  33. Source29: asn1-encoding-0.9.5.tar.gz
  34. Source30: asn1-parse-0.9.4.tar.gz
  35. Source31: x509-1.7.2.tar.gz
  36. Source32: x509-store-1.6.5.tar.gz
  37. Source33: x509-validation-1.6.9.tar.gz
  38. Source34: x509-system-1.6.6.tar.gz
  39. Source35: tls-1.4.0.tar.gz
  40. Source36: connection-0.2.8.tar.gz
  41. # to fix wrong dependencies in cabal files
  42. # do not use '-'
  43. %define exceptions_version 0.8.3
  44. Source51: exceptions.cabal
  45. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  46. BuildRequires: ghc haskell-platform
  47. BuildRequires: libffi-devel gmp-devel zlib-devel
  48. BuildRequires: libghc-dlist
  49. BuildRequires: libghc-data-default
  50. BuildRequires: libghc-aeson
  51. BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl
  52. Requires: ghc haskell-platform
  53. Requires: libghc-dlist
  54. Requires: libghc-data-default
  55. Requires: libghc-aeson
  56. Vendor: Project Vine
  57. Distribution: Vine Linux
  58. Packager: ara_t
  59. %description
  60. Haskell libraries: %{pkg_name} and dependent libraries
  61. %prep
  62. %{__rm} -rf ${RPM_BUILD_ROOT}
  63. %{__rm} -rf %{_builddir}/package.conf
  64. %{__rm} -rf ${HOME}/.ghc
  65. %setup -q -n %{pkg_name}-%{version}
  66. %build
  67. # Initialise the package db
  68. ghc-pkg init %{_builddir}/package.conf
  69. PKG_CONF_DIR=${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_version}/package.conf.d
  70. %{__mkdir_p} ${PKG_CONF_DIR}
  71. # install dependent packages
  72. cd %{_builddir}
  73. for pkg in `cat %{SOURCE1}`; do
  74. %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz
  75. cd ${pkg}
  76. # fix wrong dependencies
  77. case ${pkg} in
  78. "exceptions-%{exceptions_version}") %{__cp} %{SOURCE51} . ;;
  79. *) ;;
  80. esac
  81. cabal configure \
  82. --prefix=%{_prefix} \
  83. --libdir=%{_libdir}/ghc-lib/%{name}/${pkg} \
  84. --libsubdir= \
  85. --datadir=%{_datadir}/%{name}/${pkg} \
  86. --datasubdir= \
  87. --docdir=%{_docdir}/%{name}/${pkg}
  88. cabal build
  89. cabal haddock || : # aviod Error
  90. cabal copy --destdir=${RPM_BUILD_ROOT}
  91. cabal register --inplace
  92. cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{name}_${pkg}.conf
  93. cd ..
  94. done
  95. # build
  96. cd %{_builddir}/%{pkg_name}-%{version}
  97. cabal configure \
  98. --prefix=%{_prefix} \
  99. --libdir=%{_libdir}/ghc-lib/%{name}/%{pkg_name}-%{version} \
  100. --libsubdir= \
  101. --datadir=%{_datadir}/%{name}/%{pkg_name}-%{version} \
  102. --datasubdir= \
  103. --docdir=%{_docdir}/%{name}/%{pkg_name}-%{version}
  104. cabal build
  105. cabal haddock
  106. cabal copy --destdir=${RPM_BUILD_ROOT}
  107. cabal register --inplace
  108. cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{pkg_name}-%{version}.conf
  109. %install
  110. cabal copy --destdir=${RPM_BUILD_ROOT}
  111. %{__cp} LICENSE \
  112. ${RPM_BUILD_ROOT}%{_docdir}/%{name}/%{pkg_name}-%{version}
  113. %clean
  114. %{__rm} -rf ${RPM_BUILD_ROOT}
  115. %post
  116. ghc-pkg recache
  117. %postun
  118. ghc-pkg recache
  119. %files
  120. %defattr(-, root, root)
  121. %{_libdir}/ghc-%{ghc_version}/
  122. %{_libdir}/ghc-lib/
  123. %{_datadir}/
  124. %changelog
  125. * Tue Jan 09 2018 Toshiaki Ara <ara_t@384.jp> 0.3.5.1-1
  126. - update to 0.3.5.1
  127. - build using ghc-8.2.2
  128. * Tue Feb 21 2017 Toshiaki Ara <ara_t@384.jp> 0.3.3.1-1
  129. - update to 0.3.3.1
  130. - build using ghc-8.0.2
  131. * Fri Feb 03 2017 Toshiaki Ara <ara_t@384.jp> 0.2.4.1-1
  132. - update to 0.2.4.1
  133. - build using ghc-8.0.1
  134. * Wed May 04 2016 Toshiaki Ara <ara_t@384.jp> 0.2.2-3
  135. - rebuilt
  136. * Tue Apr 12 2016 Toshiaki Ara <ara_t@384.jp> 0.2.2-2
  137. - correct SPEC file
  138. * Tue Mar 01 2016 Toshiaki Ara <ara_t@384.jp> 0.2.2-1
  139. - new package