%define pkg_name build-pandoc %define pkg_version 2.0.6 %define pkg_release 1%{?_dist_release} %define ghc_version 8.2.2 Summary: Haskell libraries: %{pkg_name} and dependent libraries Name: libghc-%{pkg_name} Version: %{pkg_version} Release: %{pkg_release} License: BSD3 Group: Applications/Text URL: http://hackage.haskell.org Source0: packages # num=1; for pkg in `cat packages`; do echo "Source${num}: ${pkg}.tar.gz"; num=`expr ${num} + 1`; done Source11: Glob-0.9.1.tar.gz Source12: JuicyPixels-3.2.9.3.tar.gz Source13: SHA-1.6.4.2.tar.gz Source14: blaze-markup-0.8.0.0.tar.gz Source15: cmark-gfm-0.1.3.tar.gz Source16: cmdargs-0.10.19.tar.gz Source17: digest-0.0.1.2.tar.gz Source18: fail-4.9.0.0.tar.gz Source19: haddock-library-1.4.3.tar.gz Source20: hxt-charproperties-9.2.0.1.tar.gz Source21: old-time-1.1.0.3.tar.gz Source22: pandoc-types-1.17.3.tar.gz Source23: regex-pcre-builtin-0.94.4.8.8.35.tar.gz Source24: safe-0.3.15.tar.gz Source25: tagsoup-0.14.2.tar.gz Source26: temporary-1.2.1.1.tar.gz Source27: utf8-string-1.0.1.1.tar.gz Source28: xml-1.3.14.tar.gz Source29: blaze-html-0.9.0.1.tar.gz Source30: aeson-pretty-0.8.5.tar.gz Source31: hslua-0.9.5.tar.gz Source32: hxt-unicode-9.0.2.4.tar.gz Source33: hxt-regex-xmlschema-9.2.0.3.tar.gz Source34: zip-archive-0.3.1.1.tar.gz Source35: texmath-0.10.1.tar.gz Source36: doctemplates-0.2.1.tar.gz Source37: hslua-module-text-0.1.2.1.tar.gz Source38: hxt-9.3.1.16.tar.gz Source39: skylighting-0.5.0.1.tar.gz # to fix wrong dependencies in cabal files # do not use '-' %define oldtime_version 1.1.0.3 %define utf8string_version 1.0.1.1 Source101: old-time.cabal Source102: utf8-string.cabal BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: ghc haskell-platform BuildRequires: libffi-devel gmp-devel zlib-devel BuildRequires: libghc-data-default-class BuildRequires: libghc-dlist BuildRequires: libghc-data-default BuildRequires: libghc-aeson BuildRequires: libghc-http-client-tls BuildRequires: yaml BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl Requires: ghc haskell-platform Requires: libghc-data-default-class Requires: libghc-dlist Requires: libghc-data-default Requires: libghc-aeson Requires: libghc-http-client-tls Requires: yaml Vendor: Project Vine Distribution: Vine Linux Packager: ara_t %description Haskell libraries: %{pkg_name} %prep %{__rm} -rf ${RPM_BUILD_ROOT} %{__rm} -rf %{_builddir}/package.conf %{__rm} -rf ${HOME}/.ghc %setup -q -T -c %{name}-%{version} %build # Initialise the package db ghc-pkg init %{_builddir}/package.conf PKG_CONF_DIR=${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_version}/package.conf.d %{__rm} -rf ${PKG_CONF_DIR} %{__mkdir_p} ${PKG_CONF_DIR} cd %{_builddir} for pkg in `cat %{SOURCE0}`; do %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz cd ${pkg} # fix wrong dependencies case ${pkg} in "old-time-%{oldtime_version}") %{__cp} %{SOURCE101} . ;; "utf8-string-%{utf8string_version}") %{__cp} %{SOURCE102} . ;; *) ;; esac cabal configure \ --prefix=%{_prefix} \ --libdir=%{_libdir}/ghc-lib/%{name}/${pkg} \ --libsubdir= \ --datadir=%{_datadir}/%{name}/${pkg} \ --datasubdir= \ --docdir=%{_docdir}/%{name}/${pkg} cabal build cabal haddock || : # aviod Error cabal copy --destdir=${RPM_BUILD_ROOT} cabal register --inplace cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{name}_${pkg}.conf cd .. done %clean %{__rm} -rf ${RPM_BUILD_ROOT} %post ghc-pkg recache %postun ghc-pkg recache %files %defattr(-, root, root) %{_bindir}/ %{_libdir}/ghc-%{ghc_version}/ %{_libdir}/ghc-lib/ %{_datadir}/%{name}/ %{_docdir}/%{name}/ %changelog * Tue Jan 09 2018 Toshiaki Ara 2.0.6-1 - update to 2.0.6 - build using ghc-8.2.2 * Tue Feb 21 2017 Toshiaki Ara 1.19.2.1-1 - update to 1.19.2.1 - build using ghc-8.0.2 * Fri Feb 03 2017 Toshiaki Ara 1.17.1-1 - update to 1.17.1 - build using ghc-8.0.1 * Fri May 06 2016 Toshiaki Ara 1.17.0.3-1 - new package