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 | |
---|
7 | Summary: Support for parsing and rendering YAML documents |
---|
8 | Name: %{pkg_name} |
---|
9 | Version: %{pkg_version} |
---|
10 | Release: %{pkg_release} |
---|
11 | |
---|
12 | License: BSD3 |
---|
13 | Group: Applications/Text |
---|
14 | URL: http://hackage.haskell.org |
---|
15 | |
---|
16 | Source0: %{name}-%{version}.tar.gz |
---|
17 | Source1: packages |
---|
18 | |
---|
19 | # num=11; for pkg in `cat packages`; do echo "Source${num}: ${pkg}.tar.gz"; num=`expr ${num} + 1`; done |
---|
20 | Source11: mmorph-1.1.0.tar.gz |
---|
21 | Source12: semigroups-0.18.3.tar.gz |
---|
22 | Source13: transformers-base-0.4.4.tar.gz |
---|
23 | Source14: unliftio-core-0.1.1.0.tar.gz |
---|
24 | Source15: monad-control-1.0.2.2.tar.gz |
---|
25 | Source16: lifted-base-0.2.3.11.tar.gz |
---|
26 | Source17: resourcet-1.1.10.tar.gz |
---|
27 | Source18: conduit-1.2.12.1.tar.gz |
---|
28 | |
---|
29 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
30 | |
---|
31 | BuildRequires: ghc haskell-platform |
---|
32 | BuildRequires: libffi-devel gmp-devel zlib-devel |
---|
33 | BuildRequires: libghc-dlist |
---|
34 | BuildRequires: libghc-aeson |
---|
35 | |
---|
36 | BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl |
---|
37 | |
---|
38 | Requires: ghc haskell-platform |
---|
39 | Requires: libghc-dlist |
---|
40 | Requires: libghc-aeson |
---|
41 | |
---|
42 | Vendor: Project Vine |
---|
43 | Distribution: Vine Linux |
---|
44 | Packager: ara_t |
---|
45 | |
---|
46 | |
---|
47 | %description |
---|
48 | This 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 | |
---|
52 | The 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. |
---|
56 | For 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 |
---|
67 | ghc-pkg init %{_builddir}/package.conf |
---|
68 | |
---|
69 | PKG_CONF_DIR=${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_version}/package.conf.d |
---|
70 | %{__mkdir_p} ${PKG_CONF_DIR} |
---|
71 | |
---|
72 | # install dependent packages |
---|
73 | cd %{_builddir} |
---|
74 | for 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 .. |
---|
91 | done |
---|
92 | |
---|
93 | # build |
---|
94 | cd %{_builddir}/%{name}-%{version} |
---|
95 | cabal 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 | |
---|
103 | cabal build |
---|
104 | cabal haddock |
---|
105 | cabal copy --destdir=${RPM_BUILD_ROOT} |
---|
106 | cabal register --inplace |
---|
107 | cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{pkg_name}-%{version}.conf |
---|
108 | |
---|
109 | %install |
---|
110 | cabal 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 |
---|
119 | ghc-pkg recache |
---|
120 | |
---|
121 | %postun |
---|
122 | ghc-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 |
---|