3 %bcond_without prof # profiling library
6 Summary: A simple XML library
7 Summary(pl.UTF-8): Prosta biblioteka do XML-a
12 Group: Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/xml
14 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5: 17823634f69305e8d4cc99b22934a78c
16 URL: http://hackage.haskell.org/package/xml
17 BuildRequires: ghc >= 6.12.3
18 BuildRequires: ghc-base >= 3
19 BuildRequires: ghc-base < 5
20 BuildRequires: ghc-bytestring
21 BuildRequires: ghc-text
23 BuildRequires: ghc-prof >= 6.12.3
24 BuildRequires: ghc-base-prof >= 3
25 BuildRequires: ghc-base-prof < 5
26 BuildRequires: ghc-bytestring-prof
27 BuildRequires: ghc-text-prof
29 BuildRequires: rpmbuild(macros) >= 1.608
30 Requires(post,postun): /usr/bin/ghc-pkg
32 Requires: ghc-base >= 3
33 Requires: ghc-base < 5
34 Requires: ghc-bytestring
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 # debuginfo is not useful for ghc
39 %define _enable_debug_packages 0
41 # don't compress haddock files
42 %define _noautocompressdoc *.haddock
47 %description -l pl.UTF-8
48 Prosta biblioteka do XML-a.
51 Summary: Profiling %{pkgname} library for GHC
52 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
53 Group: Development/Libraries
54 Requires: %{name} = %{version}-%{release}
55 Requires: ghc-base-prof >= 3
56 Requires: ghc-base-prof < 5
57 Requires: ghc-bytestring-prof
58 Requires: ghc-text-prof
61 Profiling %{pkgname} library for GHC. Should be installed when
62 GHC's profiling subsystem is needed.
64 %description prof -l pl.UTF-8
65 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
66 kiedy potrzebujemy systemu profilującego z GHC.
69 Summary: HTML documentation for ghc %{pkgname} package
70 Summary(pl.UTF-8): Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
74 HTML documentation for ghc %{pkgname} package.
76 %description doc -l pl.UTF-8
77 Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
80 %setup -q -n %{pkgname}-%{version}
83 runhaskell Setup.hs configure -v2 \
84 %{?with_prof:--enable-library-profiling} \
87 --libexecdir=%{_libexecdir} \
88 --docdir=%{_docdir}/%{name}-%{version}
90 runhaskell Setup.hs build
91 runhaskell Setup.hs haddock --executables
94 rm -rf $RPM_BUILD_ROOT
95 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
97 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
99 # work around automatic haddock docs installation
100 %{__rm} -rf %{name}-%{version}-doc
101 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
102 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
104 runhaskell Setup.hs register \
105 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
108 rm -rf $RPM_BUILD_ROOT
117 %defattr(644,root,root,755)
119 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
120 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
121 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HSxml-%{version}.o
122 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSxml-%{version}.a
123 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text
124 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/XML
125 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/XML/Light.hi
126 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/XML/Light
127 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/XML/Light/*.hi
131 %defattr(644,root,root,755)
132 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSxml-%{version}_p.a
133 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/XML/Light.p_hi
134 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/XML/Light/*.p_hi
138 %defattr(644,root,root,755)
139 %doc %{name}-%{version}-doc/*