libghc-build-pandoc-vl.spec 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. %define pkg_name build-pandoc
  2. %define pkg_version 2.0.6
  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: packages
  13. # num=1; for pkg in `cat packages`; do echo "Source${num}: ${pkg}.tar.gz"; num=`expr ${num} + 1`; done
  14. Source11: Glob-0.9.1.tar.gz
  15. Source12: JuicyPixels-3.2.9.3.tar.gz
  16. Source13: SHA-1.6.4.2.tar.gz
  17. Source14: blaze-markup-0.8.0.0.tar.gz
  18. Source15: cmark-gfm-0.1.3.tar.gz
  19. Source16: cmdargs-0.10.19.tar.gz
  20. Source17: digest-0.0.1.2.tar.gz
  21. Source18: fail-4.9.0.0.tar.gz
  22. Source19: haddock-library-1.4.3.tar.gz
  23. Source20: hxt-charproperties-9.2.0.1.tar.gz
  24. Source21: old-time-1.1.0.3.tar.gz
  25. Source22: pandoc-types-1.17.3.tar.gz
  26. Source23: regex-pcre-builtin-0.94.4.8.8.35.tar.gz
  27. Source24: safe-0.3.15.tar.gz
  28. Source25: tagsoup-0.14.2.tar.gz
  29. Source26: temporary-1.2.1.1.tar.gz
  30. Source27: utf8-string-1.0.1.1.tar.gz
  31. Source28: xml-1.3.14.tar.gz
  32. Source29: blaze-html-0.9.0.1.tar.gz
  33. Source30: aeson-pretty-0.8.5.tar.gz
  34. Source31: hslua-0.9.5.tar.gz
  35. Source32: hxt-unicode-9.0.2.4.tar.gz
  36. Source33: hxt-regex-xmlschema-9.2.0.3.tar.gz
  37. Source34: zip-archive-0.3.1.1.tar.gz
  38. Source35: texmath-0.10.1.tar.gz
  39. Source36: doctemplates-0.2.1.tar.gz
  40. Source37: hslua-module-text-0.1.2.1.tar.gz
  41. Source38: hxt-9.3.1.16.tar.gz
  42. Source39: skylighting-0.5.0.1.tar.gz
  43. # to fix wrong dependencies in cabal files
  44. # do not use '-'
  45. %define oldtime_version 1.1.0.3
  46. %define utf8string_version 1.0.1.1
  47. Source101: old-time.cabal
  48. Source102: utf8-string.cabal
  49. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  50. BuildRequires: ghc haskell-platform
  51. BuildRequires: libffi-devel gmp-devel zlib-devel
  52. BuildRequires: libghc-data-default-class
  53. BuildRequires: libghc-dlist
  54. BuildRequires: libghc-data-default
  55. BuildRequires: libghc-aeson
  56. BuildRequires: libghc-http-client-tls
  57. BuildRequires: yaml
  58. BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl
  59. Requires: ghc haskell-platform
  60. Requires: libghc-data-default-class
  61. Requires: libghc-dlist
  62. Requires: libghc-data-default
  63. Requires: libghc-aeson
  64. Requires: libghc-http-client-tls
  65. Requires: yaml
  66. Vendor: Project Vine
  67. Distribution: Vine Linux
  68. Packager: ara_t
  69. %description
  70. Haskell libraries: %{pkg_name}
  71. %prep
  72. %{__rm} -rf ${RPM_BUILD_ROOT}
  73. %{__rm} -rf %{_builddir}/package.conf
  74. %{__rm} -rf ${HOME}/.ghc
  75. %setup -q -T -c %{name}-%{version}
  76. %build
  77. # Initialise the package db
  78. ghc-pkg init %{_builddir}/package.conf
  79. PKG_CONF_DIR=${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_version}/package.conf.d
  80. %{__rm} -rf ${PKG_CONF_DIR}
  81. %{__mkdir_p} ${PKG_CONF_DIR}
  82. cd %{_builddir}
  83. for pkg in `cat %{SOURCE0}`; do
  84. %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz
  85. cd ${pkg}
  86. # fix wrong dependencies
  87. case ${pkg} in
  88. "old-time-%{oldtime_version}") %{__cp} %{SOURCE101} . ;;
  89. "utf8-string-%{utf8string_version}") %{__cp} %{SOURCE102} . ;;
  90. *) ;;
  91. esac
  92. cabal configure \
  93. --prefix=%{_prefix} \
  94. --libdir=%{_libdir}/ghc-lib/%{name}/${pkg} \
  95. --libsubdir= \
  96. --datadir=%{_datadir}/%{name}/${pkg} \
  97. --datasubdir= \
  98. --docdir=%{_docdir}/%{name}/${pkg}
  99. cabal build
  100. cabal haddock || : # aviod Error
  101. cabal copy --destdir=${RPM_BUILD_ROOT}
  102. cabal register --inplace
  103. cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{name}_${pkg}.conf
  104. cd ..
  105. done
  106. %clean
  107. %{__rm} -rf ${RPM_BUILD_ROOT}
  108. %post
  109. ghc-pkg recache
  110. %postun
  111. ghc-pkg recache
  112. %files
  113. %defattr(-, root, root)
  114. %{_bindir}/
  115. %{_libdir}/ghc-%{ghc_version}/
  116. %{_libdir}/ghc-lib/
  117. %{_datadir}/%{name}/
  118. %{_docdir}/%{name}/
  119. %changelog
  120. * Tue Jan 09 2018 Toshiaki Ara <ara_t@384.jp> 2.0.6-1
  121. - update to 2.0.6
  122. - build using ghc-8.2.2
  123. * Tue Feb 21 2017 Toshiaki Ara <ara_t@384.jp> 1.19.2.1-1
  124. - update to 1.19.2.1
  125. - build using ghc-8.0.2
  126. * Fri Feb 03 2017 Toshiaki Ara <ara_t@384.jp> 1.17.1-1
  127. - update to 1.17.1
  128. - build using ghc-8.0.1
  129. * Fri May 06 2016 Toshiaki Ara <ara_t@384.jp> 1.17.0.3-1
  130. - new package