%define pkg_name http-client-tls %define pkg_version 0.2.4.1 %define pkg_release 1%{?_dist_release} %define ghc_version 8.0.1 # to fix wrong dependencies in cabal files # do not use '-' %define exceptions_version 0.8.3 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: %{pkg_name}-%{version}.tar.gz Source1: packages # num=11; for pkg in `cat packages`; do echo "Source${num}: ${pkg}.tar.gz"; num=`expr ${num} + 1`; done Source11: base64-bytestring-1.0.0.1.tar.gz Source12: blaze-builder-0.4.0.2.tar.gz Source13: byteable-0.1.1.tar.gz Source14: cereal-0.5.4.0.tar.gz Source15: cookie-0.4.2.1.tar.gz Source16: hourglass-0.2.10.tar.gz Source17: http-types-0.9.1.tar.gz Source18: memory-0.13.tar.gz Source19: asn1-types-0.3.2.tar.gz Source20: asn1-encoding-0.9.4.tar.gz Source21: asn1-parse-0.9.4.tar.gz Source22: cryptonite-0.21.tar.gz Source23: mime-types-0.1.0.7.tar.gz Source24: pem-0.2.2.tar.gz Source25: socks-0.5.5.tar.gz Source26: exceptions-0.8.3.tar.gz Source27: streaming-commons-0.1.17.tar.gz Source28: http-client-0.4.31.2.tar.gz Source29: x509-1.6.5.tar.gz Source30: x509-store-1.6.2.tar.gz Source31: x509-system-1.6.4.tar.gz Source32: x509-validation-1.6.5.tar.gz Source33: tls-1.3.9.tar.gz Source34: connection-0.2.7.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: ghc haskell-platform BuildRequires: libffi-devel gmp-devel zlib-devel BuildRequires: libghc-dlist BuildRequires: libghc-data-default BuildRequires: libghc-aeson BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl Requires: ghc haskell-platform Requires: libghc-dlist Requires: libghc-data-default Requires: libghc-aeson Vendor: Project Vine Distribution: Vine Linux Packager: ara_t %description Haskell libraries: %{pkg_name} and dependent libraries %prep %{__rm} -rf ${RPM_BUILD_ROOT} %{__rm} -rf %{_builddir}/package.conf %{__rm} -rf ${HOME}/.ghc %setup -q -n %{pkg_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 %{__mkdir_p} ${PKG_CONF_DIR} # install dependent packages cd %{_builddir} for pkg in `cat %{SOURCE1}`; do %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz cd ${pkg} cabal configure \ --prefix=%{_prefix} \ --libdir=%{_libdir}/ghc-lib/%{pkg_name}/${pkg} \ --libsubdir= \ --datadir=%{_datadir}/%{pkg_name}/${pkg} \ --datasubdir= \ --docdir=%{_docdir}/%{pkg_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 # build cd %{_builddir}/%{pkg_name}-%{version} cabal configure \ --prefix=%{_prefix} \ --libdir=%{_libdir}/ghc-lib/%{pkg_name}/%{pkg_name}-%{version} \ --libsubdir= \ --datadir=%{_datadir}/%{pkg_name}/%{pkg_name}-%{version} \ --datasubdir= \ --docdir=%{_docdir}/%{pkg_name}/%{pkg_name}-%{version} cabal build cabal haddock cabal copy --destdir=${RPM_BUILD_ROOT} cabal register --inplace cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{pkg_name}-%{version}.conf %install cabal copy --destdir=${RPM_BUILD_ROOT} %{__cp} LICENSE \ ${RPM_BUILD_ROOT}%{_docdir}/%{pkg_name}/%{pkg_name}-%{version} %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/ %{_datadir}/ %changelog * Fri Feb 03 2017 Toshiaki Ara 0.2.4.1-1 - update to 0.2.4.1 - build using ghc-8.0.1 * Wed May 04 2016 Toshiaki Ara 0.2.2-3 - rebuilt * Tue Apr 12 2016 Toshiaki Ara 0.2.2-2 - correct SPEC file * Tue Mar 01 2016 Toshiaki Ara 0.2.2-1 - new package