3 %bcond_without prof # profiling library
5 %define pkgname tagsoup
6 Summary: Parsing and extracting information from (possibly malformed) HTML/XML documents
7 Summary(pl.UTF-8): Analiza i wydobywanie informacji z (niekoniecznie poprawnych) dokumentów HTML/XML
12 Group: Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/tagsoup
14 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5: 20f2c2d500086d113d19b7ca55f927a1
16 URL: http://hackage.haskell.org/package/tagsoup
17 BuildRequires: ghc >= 6.12.3
18 BuildRequires: ghc-base >= 4
19 BuildRequires: ghc-base < 5
20 BuildRequires: ghc-bytestring
21 BuildRequires: ghc-containers
22 BuildRequires: ghc-text
24 BuildRequires: ghc-prof >= 6.12.3
25 BuildRequires: ghc-base-prof >= 4
26 BuildRequires: ghc-base-prof < 5
27 BuildRequires: ghc-bytestring-prof
28 BuildRequires: ghc-containers-prof
29 BuildRequires: ghc-text-prof
31 BuildRequires: rpmbuild(macros) >= 1.608
32 Requires(post,postun): /usr/bin/ghc-pkg
34 Requires: ghc-base >= 4
35 Requires: ghc-base < 5
36 Requires: ghc-bytestring
37 Requires: ghc-containers
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 # debuginfo is not useful for ghc
42 %define _enable_debug_packages 0
44 # don't compress haddock files
45 %define _noautocompressdoc *.haddock
48 TagSoup is a library for parsing HTML/XML. It supports the HTML 5
49 specification, and can be used to parse either well-formed XML, or
50 unstructured and malformed HTML from the web. The library also
51 provides useful functions to extract information from an HTML
52 document, making it ideal for screen-scraping.
54 %description -l pl.UTF-8
55 TagSoup to biblioteka do analizy formatu HTML/XML. Obsługuje
56 specyfikację HTML 5 i może być używana do analizy dobrze
57 sformułowanego XML-a lub niestrukturalnego, źle sformułowanego HTML-a
58 z sieci. Biblioteka udostępnia także przydatne funkcje do wydobywania
59 informacji z dokumentów HTML, co czyni ją idealną do wycinków.
62 Summary: Profiling %{pkgname} library for GHC
63 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
64 Group: Development/Libraries
65 Requires: %{name} = %{version}-%{release}
66 Requires: ghc-base-prof >= 4
67 Requires: ghc-base-prof < 5
68 Requires: ghc-bytestring-prof
69 Requires: ghc-containers-prof
70 Requires: ghc-text-prof
73 Profiling %{pkgname} library for GHC. Should be installed when
74 GHC's profiling subsystem is needed.
76 %description prof -l pl.UTF-8
77 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
78 kiedy potrzebujemy systemu profilującego z GHC.
81 Summary: HTML documentation for ghc %{pkgname} package
82 Summary(pl.UTF-8): Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
86 HTML documentation for ghc %{pkgname} package.
88 %description doc -l pl.UTF-8
89 Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
92 %setup -q -n %{pkgname}-%{version}
95 runhaskell Setup.hs configure -v2 \
96 %{?with_prof:--enable-library-profiling} \
99 --libexecdir=%{_libexecdir} \
100 --docdir=%{_docdir}/%{name}-%{version}
102 runhaskell Setup.hs build
103 runhaskell Setup.hs haddock --executables
106 rm -rf $RPM_BUILD_ROOT
107 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
109 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
111 # work around automatic haddock docs installation
112 %{__rm} -rf %{name}-%{version}-doc
113 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
114 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
116 runhaskell Setup.hs register \
117 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
120 rm -rf $RPM_BUILD_ROOT
129 %defattr(644,root,root,755)
130 %doc CHANGES.txt LICENSE README.md
131 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
132 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
133 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHStagsoup-%{version}-*.so
134 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHStagsoup-%{version}-*.a
135 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHStagsoup-%{version}-*_p.a
136 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text
137 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/StringLike.hi
138 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/StringLike.dyn_hi
139 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/HTML
140 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/HTML/TagSoup.hi
141 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/HTML/TagSoup.dyn_hi
142 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/HTML/TagSoup
143 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/HTML/TagSoup/*.hi
144 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/HTML/TagSoup/*.dyn_hi
149 %defattr(644,root,root,755)
150 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHStagsoup-%{version}-*_p.a
151 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/StringLike.p_hi
152 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/HTML/TagSoup.p_hi
153 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/HTML/TagSoup/*.p_hi
157 %defattr(644,root,root,755)
158 %doc %{name}-%{version}-doc/*