]> git.pld-linux.org Git - SPECS.git/blob - ghc-tagsoup.spec
SPECS updated Tue 30 Apr 15:06:09 CEST 2024
[SPECS.git] / ghc-tagsoup.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
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
8 Name:           ghc-%{pkgname}
9 Version:        0.14.8
10 Release:        2
11 License:        BSD
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
23 %if %{with prof}
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
30 %endif
31 BuildRequires:  rpmbuild(macros) >= 1.608
32 Requires(post,postun):  /usr/bin/ghc-pkg
33 %requires_eq    ghc
34 Requires:       ghc-base >= 4
35 Requires:       ghc-base < 5
36 Requires:       ghc-bytestring
37 Requires:       ghc-containers
38 Requires:       ghc-text
39 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41 # debuginfo is not useful for ghc
42 %define         _enable_debug_packages  0
43
44 # don't compress haddock files
45 %define         _noautocompressdoc      *.haddock
46
47 %description
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.
53
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.
60
61 %package prof
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
71
72 %description prof
73 Profiling %{pkgname} library for GHC. Should be installed when
74 GHC's profiling subsystem is needed.
75
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.
79
80 %package doc
81 Summary:        HTML documentation for ghc %{pkgname} package
82 Summary(pl.UTF-8):      Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
83 Group:          Documentation
84
85 %description doc
86 HTML documentation for ghc %{pkgname} package.
87
88 %description doc -l pl.UTF-8
89 Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
90
91 %prep
92 %setup -q -n %{pkgname}-%{version}
93
94 %build
95 runhaskell Setup.hs configure -v2 \
96         %{?with_prof:--enable-library-profiling} \
97         --prefix=%{_prefix} \
98         --libdir=%{_libdir} \
99         --libexecdir=%{_libexecdir} \
100         --docdir=%{_docdir}/%{name}-%{version}
101
102 runhaskell Setup.hs build
103 runhaskell Setup.hs haddock --executables
104
105 %install
106 rm -rf $RPM_BUILD_ROOT
107 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
108
109 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
110
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}
115
116 runhaskell Setup.hs register \
117         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
118
119 %clean
120 rm -rf $RPM_BUILD_ROOT
121
122 %post
123 %ghc_pkg_recache
124
125 %postun
126 %ghc_pkg_recache
127
128 %files
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
145
146
147 %if %{with prof}
148 %files prof
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
154 %endif
155
156 %files doc
157 %defattr(644,root,root,755)
158 %doc %{name}-%{version}-doc/*
This page took 0.397534 seconds and 3 git commands to generate.