]> git.pld-linux.org Git - packages/ghc-yaml.git/blob - ghc-yaml.spec
- release 3
[packages/ghc-yaml.git] / ghc-yaml.spec
1 #
2 # Conditional build:
3 %bcond_without  prof            # profiling library
4 #
5 %define         pkgname yaml
6 Summary:        Support for parsing and rendering YAML documents
7 Summary(pl.UTF-8):      Analiza i renderowanie dokumentów YAML
8 Name:           ghc-%{pkgname}
9 Version:        0.11.4.0
10 Release:        3
11 License:        BSD
12 Group:          Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/yaml
14 Source0:        http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5:  18322a12aa993871315c33dbe7529026
16 URL:            http://hackage.haskell.org/package/yaml
17 BuildRequires:  ghc >= 6.12.3
18 BuildRequires:  ghc-aeson >= 0.11
19 BuildRequires:  ghc-attoparsec >= 0.11.3.0
20 BuildRequires:  ghc-base >= 4.9.1
21 BuildRequires:  ghc-bytestring >= 0.9.1.4
22 BuildRequires:  ghc-conduit >= 1.2.8
23 BuildRequires:  ghc-containers
24 BuildRequires:  ghc-directory
25 BuildRequires:  ghc-filepath
26 BuildRequires:  ghc-libyaml >= 0.1
27 BuildRequires:  ghc-mtl
28 BuildRequires:  ghc-resourcet >= 0.3
29 BuildRequires:  ghc-scientific >= 0.3
30 BuildRequires:  ghc-template-haskell
31 BuildRequires:  ghc-text
32 BuildRequires:  ghc-transformers >= 0.1
33 BuildRequires:  ghc-unordered-containers
34 BuildRequires:  ghc-vector
35 %if %{with prof}
36 BuildRequires:  ghc-prof >= 6.12.3
37 BuildRequires:  ghc-aeson-prof >= 0.11
38 BuildRequires:  ghc-attoparsec-prof >= 0.11.3.0
39 BuildRequires:  ghc-base-prof >= 4.9.1
40 BuildRequires:  ghc-bytestring-prof >= 0.9.1.4
41 BuildRequires:  ghc-conduit-prof >= 1.2.8
42 BuildRequires:  ghc-containers-prof
43 BuildRequires:  ghc-directory-prof
44 BuildRequires:  ghc-filepath-prof
45 BuildRequires:  ghc-libyaml-prof >= 0.1
46 BuildRequires:  ghc-mtl-prof
47 BuildRequires:  ghc-resourcet-prof >= 0.3
48 BuildRequires:  ghc-scientific-prof >= 0.3
49 BuildRequires:  ghc-template-haskell-prof
50 BuildRequires:  ghc-text-prof
51 BuildRequires:  ghc-transformers-prof >= 0.1
52 BuildRequires:  ghc-unordered-containers-prof
53 BuildRequires:  ghc-vector-prof
54 %endif
55 BuildRequires:  pkgconfig
56 BuildRequires:  rpmbuild(macros) >= 1.608
57 Requires(post,postun):  /usr/bin/ghc-pkg
58 %requires_eq    ghc
59 Requires:       ghc-aeson >= 0.11
60 Requires:       ghc-attoparsec >= 0.11.3.0
61 Requires:       ghc-base >= 4.9.1
62 Requires:       ghc-bytestring >= 0.9.1.4
63 Requires:       ghc-conduit >= 1.2.8
64 Requires:       ghc-containers
65 Requires:       ghc-directory
66 Requires:       ghc-filepath
67 Requires:       ghc-libyaml >= 0.1
68 Requires:       ghc-mtl
69 Requires:       ghc-resourcet >= 0.3
70 Requires:       ghc-scientific >= 0.3
71 Requires:       ghc-template-haskell
72 Requires:       ghc-text
73 Requires:       ghc-transformers >= 0.1
74 Requires:       ghc-unordered-containers
75 Requires:       ghc-vector
76 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
77
78 # debuginfo is not useful for ghc
79 %define         _enable_debug_packages  0
80
81 # don't compress haddock files
82 %define         _noautocompressdoc      *.haddock
83
84 %description
85 This package provides support for parsing and emitting YAML documents.
86
87 %description -l pl.UTF-8
88 Ten pakiet zapewnia obsługę analizy i tworzenia dokumentów YAML.
89
90 %package prof
91 Summary:        Profiling %{pkgname} library for GHC
92 Summary(pl.UTF-8):      Biblioteka profilująca %{pkgname} dla GHC
93 Group:          Development/Libraries
94 Requires:       %{name} = %{version}-%{release}
95 Requires:       ghc-prof >= 6.12.3
96 Requires:       ghc-aeson-prof >= 0.11
97 Requires:       ghc-attoparsec-prof >= 0.11.3.0
98 Requires:       ghc-base-prof >= 4.9.1
99 Requires:       ghc-bytestring-prof >= 0.9.1.4
100 Requires:       ghc-conduit-prof >= 1.2.8
101 Requires:       ghc-containers-prof
102 Requires:       ghc-directory-prof
103 Requires:       ghc-filepath-prof
104 Requires:       ghc-libyaml-prof >= 0.1
105 Requires:       ghc-mtl-prof
106 Requires:       ghc-resourcet-prof >= 0.3
107 Requires:       ghc-scientific-prof >= 0.3
108 Requires:       ghc-template-haskell-prof
109 Requires:       ghc-text-prof
110 Requires:       ghc-transformers-prof >= 0.1
111 Requires:       ghc-unordered-containers-prof
112 Requires:       ghc-vector-prof
113
114 %description prof
115 Profiling %{pkgname} library for GHC. Should be installed when
116 GHC's profiling subsystem is needed.
117
118 %description prof -l pl.UTF-8
119 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
120 kiedy potrzebujemy systemu profilującego z GHC.
121
122 %package doc
123 Summary:        HTML documentation for ghc %{pkgname} package
124 Summary(pl.UTF-8):      Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
125 Group:          Documentation
126
127 %description doc
128 HTML documentation for ghc %{pkgname} package.
129
130 %description doc -l pl.UTF-8
131 Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
132
133 %prep
134 %setup -q -n %{pkgname}-%{version}
135
136 %build
137 runhaskell Setup.lhs configure -v2 \
138         %{?with_prof:--enable-library-profiling} \
139         --flags="-no-exe" \
140         --prefix=%{_prefix} \
141         --libdir=%{_libdir} \
142         --libexecdir=%{_libexecdir} \
143         --docdir=%{_docdir}/%{name}-%{version}
144
145 runhaskell Setup.lhs build
146 runhaskell Setup.lhs haddock
147 # --executables fails here
148
149 %install
150 rm -rf $RPM_BUILD_ROOT
151 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
152
153 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
154
155 # work around automatic haddock docs installation
156 %{__rm} -rf %{name}-%{version}-doc
157 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
158 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
159
160 runhaskell Setup.lhs register \
161         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
162
163 %clean
164 rm -rf $RPM_BUILD_ROOT
165
166 %post
167 %ghc_pkg_recache
168
169 %postun
170 %ghc_pkg_recache
171
172 %files
173 %defattr(644,root,root,755)
174 %doc LICENSE
175 %attr(755,root,root) %{_bindir}/yaml2json
176 %attr(755,root,root) %{_bindir}/json2yaml
177 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
178 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
179 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSyaml-%{version}-*.so
180 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSyaml-%{version}-*.a
181 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSyaml-%{version}-*_p.a
182 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.hi
183 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.dyn_hi
184 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data
185 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.hi
186 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.dyn_hi
187 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Yaml
188 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Yaml/*.hi
189 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Yaml/*.dyn_hi
190
191 %if %{with prof}
192 %files prof
193 %defattr(644,root,root,755)
194 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSyaml-%{version}-*_p.a
195 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.p_hi
196 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.p_hi
197 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Yaml/*.p_hi
198 %endif
199
200 %files doc
201 %defattr(644,root,root,755)
202 %doc %{name}-%{version}-doc/*
This page took 0.079063 seconds and 3 git commands to generate.