%define pkg_name    http-client-tls
%define pkg_version 0.3.5.3
%define pkg_release 4%{?_dist_release}

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

Source11: basement-0.0.8.tar.gz
Source12: basement.cabal
Source13: blaze-builder-0.4.1.0.tar.gz
Source14: blaze-builder.cabal
Source15: byteable-0.1.1.tar.gz
Source16: byteable.cabal
Source17: cereal-0.5.7.0.tar.gz
Source18: cereal.cabal
Source19: cookie-0.4.4.tar.gz
Source20: cookie.cabal
Source21: hourglass-0.2.12.tar.gz
Source22: hourglass.cabal
Source23: http-types-0.12.2.tar.gz
Source24: http-types.cabal
Source25: mime-types-0.1.0.8.tar.gz
Source26: mime-types.cabal
Source27: streaming-commons-0.2.1.0.tar.gz
Source28: streaming-commons.cabal
Source29: transformers-compat-0.6.2.tar.gz
Source30: transformers-compat.cabal
Source31: memory-0.14.18.tar.gz
Source32: memory.cabal
Source33: socks-0.5.6.tar.gz
Source34: socks.cabal
Source35: exceptions-0.10.0.tar.gz
Source36: exceptions.cabal
Source37: pem-0.2.4.tar.gz
Source38: pem.cabal
Source39: cryptonite-0.25.tar.gz
Source40: cryptonite.cabal
Source41: asn1-types-0.3.2.tar.gz
Source42: asn1-types.cabal
Source43: http-client-0.5.14.tar.gz
Source44: http-client.cabal
Source45: asn1-encoding-0.9.5.tar.gz
Source46: asn1-encoding.cabal
Source47: asn1-parse-0.9.4.tar.gz
Source48: asn1-parse.cabal
Source49: x509-1.7.5.tar.gz
Source50: x509.cabal
Source51: x509-store-1.6.7.tar.gz
Source52: x509-store.cabal
Source53: x509-validation-1.6.11.tar.gz
Source54: x509-validation.cabal
Source55: x509-system-1.6.6.tar.gz
Source56: x509-system.cabal
Source57: tls-1.4.1.tar.gz
Source58: tls.cabal
Source59: connection-0.2.8.tar.gz
Source60: connection.cabal
Source61: http-client-tls-0.3.5.3.tar.gz
Source62: http-client-tls.cabal

BuildRoot: %{_tmppath}/%{name}-%{version}-root

BuildRequires: ghc haskell-platform
BuildRequires: libffi-devel gmp-devel zlib-devel
BuildRequires: libghc-data-default-class
BuildRequires: libghc-semigroups

BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl

Requires: ghc haskell-platform
Requires: haskell-platform-dep
Requires: libghc-data-default-class
Requires: libghc-semigroups


Vendor: Project Vine
Distribution: Vine Linux
Packager: ara_t


%description
Haskell libraries: %{pkg_name} and dependent libraries


%prep
%{__rm} -rf ${RPM_BUILD_ROOT}

%build
%ghc_pkg_init

cd %{_builddir}
for pkg in `cat %{SOURCE0}`; do
    %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz
    pushd ${pkg}
        %ghc_fix_dependencies ${pkg}
        %cabal_configure2 %{name} ${pkg}
        %cabal_build
        %cabal_haddock
        %cabal_copy_resister %{name}_${pkg}
    popd
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/
%{_datadir}/


%changelog
* Mon Dec 17 2018 Toshiaki Ara <ara_t@384.jp> 0.3.5.3-4
- build using ghc-8.6.3

* Thu Aug 09 2018 Toshiaki Ara <ara_t@384.jp> 0.3.5.3-3
- rebuild with ghc-8.4.3-2

* Fri Jul 20 2018 Toshiaki Ara <ara_t@384.jp> 0.3.5.3-2
- build using ghc-8.4.3

* Fri May 18 2018 Toshiaki Ara <ara_t@384.jp> 0.3.5.3-1
- update to 0.3.5.3
- rebuild using ghc-8.4.2
- rewrite using macro

* Tue Jan 09 2018 Toshiaki Ara <ara_t@384.jp> 0.3.5.1-1
- update to 0.3.5.1
- build using ghc-8.2.2

* Tue Feb 21 2017 Toshiaki Ara <ara_t@384.jp> 0.3.3.1-1
- update to 0.3.3.1
- build using ghc-8.0.2

* Fri Feb 03 2017 Toshiaki Ara <ara_t@384.jp> 0.2.4.1-1
- update to 0.2.4.1
- build using ghc-8.0.1

* Wed May 04 2016 Toshiaki Ara <ara_t@384.jp> 0.2.2-3
- rebuilt

* Tue Apr 12 2016 Toshiaki Ara <ara_t@384.jp> 0.2.2-2
- correct SPEC file

* Tue Mar 01 2016 Toshiaki Ara <ara_t@384.jp> 0.2.2-1
- new package
