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

Revision 10177, 3.4 KB checked in by ara_t, 8 years ago (diff)

Haskell libraries

Line 
1%define pkg_name    http-client-tls
2%define pkg_version 0.2.2
3%define pkg_release 2%{?_dist_release}
4
5%define ghc_version 7.10.3
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: base64-bytestring-1.0.0.1.tar.gz
18Source2: blaze-builder-0.4.0.1.tar.gz
19Source3: byteable-0.1.1.tar.gz
20Source4: cereal-0.5.1.0.tar.gz
21Source5: cookie-0.4.1.6.tar.gz
22Source6: hourglass-0.2.10.tar.gz
23Source7: http-types-0.9.tar.gz
24Source8: memory-0.11.tar.gz
25Source9: asn1-types-0.3.2.tar.gz
26Source10: asn1-encoding-0.9.3.tar.gz
27Source11: asn1-parse-0.9.4.tar.gz
28Source12: cryptonite-0.13.tar.gz
29Source13: mime-types-0.1.0.6.tar.gz
30Source14: pem-0.2.2.tar.gz
31Source15: socks-0.5.4.tar.gz
32Source16: streaming-commons-0.1.15.1.tar.gz
33Source17: http-client-0.4.27.tar.gz
34Source18: x509-1.6.3.tar.gz
35Source19: x509-store-1.6.1.tar.gz
36Source20: x509-system-1.6.3.tar.gz
37Source21: x509-validation-1.6.3.tar.gz
38Source22: tls-1.3.4.tar.gz
39Source23: connection-0.2.5.tar.gz
40
41Source100: packages
42
43BuildRoot: %{_tmppath}/%{name}-%{version}-root
44
45BuildRequires: ghc haskell-platform-base cabal-install
46BuildRequires: libffi-devel gmp-devel zlib-devel
47BuildRequires: libghc-data-default-class
48
49BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl
50BuildRequires: hscolour
51
52Requires: ghc haskell-platform-base cabal-install
53Requires: libghc-data-default-class
54
55
56Vendor: Project Vine
57Distribution: Vine Linux
58Packager: ara_t
59
60
61%description
62Haskell libraries: %{pkg_name} and dependent libraries
63
64
65%prep
66%{__rm} -rf ${RPM_BUILD_ROOT}
67%setup -q -n %{pkg_name}-%{version}
68
69%build
70# Initialise the package db
71ghc-pkg init %{_builddir}/package.conf
72
73PKG_CONF_DIR=${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_version}/package.conf.d
74%{__mkdir_p} ${PKG_CONF_DIR}
75
76# install dependent packages
77cd %{_builddir}
78for pkg in `cat %{SOURCE100}`; do
79  %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz
80  cd ${pkg}
81  cabal configure \
82    --prefix=%{_prefix} \
83    --libdir=%{_libdir}/ghc-lib/%{pkg_name}/${pkg} \
84    --libsubdir= \
85    --datadir=%{_datadir}/%{pkg_name}/${pkg} \
86    --datasubdir= \
87    --docdir=%{_docdir}/%{pkg_name}/${pkg}
88
89  cabal build
90  cabal haddock || : # aviod Error
91  cabal copy --destdir=${RPM_BUILD_ROOT}
92  cabal register --inplace
93  cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{pkg_name}_${pkg}.conf
94  cd ..
95done
96
97# build
98cd %{_builddir}/%{pkg_name}-%{version}
99cabal configure \
100    --prefix=%{_prefix} \
101    --libdir=%{_libdir}/ghc-lib/%{pkg_name}/%{pkg_name}-%{version} \
102    --libsubdir= \
103    --datadir=%{_datadir}/%{pkg_name}/%{pkg_name}-%{version} \
104    --datasubdir= \
105    --docdir=%{_docdir}/%{pkg_name}/%{pkg_name}-%{version}
106
107cabal build
108cabal haddock
109cabal copy --destdir=${RPM_BUILD_ROOT}
110cabal register --inplace
111cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{pkg_name}-%{version}.conf
112
113%install
114cabal copy --destdir=${RPM_BUILD_ROOT}
115
116%{__cp} LICENSE \
117        ${RPM_BUILD_ROOT}%{_docdir}/%{pkg_name}/%{pkg_name}-%{version}
118
119%clean
120%{__rm} -rf ${RPM_BUILD_ROOT}
121
122%post
123ghc-pkg recache
124
125%postun
126ghc-pkg recache
127
128
129%files
130%defattr(-, root, root)
131%{_libdir}/ghc-%{ghc_version}/
132%{_libdir}/ghc-lib/
133%{_datadir}/
134
135
136%changelog
137* Tue Apr 12 2016 Toshiaki Ara <ara_t@384.jp> 0.2.2-2
138- correct SPEC file
139
140* Tue Mar 01 2016 Toshiaki Ara <ara_t@384.jp> 0.2.2-1
141- new package
Note: See TracBrowser for help on using the repository browser.