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

Revision 11385, 3.7 KB checked in by ara_t, 6 years ago (diff)

new upstream release

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