]> git.pld-linux.org Git - packages/ghc-hxt.git/blame - ghc-hxt.spec
rebuild with ghc 8.10.7
[packages/ghc-hxt.git] / ghc-hxt.spec
CommitLineData
13c8b5c8
JR
1#
2# Conditional build:
3%bcond_without prof # profiling library
4#
5%define pkgname hxt
6Summary: A collection of tools for processing XML with Haskell
7Name: ghc-%{pkgname}
8Version: 9.3.1.18
61d86e04 9Release: 2
13c8b5c8
JR
10License: MIT
11Group: Development/Languages
12#Source0Download: http://hackage.haskell.org/package/hxt
13Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14# Source0-md5: fc58dede9d9df529486d91d015bfec63
15URL: http://hackage.haskell.org/package/hxt
16BuildRequires: ghc >= 6.12.3
17BuildRequires: ghc-hxt-charproperties >= 9.1
18BuildRequires: ghc-hxt-regex-xmlschema >= 9.2
19BuildRequires: ghc-hxt-unicode >= 9.0.1
20BuildRequires: ghc-network >= 2.4
21BuildRequires: ghc-network-uri >= 2.6
22%if %{with prof}
23BuildRequires: ghc-prof
24BuildRequires: ghc-hxt-charproperties-prof >= 9.1
25BuildRequires: ghc-hxt-regex-xmlschema-prof >= 9.2
26BuildRequires: ghc-hxt-unicode-prof >= 9.0.1
27BuildRequires: ghc-network-prof >= 2.4
28BuildRequires: ghc-network-uri-prof >= 2.6
29%endif
30BuildRequires: rpmbuild(macros) >= 1.608
31%requires_eq ghc
32Requires(post,postun): /usr/bin/ghc-pkg
33Requires: ghc-hxt-charproperties >= 9.1
34Requires: ghc-hxt-regex-xmlschema >= 9.2
35Requires: ghc-hxt-unicode >= 9.0.1
36Requires: ghc-network >= 2.4
37Requires: ghc-network-uri >= 2.6
38BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40# debuginfo is not useful for ghc
41%define _enable_debug_packages 0
42
43# don't compress haddock files
44%define _noautocompressdoc *.haddock
45
46%description
47The Haskell XML Toolbox bases on the ideas of HaXml and HXML, but
48introduces a more general approach for processing XML with Haskell.
49The Haskell XML Toolbox uses a generic data model for representing XML
50documents, including the DTD subset and the document subset, in
51Haskell. It contains a validating XML parser, a HTML parser, namespace
52support, an XPath expression evaluator, an XSLT library, a RelaxNG
53schema validator and funtions for serialization and deserialization
54of user defined data. The library makes extensive use of the arrow
55approach for processing XML.
56
57%package prof
58Summary: Profiling %{pkgname} library for GHC
59Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
60Group: Development/Libraries
61Requires: %{name} = %{version}-%{release}
62Requires: ghc-hxt-charproperties-prof >= 9.1
63Requires: ghc-hxt-regex-xmlschema-prof >= 9.2
64Requires: ghc-hxt-unicode-prof >= 9.0.1
65Requires: ghc-network-prof >= 2.4
66Requires: ghc-network-uri-prof >= 2.6
67
68%description prof
69Profiling %{pkgname} library for GHC. Should be installed when
70GHC's profiling subsystem is needed.
71
72%description prof -l pl.UTF-8
73Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
74kiedy potrzebujemy systemu profilującego z GHC.
75
76%prep
77%setup -q -n %{pkgname}-%{version}
78
79%build
80runhaskell Setup.lhs configure -v2 \
81 %{?with_prof:--enable-library-profiling} \
82 --prefix=%{_prefix} \
83 --libdir=%{_libdir} \
84 --libexecdir=%{_libexecdir} \
85 --docdir=%{_docdir}/%{name}-%{version}
86
87runhaskell Setup.lhs build
88runhaskell Setup.lhs haddock --executables
89
90%install
91rm -rf $RPM_BUILD_ROOT
92install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
93
94runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
95
96# work around automatic haddock docs installation
97%{__rm} -rf %{name}-%{version}-doc
98cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
99%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
100
101runhaskell Setup.lhs register \
102 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
103
104find $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/%{pkgname}-%{version} -type d | %{__sed} "s|$RPM_BUILD_ROOT|%dir |" > %{name}.files
105find $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/%{pkgname}-%{version} -name '*.hi' | %{__sed} "s|$RPM_BUILD_ROOT||" >> %{name}.files
106find $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/%{pkgname}-%{version} -name '*.dyn_hi' | %{__sed} "s|$RPM_BUILD_ROOT||" >> %{name}.files
107find $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/%{pkgname}-%{version} -name '*.p_hi' | %{__sed} "s|$RPM_BUILD_ROOT||" > %{name}-prof.files
108
109%clean
110rm -rf $RPM_BUILD_ROOT
111
112%post
113%ghc_pkg_recache
114
115%postun
116%ghc_pkg_recache
117
118%files -f %{name}.files
119%defattr(644,root,root,755)
120%doc %{name}-%{version}-doc/*
121%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
122%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
123%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
124%exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
125
126%if %{with prof}
127%files prof -f %{name}-prof.files
128%defattr(644,root,root,755)
129%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
130%endif
This page took 0.160126 seconds and 4 git commands to generate.