libghc-aeson-vl.spec 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. %define pkg_name aeson
  2. %define pkg_version 1.2.3.0
  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: %{pkg_name}-%{version}.tar.gz
  13. Source1: packages
  14. # num=11; for pkg in `cat packages`; do echo "Source${num}: ${pkg}.tar.gz"; num=`expr ${num} + 1`; done
  15. Source11: base-compat-0.9.3.tar.gz
  16. Source12: th-abstraction-0.2.6.0.tar.gz
  17. Source13: time-locale-compat-0.1.1.3.tar.gz
  18. Source14: transformers-compat-0.5.1.4.tar.gz
  19. Source15: uuid-types-1.0.3.tar.gz
  20. Source16: tagged-0.8.5.tar.gz
  21. # to fix wrong dependencies in cabal files
  22. # do not use '-'
  23. %define tagged_version 0.8.5
  24. Source51: tagged.cabal
  25. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  26. BuildRequires: ghc haskell-platform
  27. BuildRequires: libffi-devel gmp-devel zlib-devel
  28. BuildRequires: libghc-dlist
  29. BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl
  30. Requires: ghc haskell-platform
  31. Requires: libghc-dlist
  32. Vendor: Project Vine
  33. Distribution: Vine Linux
  34. Packager: ara_t
  35. %description
  36. Haskell libraries: %{pkg_name}
  37. %prep
  38. %{__rm} -rf ${RPM_BUILD_ROOT}
  39. %{__rm} -rf %{_builddir}/package.conf
  40. %{__rm} -rf ${HOME}/.ghc
  41. %setup -q -n %{pkg_name}-%{version}
  42. %build
  43. # Initialise the package db
  44. ghc-pkg init %{_builddir}/package.conf
  45. PKG_CONF_DIR=${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_version}/package.conf.d
  46. %{__mkdir_p} ${PKG_CONF_DIR}
  47. # install dependent packages
  48. cd %{_builddir}
  49. for pkg in `cat %{SOURCE1}`; do
  50. %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz
  51. cd ${pkg}
  52. # fix wrong dependencies
  53. case ${pkg} in
  54. "tagged-%{tagged_version}") %{__cp} %{SOURCE51} . ;;
  55. *) ;;
  56. esac
  57. cabal configure \
  58. --prefix=%{_prefix} \
  59. --libdir=%{_libdir}/ghc-lib/%{name}/${pkg} \
  60. --libsubdir= \
  61. --datadir=%{_datadir}/%{name}/${pkg} \
  62. --datasubdir= \
  63. --docdir=%{_docdir}/%{name}/${pkg}
  64. cabal build
  65. cabal haddock || : # avoid Error
  66. cabal copy --destdir=${RPM_BUILD_ROOT}
  67. cabal register --inplace
  68. cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{name}_${pkg}.conf
  69. cd ..
  70. done
  71. # build
  72. cd %{_builddir}/%{pkg_name}-%{version}
  73. cabal configure \
  74. --prefix=%{_prefix} \
  75. --libdir=%{_libdir}/ghc-lib/%{name}/%{pkg_name}-%{version} \
  76. --libsubdir= \
  77. --datadir=%{_datadir}/%{name}/%{pkg_name}-%{version} \
  78. --datasubdir= \
  79. --docdir=%{_docdir}/%{name}/%{pkg_name}-%{version}
  80. cabal build
  81. cabal haddock
  82. cabal copy --destdir=${RPM_BUILD_ROOT}
  83. cabal register --inplace
  84. cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{pkg_name}-%{version}.conf
  85. %install
  86. cabal copy --destdir=${RPM_BUILD_ROOT}
  87. %{__cp} changelog.md LICENSE README.markdown \
  88. ${RPM_BUILD_ROOT}%{_docdir}/%{name}/%{pkg_name}-%{version}
  89. %clean
  90. %{__rm} -rf ${RPM_BUILD_ROOT}
  91. %post
  92. ghc-pkg recache
  93. %postun
  94. ghc-pkg recache
  95. %files
  96. %defattr(-, root, root)
  97. %{_libdir}/ghc-%{ghc_version}/
  98. %{_libdir}/ghc-lib/
  99. %{_datadir}/
  100. %changelog
  101. * Tue Jan 09 2018 Toshiaki Ara <ara_t@384.jp> 1.2.3.0-1
  102. - update to 1.2.3.0
  103. - build using ghc-8.2.2
  104. * Fri Feb 03 2017 Toshiaki Ara <ara_t@384.jp> 0.11.3.0-1
  105. - update to 0.11.3.0
  106. - build using ghc-8.0.1
  107. * Wed May 04 2016 Toshiaki Ara <ara_t@384.jp> 0.9.0.1-3
  108. - rebuilt
  109. * Tue Apr 12 2016 Toshiaki Ara <ara_t@384.jp> 0.9.0.1-2
  110. - correct SPEC file
  111. * Tue Mar 01 2016 Toshiaki Ara <ara_t@384.jp> 0.9.0.1-1
  112. - new package