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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. %define pkg_name http-client-tls
  2. %define pkg_version 0.2.2
  3. %define pkg_release 3%{?_dist_release}
  4. %define ghc_version 7.10.3
  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: base64-bytestring-1.0.0.1.tar.gz
  14. Source2: blaze-builder-0.4.0.1.tar.gz
  15. Source3: byteable-0.1.1.tar.gz
  16. Source4: cereal-0.5.1.0.tar.gz
  17. Source5: cookie-0.4.1.6.tar.gz
  18. Source6: hourglass-0.2.10.tar.gz
  19. Source7: http-types-0.9.tar.gz
  20. Source8: memory-0.11.tar.gz
  21. Source9: asn1-types-0.3.2.tar.gz
  22. Source10: asn1-encoding-0.9.3.tar.gz
  23. Source11: asn1-parse-0.9.4.tar.gz
  24. Source12: cryptonite-0.13.tar.gz
  25. Source13: mime-types-0.1.0.6.tar.gz
  26. Source14: pem-0.2.2.tar.gz
  27. Source15: socks-0.5.4.tar.gz
  28. Source16: streaming-commons-0.1.15.1.tar.gz
  29. Source17: http-client-0.4.27.tar.gz
  30. Source18: x509-1.6.3.tar.gz
  31. Source19: x509-store-1.6.1.tar.gz
  32. Source20: x509-system-1.6.3.tar.gz
  33. Source21: x509-validation-1.6.3.tar.gz
  34. Source22: tls-1.3.4.tar.gz
  35. Source23: connection-0.2.5.tar.gz
  36. Source100: packages
  37. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  38. BuildRequires: ghc haskell-platform-base cabal-install
  39. BuildRequires: libffi-devel gmp-devel zlib-devel
  40. BuildRequires: libghc-data-default-class
  41. BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl
  42. BuildRequires: hscolour
  43. Requires: ghc haskell-platform-base cabal-install
  44. Requires: libghc-data-default-class
  45. Vendor: Project Vine
  46. Distribution: Vine Linux
  47. Packager: ara_t
  48. %description
  49. Haskell libraries: %{pkg_name} and dependent libraries
  50. %prep
  51. %{__rm} -rf ${RPM_BUILD_ROOT}
  52. %setup -q -n %{pkg_name}-%{version}
  53. %build
  54. # Initialise the package db
  55. ghc-pkg init %{_builddir}/package.conf
  56. PKG_CONF_DIR=${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_version}/package.conf.d
  57. %{__mkdir_p} ${PKG_CONF_DIR}
  58. # install dependent packages
  59. cd %{_builddir}
  60. for pkg in `cat %{SOURCE100}`; do
  61. %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz
  62. cd ${pkg}
  63. cabal configure \
  64. --prefix=%{_prefix} \
  65. --libdir=%{_libdir}/ghc-lib/%{pkg_name}/${pkg} \
  66. --libsubdir= \
  67. --datadir=%{_datadir}/%{pkg_name}/${pkg} \
  68. --datasubdir= \
  69. --docdir=%{_docdir}/%{pkg_name}/${pkg}
  70. cabal build
  71. cabal haddock || : # aviod Error
  72. cabal copy --destdir=${RPM_BUILD_ROOT}
  73. cabal register --inplace
  74. cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{pkg_name}_${pkg}.conf
  75. cd ..
  76. done
  77. # build
  78. cd %{_builddir}/%{pkg_name}-%{version}
  79. cabal configure \
  80. --prefix=%{_prefix} \
  81. --libdir=%{_libdir}/ghc-lib/%{pkg_name}/%{pkg_name}-%{version} \
  82. --libsubdir= \
  83. --datadir=%{_datadir}/%{pkg_name}/%{pkg_name}-%{version} \
  84. --datasubdir= \
  85. --docdir=%{_docdir}/%{pkg_name}/%{pkg_name}-%{version}
  86. cabal build
  87. cabal haddock
  88. cabal copy --destdir=${RPM_BUILD_ROOT}
  89. cabal register --inplace
  90. cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{pkg_name}-%{version}.conf
  91. %install
  92. cabal copy --destdir=${RPM_BUILD_ROOT}
  93. %{__cp} LICENSE \
  94. ${RPM_BUILD_ROOT}%{_docdir}/%{pkg_name}/%{pkg_name}-%{version}
  95. %clean
  96. %{__rm} -rf ${RPM_BUILD_ROOT}
  97. %post
  98. ghc-pkg recache
  99. %postun
  100. ghc-pkg recache
  101. %files
  102. %defattr(-, root, root)
  103. %{_libdir}/ghc-%{ghc_version}/
  104. %{_libdir}/ghc-lib/
  105. %{_datadir}/
  106. %changelog
  107. * Wed May 04 2016 Toshiaki Ara <ara_t@384.jp> 0.2.2-3
  108. - rebuilt
  109. * Tue Apr 12 2016 Toshiaki Ara <ara_t@384.jp> 0.2.2-2
  110. - correct SPEC file
  111. * Tue Mar 01 2016 Toshiaki Ara <ara_t@384.jp> 0.2.2-1
  112. - new package