]> git.pld-linux.org Git - packages/ghc-extensible-exceptions.git/blob - ghc-extensible-exceptions.spec
670cf2f9305ed9f0c8ba063c2547bfcf507c17ba
[packages/ghc-extensible-exceptions.git] / ghc-extensible-exceptions.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname extensible-exceptions
6 Summary:        Extensible exceptions
7 Summary(pl.UTF-8):      Rozszerzalne wyjątki
8 Name:           ghc-%{pkgname}
9 Version:        0.1.1.4
10 Release:        2
11 License:        BSD
12 Group:          Development/Languages
13 #SourceDownload: http://hackage.haskell.org/package/extensible-exceptions
14 Source0:        http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5:  fa1cadd15c1c7aa362618d41c6e17d8b
16 URL:            http://hackage.haskell.org/package/extensible-exceptions
17 BuildRequires:  ghc >= 6.12.3
18 BuildRequires:  ghc-base < 5
19 %if %{with prof}
20 BuildRequires:  ghc-prof >= 6.12.3
21 BuildRequires:  ghc-base-prof < 5
22 %endif
23 BuildRequires:  rpmbuild(macros) >= 1.608
24 %requires_eq    ghc
25 Requires:       ghc-base < 5
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 # debuginfo is not useful for ghc
29 %define         _enable_debug_packages  0
30
31 # don't compress haddock files
32 %define         _noautocompressdoc      *.haddock
33
34 %description
35 This package provides extensible exceptions for both new and old
36 versions of GHC (i.e., < 6.10).
37
38 %description -l pl.UTF-8
39 Ten pakiet udostępnia rozszerzalne wyjątki, zarówno dla nowych, jak i
40 starych (tj. < 6.10) wersji GHC.
41
42 %package prof
43 Summary:        Profiling %{pkgname} library for GHC
44 Summary(pl.UTF-8):      Biblioteka profilująca %{pkgname} dla GHC.
45 Group:          Development/Libraries
46 Requires:       %{name} = %{version}-%{release}
47 Requires:       ghc-base-prof < 5
48
49 %description prof
50 Profiling %{pkgname} library for GHC.  Should be installed when
51 GHC's profiling subsystem is needed.
52
53 %description prof -l pl.UTF-8
54 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
55 kiedy potrzebujemy systemu profilującego z GHC.
56
57 %package doc
58 Summary:        HTML documentation for ghc %{pkgname} package
59 Summary(pl.UTF-8):      Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
60 Group:          Documentation
61
62 %description doc
63 HTML documentation for ghc %{pkgname} package.
64
65 %description doc -l pl.UTF-8
66 Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
67
68 %prep
69 %setup -q -n %{pkgname}-%{version}
70
71 %build
72 runhaskell Setup.hs configure -v2 \
73         %{?with_prof:--enable-library-profiling} \
74         --prefix=%{_prefix} \
75         --libdir=%{_libdir} \
76         --libexecdir=%{_libexecdir} \
77         --docdir=%{_docdir}/%{name}-%{version}
78
79 runhaskell Setup.hs build
80 runhaskell Setup.hs haddock --executables
81
82 %install
83 rm -rf $RPM_BUILD_ROOT
84 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
85
86 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
87
88 # work around automatic haddock docs installation
89 %{__rm} -rf %{name}-%{version}-doc
90 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc
91 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
92
93 runhaskell Setup.hs register \
94         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
95
96 %clean
97 rm -rf $RPM_BUILD_ROOT
98
99 %post
100 %ghc_pkg_recache
101
102 %postun
103 %ghc_pkg_recache
104
105 %files
106 %defattr(644,root,root,755)
107 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
108 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
109 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HSextensible-exceptions-%{version}.o
110 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSextensible-exceptions-%{version}.a
111 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control
112 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Exception
113 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Exception/*.hi
114
115 %if %{with prof}
116 %files prof
117 %defattr(644,root,root,755)
118 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSextensible-exceptions-%{version}_p.a
119 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Exception/*.p_hi
120 %endif
121
122 %files doc
123 %defattr(644,root,root,755)
124 %doc %{name}-%{version}-doc/*
This page took 0.098526 seconds and 2 git commands to generate.