libghc-build-pandoc-vl.spec 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. %define pkg_name build-pandoc
  2. %define pkg_version 1.17.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 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.tar.gz
  19. Source2: SHA-1.6.4.2.tar.gz
  20. Source3: blaze-markup-0.7.1.1.tar.gz
  21. Source4: blaze-html-0.8.1.3.tar.gz
  22. Source5: cmark-0.5.5.tar.gz
  23. Source6: digest-0.0.1.2.tar.gz
  24. Source7: extensible-exceptions-0.1.1.4.tar.gz
  25. Source8: haddock-library-1.4.2.tar.gz
  26. Source9: hslua-0.4.1.tar.gz
  27. Source10: old-time-1.1.0.3.tar.gz
  28. Source11: pandoc-types-1.16.1.1.tar.gz
  29. Source12: regex-pcre-builtin-0.94.4.8.8.35.tar.gz
  30. Source13: tagsoup-0.14.tar.gz
  31. Source14: temporary-1.2.0.4.tar.gz
  32. Source15: unix-compat-0.4.3.1.tar.gz
  33. Source16: filemanip-0.3.6.3.tar.gz
  34. Source17: utf8-string-1.0.1.1.tar.gz
  35. Source18: highlighting-kate-0.6.4.tar.gz
  36. Source19: xml-1.3.14.tar.gz
  37. Source20: texmath-0.8.6.7.tar.gz
  38. Source21: zip-archive-0.3.0.5.tar.gz
  39. # to fix wrong dependencies in cabal files
  40. Source101: old-time.cabal
  41. Source102: utf8-string.cabal
  42. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  43. BuildRequires: ghc haskell-platform
  44. BuildRequires: libffi-devel gmp-devel zlib-devel
  45. BuildRequires: libghc-data-default-class
  46. BuildRequires: libghc-dlist
  47. BuildRequires: libghc-data-default
  48. BuildRequires: libghc-aeson
  49. BuildRequires: libghc-http-client-tls
  50. BuildRequires: yaml
  51. BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl
  52. Requires: ghc haskell-platform
  53. Requires: libghc-data-default-class
  54. Requires: libghc-dlist
  55. Requires: libghc-data-default
  56. Requires: libghc-aeson
  57. Requires: libghc-http-client-tls
  58. Requires: yaml
  59. Vendor: Project Vine
  60. Distribution: Vine Linux
  61. Packager: ara_t
  62. %description
  63. Haskell libraries: %{pkg_name}
  64. %prep
  65. %{__rm} -rf ${RPM_BUILD_ROOT}
  66. %{__rm} -rf %{_builddir}/package.conf
  67. %{__rm} -rf ${HOME}/.ghc
  68. %setup -q -T -c %{name}-%{version}
  69. %build
  70. # Initialise the package db
  71. ghc-pkg init %{_builddir}/package.conf
  72. PKG_CONF_DIR=${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_version}/package.conf.d
  73. %{__rm} -rf ${PKG_CONF_DIR}
  74. %{__mkdir_p} ${PKG_CONF_DIR}
  75. cd %{_builddir}
  76. for pkg in `cat %{SOURCE0}`; do
  77. %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz
  78. cd ${pkg}
  79. # fix wrong dependencies
  80. case ${pkg} in
  81. "old-time-%{oldtime_version}") %{__cp} %{SOURCE101} . ;;
  82. "utf8-string-%{utf8string_version}") %{__cp} %{SOURCE102} . ;;
  83. *) ;;
  84. esac
  85. cabal configure \
  86. --prefix=%{_prefix} \
  87. --libdir=%{_libdir}/ghc-lib/%{name}/${pkg} \
  88. --libsubdir= \
  89. --datadir=%{_datadir}/%{name}/${pkg} \
  90. --datasubdir= \
  91. --docdir=%{_docdir}/%{name}/${pkg}
  92. cabal build
  93. cabal haddock || : # aviod Error
  94. cabal copy --destdir=${RPM_BUILD_ROOT}
  95. cabal register --inplace
  96. cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{pkg_name}_${pkg}.conf
  97. cd ..
  98. done
  99. %clean
  100. %{__rm} -rf ${RPM_BUILD_ROOT}
  101. %post
  102. ghc-pkg recache
  103. %postun
  104. ghc-pkg recache
  105. %files
  106. %defattr(-, root, root)
  107. %{_libdir}/ghc-%{ghc_version}/
  108. %{_libdir}/ghc-lib/
  109. %{_docdir}/%{name}
  110. %changelog
  111. * Fri Feb 03 2017 Toshiaki Ara <ara_t@384.jp> 1.17.1-1
  112. - update to 1.17.1
  113. - build using ghc-8.0.1
  114. * Fri May 06 2016 Toshiaki Ara <ara_t@384.jp> 1.17.0.3-1
  115. - new package