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

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