]> git.pld-linux.org Git - packages/ghc-aeson.git/blob - ghc-aeson.spec
8be23454d5f1d3bad88eb11e6aaae6d836abca68
[packages/ghc-aeson.git] / ghc-aeson.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname aeson
6 Summary:        Fast JSON parsing and encoding
7 Summary(pl.UTF-8):      Szybkie analizowanie i kodowanie JSON
8 Name:           ghc-%{pkgname}
9 Version:        0.6.2.1
10 Release:        1
11 License:        BSD
12 Group:          Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/aeson
14 Source0:        http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5:  3e06429d5e10812c9d8b8f184455e9a1
16 URL:            http://hackage.haskell.org/package/aeson
17 BuildRequires:  ghc >= 6.12.3
18 BuildRequires:  ghc-attoparsec >= 0.8.6.1
19 BuildRequires:  ghc-base >= 4
20 BuildRequires:  ghc-base < 5
21 BuildRequires:  ghc-blaze-builder >= 0.2.1.4
22 BuildRequires:  ghc-bytestring
23 BuildRequires:  ghc-containers
24 BuildRequires:  ghc-deepseq
25 BuildRequires:  ghc-hashable >= 1.1.2.0
26 BuildRequires:  ghc-mtl
27 BuildRequires:  ghc-old-locale
28 BuildRequires:  ghc-syb
29 BuildRequires:  ghc-template-haskell >= 2.4
30 BuildRequires:  ghc-text >= 0.11.1.0
31 BuildRequires:  ghc-time
32 BuildRequires:  ghc-unordered-containers >= 0.1.3.0
33 BuildRequires:  ghc-vector >= 0.7.1
34 %if %{with prof}
35 BuildRequires:  ghc-prof >= 6.12.3
36 BuildRequires:  ghc-attoparsec-prof >= 0.8.6.1
37 BuildRequires:  ghc-base-prof >= 4
38 BuildRequires:  ghc-base-prof < 5
39 BuildRequires:  ghc-blaze-builder-prof >= 0.2.1.4
40 BuildRequires:  ghc-bytestring-prof
41 BuildRequires:  ghc-containers-prof
42 BuildRequires:  ghc-deepseq-prof
43 BuildRequires:  ghc-hashable-prof >= 1.1.2.0
44 BuildRequires:  ghc-mtl-prof
45 BuildRequires:  ghc-old-locale-prof
46 BuildRequires:  ghc-syb-prof
47 BuildRequires:  ghc-template-haskell-prof >= 2.4
48 BuildRequires:  ghc-text-prof >= 0.11.1.0
49 BuildRequires:  ghc-time-prof
50 BuildRequires:  ghc-unordered-containers-prof >= 0.1.3.0
51 BuildRequires:  ghc-vector-prof >= 0.7.1
52 %endif
53 BuildRequires:  rpmbuild(macros) >= 1.608
54 Requires(post,postun):  /usr/bin/ghc-pkg
55 %requires_eq    ghc
56 Requires:       ghc-attoparsec >= 0.8.6.1
57 Requires:       ghc-base >= 4
58 Requires:       ghc-base < 5
59 Requires:       ghc-blaze-builder >= 0.2.1.4
60 Requires:       ghc-bytestring
61 Requires:       ghc-containers
62 Requires:       ghc-deepseq
63 Requires:       ghc-hashable >= 1.1.2.0
64 Requires:       ghc-mtl
65 Requires:       ghc-old-locale
66 Requires:       ghc-syb
67 Requires:       ghc-template-haskell >= 2.4
68 Requires:       ghc-text >= 0.11.1.0
69 Requires:       ghc-time
70 Requires:       ghc-unordered-containers >= 0.1.3.0
71 Requires:       ghc-vector >= 0.7.1
72 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
73
74 # debuginfo is not useful for ghc
75 %define         _enable_debug_packages  0
76
77 # don't compress haddock files
78 %define         _noautocompressdoc      *.haddock
79
80 %description
81 A JSON parsing and encoding library optimized for ease of use and high
82 performance.
83
84 %description -l pl.UTF-8
85 Biblioteka do analizy i kodowania JSON zoptymalizowana pod kątem
86 łatwości użycia i dużej wydajności.
87
88 %package prof
89 Summary:        Profiling %{pkgname} library for GHC
90 Summary(pl.UTF-8):      Biblioteka profilująca %{pkgname} dla GHC
91 Group:          Development/Libraries
92 Requires:       %{name} = %{version}-%{release}
93 Requires:       ghc-attoparsec-prof >= 0.8.6.1
94 Requires:       ghc-base-prof >= 4
95 Requires:       ghc-base-prof < 5
96 Requires:       ghc-blaze-builder-prof >= 0.2.1.4
97 Requires:       ghc-bytestring-prof
98 Requires:       ghc-containers-prof
99 Requires:       ghc-deepseq-prof
100 Requires:       ghc-hashable-prof >= 1.1.2.0
101 Requires:       ghc-mtl-prof
102 Requires:       ghc-old-locale-prof
103 Requires:       ghc-syb-prof
104 Requires:       ghc-template-haskell-prof >= 2.4
105 Requires:       ghc-text-prof >= 0.11.1.0
106 Requires:       ghc-time-prof
107 Requires:       ghc-unordered-containers-prof >= 0.1.3.0
108 Requires:       ghc-vector-prof >= 0.7.1
109
110 %description prof
111 Profiling %{pkgname} library for GHC. Should be installed when
112 GHC's profiling subsystem is needed.
113
114 %description prof -l pl.UTF-8
115 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
116 kiedy potrzebujemy systemu profilującego z GHC.
117
118 %package doc
119 Summary:        HTML documentation for %{pkgname} ghc package
120 Summary(pl.UTF-8):      Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
121 Group:          Documentation
122
123 %description doc
124 HTML documentation for %{pkgname} ghc package.
125
126 %description doc -l pl.UTF-8
127 Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
128
129 %prep
130 %setup -q -n %{pkgname}-%{version}
131
132 %build
133 runhaskell Setup.lhs configure -v2 \
134         %{?with_prof:--enable-library-profiling} \
135         --prefix=%{_prefix} \
136         --libdir=%{_libdir} \
137         --libexecdir=%{_libexecdir} \
138         --docdir=%{_docdir}/%{name}-%{version}
139
140 runhaskell Setup.lhs build
141 runhaskell Setup.lhs haddock --executables
142
143 %install
144 rm -rf $RPM_BUILD_ROOT
145 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
146
147 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
148
149 # work around automatic haddock docs installation
150 %{__rm} -rf %{name}-%{version}-doc
151 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
152 %{__rm} -rf $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
153
154 runhaskell Setup.lhs register \
155         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
156
157 %clean
158 rm -rf $RPM_BUILD_ROOT
159
160 %post
161 %ghc_pkg_recache
162
163 %postun
164 %ghc_pkg_recache
165
166 %files
167 %defattr(644,root,root,755)
168 %doc LICENSE README.markdown
169 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
170 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
171 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HSaeson-%{version}.o
172 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSaeson-%{version}.a
173 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data
174 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson.hi
175 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson
176 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson/*.hi
177 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson/Parser
178 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson/Parser/*.hi
179 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson/Types
180 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson/Types/*.hi
181
182 %if %{with prof}
183 %files prof
184 %defattr(644,root,root,755)
185 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSaeson-%{version}_p.a
186 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson.p_hi
187 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson/*.p_hi
188 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson/Parser/*.p_hi
189 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson/Types/*.p_hi
190 %endif
191
192 %files doc
193 %defattr(644,root,root,755)
194 %doc %{name}-%{version}-doc/*
This page took 0.082093 seconds and 2 git commands to generate.