libghc-dlist-vl.spec 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. %define pkg_name dlist
  2. %define pkg_version 0.8.0.2
  3. %define pkg_release 1%{?_dist_release}
  4. %define ghc_version 8.0.1
  5. Summary: Haskell libraries: %{pkg_name}
  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. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  14. BuildRequires: ghc haskell-platform
  15. BuildRequires: libffi-devel gmp-devel zlib-devel
  16. BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl
  17. Requires: ghc haskell-platform
  18. Vendor: Project Vine
  19. Distribution: Vine Linux
  20. Packager: ara_t
  21. %description
  22. Haskell libraries: %{pkg_name}-%{version}
  23. %prep
  24. %{__rm} -rf ${RPM_BUILD_ROOT}
  25. %{__rm} -rf %{_builddir}/package.conf
  26. %{__rm} -rf ${HOME}/.ghc
  27. %setup -q -n %{pkg_name}-%{version}
  28. %build
  29. # Initialise the package db
  30. ghc-pkg init %{_builddir}/package.conf
  31. PKG_CONF_DIR=${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_version}/package.conf.d
  32. %{__rm} -rf ${PKG_CONF_DIR}
  33. %{__mkdir_p} ${PKG_CONF_DIR}
  34. cabal configure \
  35. --prefix=%{_prefix} \
  36. --libdir=%{_libdir}/ghc-lib/%{pkg_name}-%{version} \
  37. --libsubdir= \
  38. --datadir=%{_datadir}/%{pkg_name}-%{version} \
  39. --datasubdir= \
  40. --docdir=%{_docdir}/%{pkg_name}-%{version}
  41. cabal build
  42. cabal haddock || : # avoid Error
  43. cabal copy --destdir=${RPM_BUILD_ROOT}
  44. cabal register --inplace
  45. cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{pkg_name}-%{version}.conf
  46. %install
  47. cabal copy --destdir=${RPM_BUILD_ROOT}
  48. %{__cp} LICENSE \
  49. ${RPM_BUILD_ROOT}%{_docdir}/%{pkg_name}-%{version}
  50. %clean
  51. %{__rm} -rf ${RPM_BUILD_ROOT}
  52. %post
  53. ghc-pkg recache
  54. %postun
  55. ghc-pkg recache
  56. %files
  57. %defattr(-, root, root)
  58. %{_libdir}/ghc-%{ghc_version}/
  59. %{_libdir}/ghc-lib/
  60. %{_datadir}/
  61. %changelog
  62. * Fri Feb 03 2017 Toshiaki Ara <ara_t@384.jp> 0.8.0.2-1
  63. - update to 0.1.2.0
  64. - build using ghc-8.0.1
  65. * Wed May 04 2016 Toshiaki Ara <ara_t@384.jp> 0.7.1.2-3
  66. - rebuilt
  67. * Tue Apr 12 2016 Toshiaki Ara <ara_t@384.jp> 0.7.1.2-2
  68. - correct SPEC file
  69. * Tue Mar 01 2016 Toshiaki Ara <ara_t@384.jp> 0.7.1.2-1
  70. - new package