]> git.pld-linux.org Git - packages/ghc-xml.git/blob - ghc-xml.spec
b7f17ac63f248f94e5998128e827c8a24274a16b
[packages/ghc-xml.git] / ghc-xml.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname xml
6 Summary:        A simple XML library
7 Summary(pl.UTF-8):      Prosta biblioteka do XML-a
8 Name:           ghc-%{pkgname}
9 Version:        1.3.13
10 Release:        1
11 License:        BSD
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
22 %if %{with prof}
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
28 %endif
29 BuildRequires:  rpmbuild(macros) >= 1.608
30 Requires(post,postun):  /usr/bin/ghc-pkg
31 %requires_eq    ghc
32 Requires:       ghc-base >= 3
33 Requires:       ghc-base < 5
34 Requires:       ghc-bytestring
35 Requires:       ghc-text
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 # debuginfo is not useful for ghc
39 %define         _enable_debug_packages  0
40
41 # don't compress haddock files
42 %define         _noautocompressdoc      *.haddock
43
44 %description
45 A simple XML library.
46
47 %description -l pl.UTF-8
48 Prosta biblioteka do XML-a.
49
50 %package prof
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
59
60 %description prof
61 Profiling %{pkgname} library for GHC. Should be installed when
62 GHC's profiling subsystem is needed.
63
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.
67
68 %package doc
69 Summary:        HTML documentation for ghc %{pkgname} package
70 Summary(pl.UTF-8):      Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
71 Group:          Documentation
72
73 %description doc
74 HTML documentation for ghc %{pkgname} package.
75
76 %description doc -l pl.UTF-8
77 Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
78
79 %prep
80 %setup -q -n %{pkgname}-%{version}
81
82 %build
83 runhaskell Setup.hs configure -v2 \
84         %{?with_prof:--enable-library-profiling} \
85         --prefix=%{_prefix} \
86         --libdir=%{_libdir} \
87         --libexecdir=%{_libexecdir} \
88         --docdir=%{_docdir}/%{name}-%{version}
89
90 runhaskell Setup.hs build
91 runhaskell Setup.hs haddock --executables
92
93 %install
94 rm -rf $RPM_BUILD_ROOT
95 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
96
97 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
98
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}
103
104 runhaskell Setup.hs register \
105         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
106
107 %clean
108 rm -rf $RPM_BUILD_ROOT
109
110 %post
111 %ghc_pkg_recache
112
113 %postun
114 %ghc_pkg_recache
115
116 %files
117 %defattr(644,root,root,755)
118 %doc LICENSE
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
128
129 %if %{with prof}
130 %files prof
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
135 %endif
136
137 %files doc
138 %defattr(644,root,root,755)
139 %doc %{name}-%{version}-doc/*
This page took 0.072556 seconds and 2 git commands to generate.