]> git.pld-linux.org Git - packages/ghc-mmorph.git/blob - ghc-mmorph.spec
52a6944c038f5e2eea26efaf01a58f008e4da0ca
[packages/ghc-mmorph.git] / ghc-mmorph.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname mmorph
6 Summary:        Monad morphisms
7 Summary(pl.UTF-8):      Morfizm monad
8 Name:           ghc-%{pkgname}
9 Version:        1.0.0
10 Release:        1
11 License:        BSD
12 Group:          Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/mmorph
14 Source0:        http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5:  1fabc154d44b1af97fb03b1b7dac88ae
16 URL:            http://hackage.haskell.org/package/mmorph
17 BuildRequires:  ghc >= 6.12.3
18 BuildRequires:  ghc-base >= 4
19 BuildRequires:  ghc-base < 5
20 BuildRequires:  ghc-transformers >= 0.2.0.0
21 BuildRequires:  ghc-transformers < 0.4
22 %if %{with prof}
23 BuildRequires:  ghc-prof >= 6.12.3
24 BuildRequires:  ghc-base-prof >= 4
25 BuildRequires:  ghc-base-prof < 5
26 BuildRequires:  ghc-transformers-prof >= 0.2.0.0
27 BuildRequires:  ghc-transformers-prof < 0.4
28 %endif
29 BuildRequires:  rpmbuild(macros) >= 1.608
30 Requires(post,postun):  /usr/bin/ghc-pkg
31 %requires_eq    ghc
32 Requires:       ghc-base >= 4
33 Requires:       ghc-base < 5
34 Requires:       ghc-transformers >= 0.2.0.0
35 Requires:       ghc-transformers < 0.4
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 This library provides monad morphism utilities, most commonly used for
46 manipulating monad transformer stacks.
47
48 %description -l pl.UTF-8
49 Ta biblioteka dostarcza narzędzia do morfizmu monad, najczęściej
50 używane do operacji na stosach transformatorów monad.
51
52 %package prof
53 Summary:        Profiling %{pkgname} library for GHC
54 Summary(pl.UTF-8):      Biblioteka profilująca %{pkgname} dla GHC
55 Group:          Development/Libraries
56 Requires:       %{name} = %{version}-%{release}
57 Requires:       ghc-base-prof >= 4
58 Requires:       ghc-base-prof < 5
59 Requires:       ghc-transformers-prof >= 0.2.0.0
60 Requires:       ghc-transformers-prof < 0.4
61
62 %description prof
63 Profiling %{pkgname} library for GHC. Should be installed when
64 GHC's profiling subsystem is needed.
65
66 %description prof -l pl.UTF-8
67 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
68 kiedy potrzebujemy systemu profilującego z GHC.
69
70 %package doc
71 Summary:        HTML documentation for ghc %{pkgname} package
72 Summary(pl.UTF-8):      Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
73 Group:          Documentation
74
75 %description doc
76 HTML documentation for ghc %{pkgname} package.
77
78 %description doc -l pl.UTF-8
79 Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
80
81 %prep
82 %setup -q -n %{pkgname}-%{version}
83
84 %build
85 runhaskell Setup.hs configure -v2 \
86         %{?with_prof:--enable-library-profiling} \
87         --prefix=%{_prefix} \
88         --libdir=%{_libdir} \
89         --libexecdir=%{_libexecdir} \
90         --docdir=%{_docdir}/%{name}-%{version}
91
92 runhaskell Setup.hs build
93 runhaskell Setup.hs haddock --executables
94
95 %install
96 rm -rf $RPM_BUILD_ROOT
97 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
98
99 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
100
101 # work around automatic haddock docs installation
102 %{__rm} -rf %{name}-%{version}-doc
103 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
104 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
105
106 runhaskell Setup.hs register \
107         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
108
109 %clean
110 rm -rf $RPM_BUILD_ROOT
111
112 %post
113 %ghc_pkg_recache
114
115 %postun
116 %ghc_pkg_recache
117
118 %files
119 %defattr(644,root,root,755)
120 %doc LICENSE
121 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
122 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
123 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HSmmorph-%{version}.o
124 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSmmorph-%{version}.a
125 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control
126 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad
127 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Morph.hi
128
129 %if %{with prof}
130 %files prof
131 %defattr(644,root,root,755)
132 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSmmorph-%{version}_p.a
133 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Morph.p_hi
134 %endif
135
136 %files doc
137 %defattr(644,root,root,755)
138 %doc %{name}-%{version}-doc/*
This page took 0.048338 seconds and 2 git commands to generate.