libghc-data-default-vl.spec 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. %define pkg_name data-default
  2. %define pkg_version 0.5.3
  3. %define pkg_release 3%{?_dist_release}
  4. %define ghc_version 7.10.3
  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: data-default-instances-base-0.0.1.tar.gz
  14. Source2: data-default-instances-containers-0.0.1.tar.gz
  15. Source3: data-default-instances-old-locale-0.0.1.tar.gz
  16. Source4: data-default-instances-dlist-0.0.1.tar.gz
  17. Source100: packages
  18. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  19. BuildRequires: ghc haskell-platform-base cabal-install
  20. BuildRequires: libffi-devel gmp-devel zlib-devel
  21. BuildRequires: libghc-data-default-class
  22. BuildRequires: libghc-dlist
  23. BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl
  24. BuildRequires: hscolour
  25. Requires: ghc haskell-platform-base cabal-install
  26. Requires: libghc-data-default-class
  27. Requires: libghc-dlist
  28. Vendor: Project Vine
  29. Distribution: Vine Linux
  30. Packager: ara_t
  31. %description
  32. Haskell libraries: %{pkg_name} and dependent libraries
  33. %prep
  34. %{__rm} -rf ${RPM_BUILD_ROOT}
  35. %setup -q -n %{pkg_name}-%{version}
  36. %build
  37. # Initialise the package db
  38. ghc-pkg init %{_builddir}/package.conf
  39. PKG_CONF_DIR=${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_version}/package.conf.d
  40. %{__mkdir_p} ${PKG_CONF_DIR}
  41. # install dependent packages
  42. cd %{_builddir}
  43. for pkg in `cat %{SOURCE100}`; do
  44. %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz
  45. cd ${pkg}
  46. cabal configure \
  47. --prefix=%{_prefix} \
  48. --libdir=%{_libdir}/ghc-lib/%{name}/${pkg} \
  49. --libsubdir= \
  50. --datadir=%{_datadir}/%{name}/${pkg} \
  51. --datasubdir= \
  52. --docdir=%{_docdir}/%{name}/${pkg}
  53. cabal build
  54. cabal haddock || : # aviod Error
  55. cabal copy --destdir=${RPM_BUILD_ROOT}
  56. cabal register --inplace
  57. cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{pkg_name}_${pkg}.conf
  58. cd ..
  59. done
  60. # build
  61. cd %{_builddir}/%{pkg_name}-%{version}
  62. cabal configure \
  63. --prefix=%{_prefix} \
  64. --libdir=%{_libdir}/ghc-lib/%{name}/%{pkg_name}-%{version} \
  65. --libsubdir= \
  66. --datadir=%{_datadir}/%{pkg_name}/%{pkg_name}-%{version} \
  67. --datasubdir= \
  68. --docdir=%{_docdir}/%{pkg_name}/%{pkg_name}-%{version}
  69. cabal build
  70. cabal haddock
  71. cabal copy --destdir=${RPM_BUILD_ROOT}
  72. cabal register --inplace
  73. cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{pkg_name}-%{version}.conf
  74. %install
  75. cabal copy --destdir=${RPM_BUILD_ROOT}
  76. %{__cp} LICENSE \
  77. ${RPM_BUILD_ROOT}%{_docdir}/%{pkg_name}/%{pkg_name}-%{version}
  78. %clean
  79. %{__rm} -rf ${RPM_BUILD_ROOT}
  80. %post
  81. ghc-pkg recache
  82. %postun
  83. ghc-pkg recache
  84. %files
  85. %defattr(-, root, root)
  86. %{_libdir}/ghc-%{ghc_version}/
  87. %{_libdir}/ghc-lib/
  88. %{_datadir}/
  89. %changelog
  90. * Wed May 04 2016 Toshiaki Ara <ara_t@384.jp> 0.5.3-3
  91. - rebuilt
  92. * Tue Apr 12 2016 Toshiaki Ara <ara_t@384.jp> 0.5.3-2
  93. - correct SPEC file
  94. * Tue Mar 01 2016 Toshiaki Ara <ara_t@384.jp> 0.5.3-1
  95. - new package