123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- %define pkg_name build-pandoc
- %define pkg_version 1.17.1
- %define pkg_release 1%{?_dist_release}
- %define ghc_version 8.0.1
- # to fix wrong dependencies in cabal files
- # do not use '-'
- %define oldtime_version 1.1.0.3
- %define utf8string_version 1.0.1.1
- 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
- Source1: JuicyPixels-3.2.8.tar.gz
- Source2: SHA-1.6.4.2.tar.gz
- Source3: blaze-markup-0.7.1.1.tar.gz
- Source4: blaze-html-0.8.1.3.tar.gz
- Source5: cmark-0.5.5.tar.gz
- Source6: digest-0.0.1.2.tar.gz
- Source7: extensible-exceptions-0.1.1.4.tar.gz
- Source8: haddock-library-1.4.2.tar.gz
- Source9: hslua-0.4.1.tar.gz
- Source10: old-time-1.1.0.3.tar.gz
- Source11: pandoc-types-1.16.1.1.tar.gz
- Source12: regex-pcre-builtin-0.94.4.8.8.35.tar.gz
- Source13: tagsoup-0.14.tar.gz
- Source14: temporary-1.2.0.4.tar.gz
- Source15: unix-compat-0.4.3.1.tar.gz
- Source16: filemanip-0.3.6.3.tar.gz
- Source17: utf8-string-1.0.1.1.tar.gz
- Source18: highlighting-kate-0.6.4.tar.gz
- Source19: xml-1.3.14.tar.gz
- Source20: texmath-0.8.6.7.tar.gz
- Source21: zip-archive-0.3.0.5.tar.gz
- # to fix wrong dependencies in cabal files
- 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}/%{pkg_name}_${pkg}.conf
- cd ..
- done
- %clean
- %{__rm} -rf ${RPM_BUILD_ROOT}
- %post
- ghc-pkg recache
- %postun
- ghc-pkg recache
- %files
- %defattr(-, root, root)
- %{_libdir}/ghc-%{ghc_version}/
- %{_libdir}/ghc-lib/
- %{_docdir}/%{name}
- %changelog
- * Fri Feb 03 2017 Toshiaki Ara <ara_t@384.jp> 1.17.1-1
- - update to 1.17.1
- - build using ghc-8.0.1
- * Fri May 06 2016 Toshiaki Ara <ara_t@384.jp> 1.17.0.3-1
- - new package
|