libghc-build-pandoc-vl.spec 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. %define pkg_name build-pandoc
  2. %define pkg_version 1.19.2.4
  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 oldtime_version 1.1.0.3
  8. %define utf8string_version 1.0.1.1
  9. Summary: Haskell libraries: %{pkg_name} and dependent libraries
  10. Name: libghc-%{pkg_name}
  11. Version: %{pkg_version}
  12. Release: %{pkg_release}
  13. License: BSD3
  14. Group: Applications/Text
  15. URL: http://hackage.haskell.org
  16. Source0: packages
  17. # num=1; for pkg in `cat packages`; do echo "Source${num}: ${pkg}.tar.gz"; num=`expr ${num} + 1`; done
  18. Source1: JuicyPixels-3.2.8.3.tar.gz
  19. Source2: SHA-1.6.4.2.tar.gz
  20. Source3: blaze-markup-0.8.0.0.tar.gz
  21. Source4: blaze-html-0.9.0.1.tar.gz
  22. Source5: cmark-0.5.6.tar.gz
  23. Source6: digest-0.0.1.2.tar.gz
  24. Source7: doctemplates-0.1.0.2.tar.gz
  25. Source8: extensible-exceptions-0.1.1.4.tar.gz
  26. Source9: haddock-library-1.4.3.tar.gz
  27. Source10: hslua-0.4.1.tar.gz
  28. Source11: hxt-charproperties-9.2.0.1.tar.gz
  29. Source12: hxt-regex-xmlschema-9.2.0.3.tar.gz
  30. Source13: hxt-unicode-9.0.2.4.tar.gz
  31. Source14: hxt-9.3.1.16.tar.gz
  32. Source15: old-time-1.1.0.3.tar.gz
  33. Source16: pandoc-types-1.17.0.5.tar.gz
  34. Source17: regex-pcre-builtin-0.94.4.8.8.35.tar.gz
  35. Source18: safe-0.3.15.tar.gz
  36. Source19: tagsoup-0.14.1.tar.gz
  37. Source20: temporary-1.2.1.1.tar.gz
  38. Source21: unix-compat-0.4.3.1.tar.gz
  39. Source22: filemanip-0.3.6.3.tar.gz
  40. Source23: utf8-string-1.0.1.1.tar.gz
  41. Source24: skylighting-0.1.1.5.tar.gz
  42. Source25: xml-1.3.14.tar.gz
  43. Source26: texmath-0.9.4.4.tar.gz
  44. Source27: zip-archive-0.3.1.1.tar.gz
  45. # to fix wrong dependencies in cabal files
  46. Source101: old-time.cabal
  47. Source102: utf8-string.cabal
  48. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  49. BuildRequires: ghc haskell-platform
  50. BuildRequires: libffi-devel gmp-devel zlib-devel
  51. BuildRequires: libghc-data-default-class
  52. BuildRequires: libghc-dlist
  53. BuildRequires: libghc-data-default
  54. BuildRequires: libghc-aeson
  55. BuildRequires: libghc-http-client-tls
  56. BuildRequires: yaml
  57. BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl
  58. Requires: ghc haskell-platform
  59. Requires: libghc-data-default-class
  60. Requires: libghc-dlist
  61. Requires: libghc-data-default
  62. Requires: libghc-aeson
  63. Requires: libghc-http-client-tls
  64. Requires: yaml
  65. Vendor: Project Vine
  66. Distribution: Vine Linux
  67. Packager: ara_t
  68. %description
  69. Haskell libraries: %{pkg_name}
  70. %prep
  71. %{__rm} -rf ${RPM_BUILD_ROOT}
  72. %{__rm} -rf %{_builddir}/package.conf
  73. %{__rm} -rf ${HOME}/.ghc
  74. %setup -q -T -c %{name}-%{version}
  75. %build
  76. # Initialise the package db
  77. ghc-pkg init %{_builddir}/package.conf
  78. PKG_CONF_DIR=${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_version}/package.conf.d
  79. %{__rm} -rf ${PKG_CONF_DIR}
  80. %{__mkdir_p} ${PKG_CONF_DIR}
  81. cd %{_builddir}
  82. for pkg in `cat %{SOURCE0}`; do
  83. %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz
  84. cd ${pkg}
  85. # fix wrong dependencies
  86. case ${pkg} in
  87. "old-time-%{oldtime_version}") %{__cp} %{SOURCE101} . ;;
  88. "utf8-string-%{utf8string_version}") %{__cp} %{SOURCE102} . ;;
  89. *) ;;
  90. esac
  91. cabal configure \
  92. --prefix=%{_prefix} \
  93. --libdir=%{_libdir}/ghc-lib/%{name}/${pkg} \
  94. --libsubdir= \
  95. --datadir=%{_datadir}/%{name}/${pkg} \
  96. --datasubdir= \
  97. --docdir=%{_docdir}/%{name}/${pkg}
  98. cabal build
  99. cabal haddock || : # aviod Error
  100. cabal copy --destdir=${RPM_BUILD_ROOT}
  101. cabal register --inplace
  102. cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{pkg_name}_${pkg}.conf
  103. cd ..
  104. done
  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. %{_docdir}/%{name}
  116. %changelog
  117. * Sun Oct 29 2017 Toshiaki Ara <ara_t@384.jp> 1.19.2.4-1
  118. - update to 1.19.2.4
  119. * Fri Feb 03 2017 Toshiaki Ara <ara_t@384.jp> 1.17.1-1
  120. - update to 1.17.1
  121. - build using ghc-8.0.1
  122. * Fri May 06 2016 Toshiaki Ara <ara_t@384.jp> 1.17.0.3-1
  123. - new package