source: projects/specs/trunk/lib/libg/libghc-http-client-tls/libghc-http-client-tls-vl.spec @ 11386

Revision 11386, 4.3 KB checked in by ara_t, 6 years ago (diff)

new upstream release

Line 
1%define pkg_name    http-client-tls
2%define pkg_version 0.3.5.1
3%define pkg_release 1%{?_dist_release}
4
5%define ghc_version 8.2.2
6
7Summary: Haskell libraries: %{pkg_name} and dependent libraries
8Name:    libghc-%{pkg_name}
9Version: %{pkg_version}
10Release: %{pkg_release}
11
12License: BSD3
13Group:   Applications/Text
14URL:     http://hackage.haskell.org
15
16Source0: %{pkg_name}-%{version}.tar.gz
17Source1: packages
18
19# num=11; for pkg in `cat packages`; do echo "Source${num}: ${pkg}.tar.gz"; num=`expr ${num} + 1`; done
20Source11: base64-bytestring-1.0.0.1.tar.gz
21Source12: basement-0.0.4.tar.gz
22Source13: blaze-builder-0.4.0.2.tar.gz
23Source14: byteable-0.1.1.tar.gz
24Source15: cereal-0.5.4.0.tar.gz
25Source16: exceptions-0.8.3.tar.gz
26Source17: hourglass-0.2.10.tar.gz
27Source18: http-types-0.11.tar.gz
28Source19: mime-types-0.1.0.7.tar.gz
29Source20: pem-0.2.2.tar.gz
30Source21: foundation-0.0.17.tar.gz
31Source22: streaming-commons-0.1.18.tar.gz
32Source23: cookie-0.4.3.tar.gz
33Source24: socks-0.5.6.tar.gz
34Source25: memory-0.14.11.tar.gz
35Source26: http-client-0.5.7.1.tar.gz
36Source27: cryptonite-0.24.tar.gz
37Source28: asn1-types-0.3.2.tar.gz
38Source29: asn1-encoding-0.9.5.tar.gz
39Source30: asn1-parse-0.9.4.tar.gz
40Source31: x509-1.7.2.tar.gz
41Source32: x509-store-1.6.5.tar.gz
42Source33: x509-validation-1.6.9.tar.gz
43Source34: x509-system-1.6.6.tar.gz
44Source35: tls-1.4.0.tar.gz
45Source36: connection-0.2.8.tar.gz
46
47# to fix wrong dependencies in cabal files
48# do not use '-'
49%define exceptions_version 0.8.3
50Source51: exceptions.cabal
51
52BuildRoot: %{_tmppath}/%{name}-%{version}-root
53
54BuildRequires: ghc haskell-platform
55BuildRequires: libffi-devel gmp-devel zlib-devel
56BuildRequires: libghc-dlist
57BuildRequires: libghc-data-default
58BuildRequires: libghc-aeson
59
60BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl
61
62Requires: ghc haskell-platform
63Requires: libghc-dlist
64Requires: libghc-data-default
65Requires: libghc-aeson
66
67
68Vendor: Project Vine
69Distribution: Vine Linux
70Packager: ara_t
71
72
73%description
74Haskell libraries: %{pkg_name} and dependent libraries
75
76
77%prep
78%{__rm} -rf ${RPM_BUILD_ROOT}
79%{__rm} -rf %{_builddir}/package.conf
80%{__rm} -rf ${HOME}/.ghc
81%setup -q -n %{pkg_name}-%{version}
82
83%build
84# Initialise the package db
85ghc-pkg init %{_builddir}/package.conf
86
87PKG_CONF_DIR=${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_version}/package.conf.d
88%{__mkdir_p} ${PKG_CONF_DIR}
89
90# install dependent packages
91cd %{_builddir}
92for pkg in `cat %{SOURCE1}`; do
93  %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz
94  cd ${pkg}
95  # fix wrong dependencies
96  case ${pkg} in
97      "exceptions-%{exceptions_version}") %{__cp} %{SOURCE51} . ;;
98      *) ;;
99  esac
100
101  cabal configure \
102    --prefix=%{_prefix} \
103    --libdir=%{_libdir}/ghc-lib/%{name}/${pkg} \
104    --libsubdir= \
105    --datadir=%{_datadir}/%{name}/${pkg} \
106    --datasubdir= \
107    --docdir=%{_docdir}/%{name}/${pkg}
108
109  cabal build
110  cabal haddock || : # aviod Error
111  cabal copy --destdir=${RPM_BUILD_ROOT}
112  cabal register --inplace
113  cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{name}_${pkg}.conf
114  cd ..
115done
116
117# build
118cd %{_builddir}/%{pkg_name}-%{version}
119cabal configure \
120    --prefix=%{_prefix} \
121    --libdir=%{_libdir}/ghc-lib/%{name}/%{pkg_name}-%{version} \
122    --libsubdir= \
123    --datadir=%{_datadir}/%{name}/%{pkg_name}-%{version} \
124    --datasubdir= \
125    --docdir=%{_docdir}/%{name}/%{pkg_name}-%{version}
126
127cabal build
128cabal haddock
129cabal copy --destdir=${RPM_BUILD_ROOT}
130cabal register --inplace
131cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{pkg_name}-%{version}.conf
132
133%install
134cabal copy --destdir=${RPM_BUILD_ROOT}
135
136%{__cp} LICENSE \
137        ${RPM_BUILD_ROOT}%{_docdir}/%{name}/%{pkg_name}-%{version}
138
139%clean
140%{__rm} -rf ${RPM_BUILD_ROOT}
141
142%post
143ghc-pkg recache
144
145%postun
146ghc-pkg recache
147
148
149%files
150%defattr(-, root, root)
151%{_libdir}/ghc-%{ghc_version}/
152%{_libdir}/ghc-lib/
153%{_datadir}/
154
155
156%changelog
157* Tue Jan 09 2018 Toshiaki Ara <ara_t@384.jp> 0.3.5.1-1
158- update to 0.3.5.1
159- build using ghc-8.2.2
160
161* Tue Feb 21 2017 Toshiaki Ara <ara_t@384.jp> 0.3.3.1-1
162- update to 0.3.3.1
163- build using ghc-8.0.2
164
165* Fri Feb 03 2017 Toshiaki Ara <ara_t@384.jp> 0.2.4.1-1
166- update to 0.2.4.1
167- build using ghc-8.0.1
168
169* Wed May 04 2016 Toshiaki Ara <ara_t@384.jp> 0.2.2-3
170- rebuilt
171
172* Tue Apr 12 2016 Toshiaki Ara <ara_t@384.jp> 0.2.2-2
173- correct SPEC file
174
175* Tue Mar 01 2016 Toshiaki Ara <ara_t@384.jp> 0.2.2-1
176- new package
Note: See TracBrowser for help on using the repository browser.