source: projects/specs/trunk/y/yaml/yaml-vl.spec @ 10915

Revision 10915, 3.6 KB checked in by ara_t, 7 years ago (diff)

yaml: update to 0.8.21.2 / build with ghc-8.0.1

Line 
1%define pkg_name    yaml
2%define pkg_version 0.8.21.2
3%define pkg_release 1%{?_dist_release}
4
5%define ghc_version 8.0.1
6
7Summary: Support for parsing and rendering YAML documents
8Name:    %{pkg_name}
9Version: %{pkg_version}
10Release: %{pkg_release}
11
12License: BSD3
13Group:   Applications/Text
14URL:     http://hackage.haskell.org
15
16Source0: %{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: exceptions-0.8.3.tar.gz
21Source12: mmorph-1.0.6.tar.gz
22Source13: semigroups-0.18.1.tar.gz
23Source14: transformers-base-0.4.4.tar.gz
24Source15: monad-control-1.0.0.5.tar.gz
25Source16: lifted-base-0.2.3.6.tar.gz
26Source17: enclosed-exceptions-1.0.1.1.tar.gz
27Source18: resourcet-1.1.7.2.tar.gz
28Source19: conduit-1.2.6.2.tar.gz
29
30BuildRoot: %{_tmppath}/%{name}-%{version}-root
31
32BuildRequires: ghc haskell-platform
33BuildRequires: libffi-devel gmp-devel zlib-devel
34BuildRequires: libghc-dlist
35BuildRequires: libghc-aeson
36
37BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl
38
39Requires: ghc haskell-platform
40Requires: libghc-dlist
41Requires: libghc-aeson
42
43Vendor: Project Vine
44Distribution: Vine Linux
45Packager: ara_t
46
47
48%description
49This package includes the full libyaml C library version 0.1.5
50 by Kirill Simonov in the package so you don't need to worry
51 about any non-Haskell dependencies.
52
53The package is broken down into two primary modules.
54"Data.Yaml" provides a high-level interface based around the JSON datatypes
55 provided by the @aeson@ package.
56"Text.Libyaml" provides a lower-level, streaming interface.
57For most users, "Data.Yaml" is recommended.
58#'
59
60%prep
61%{__rm} -rf ${RPM_BUILD_ROOT}
62%{__rm} -rf %{_builddir}/package.conf
63%{__rm} -rf ${HOME}/.ghc
64%setup -q
65
66%build
67# Initialise the package db
68ghc-pkg init %{_builddir}/package.conf
69
70PKG_CONF_DIR=${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_version}/package.conf.d
71%{__mkdir_p} ${PKG_CONF_DIR}
72
73# install dependent packages
74cd %{_builddir}
75for pkg in `cat %{SOURCE1}`; do
76  %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz
77  cd ${pkg}
78  cabal configure \
79    --prefix=%{_prefix} \
80    --libdir=%{_libdir}/ghc-lib/%{name}/${pkg} \
81    --libsubdir= \
82    --datadir=%{_datadir}/%{name}/${pkg} \
83    --datasubdir= \
84    --docdir=%{_docdir}/%{name}/${pkg}
85
86  cabal build
87  cabal haddock || : # avoid Error
88  cabal copy --destdir=${RPM_BUILD_ROOT}
89  cabal register --inplace
90  cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{name}_${pkg}.conf
91  cd ..
92done
93
94# build
95cd %{_builddir}/%{name}-%{version}
96cabal configure \
97    --prefix=%{_prefix} \
98    --libdir=%{_libdir}/ghc-lib/%{name}/%{name}-%{version} \
99    --libsubdir= \
100    --datadir=%{_datadir}/%{name}/%{name}-%{version} \
101    --datasubdir= \
102    --docdir=%{_docdir}/%{name}/%{name}-%{version}
103
104cabal build
105cabal haddock
106cabal copy --destdir=${RPM_BUILD_ROOT}
107cabal register --inplace
108cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{name}-%{version}.conf
109
110%install
111cabal copy --destdir=${RPM_BUILD_ROOT}
112
113%{__cp} ChangeLog.md LICENSE README.md \
114        ${RPM_BUILD_ROOT}%{_docdir}/%{name}/%{name}-%{version}
115
116%clean
117%{__rm} -rf ${RPM_BUILD_ROOT}
118
119%post
120ghc-pkg recache
121
122%postun
123ghc-pkg recache
124
125
126%files
127%defattr(-, root, root)
128%{_bindir}/
129%{_libdir}/ghc-%{ghc_version}/
130%{_libdir}/ghc-lib/
131%{_docdir}/%{name}/
132
133
134%changelog
135* Fri Feb 03 2017 Toshiaki Ara <ara_t@384.jp> 0.8.21.2-1
136- update to 0.8.21.2
137- build using ghc-8.0.1
138
139* Wed May 04 2016 Toshiaki Ara <ara_t@384.jp> 0.8.16-3
140- rebuilt
141
142* Tue Apr 12 2016 Toshiaki Ara <ara_t@384.jp> 0.8.16-2
143- correct SPEC file
144
145* Tue Mar 01 2016 Toshiaki Ara <ara_t@384.jp> 0.8.16-1
146- new package
Note: See TracBrowser for help on using the repository browser.