]> git.pld-linux.org Git - packages/ghc-zlib-enum.git/blob - ghc-zlib-enum.spec
6d739ea299e9321617b7e15f5e4d28997b4693cb
[packages/ghc-zlib-enum.git] / ghc-zlib-enum.spec
1 %define         pkgname zlib-enum
2 Summary:        Enumerator interface for zlib compression
3 Name:           ghc-%{pkgname}
4 Version:        0.2.3
5 Release:        1
6 License:        MIT
7 Group:          Development/Languages
8 Source0:        http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz
9 # Source0-md5:  dac776d2e3611187973301edbef9180a
10 URL:            http://hackage.haskell.org/package/PACKAGE_NAME/
11 BuildRequires:  ghc >= 6.12.3
12 BuildRequires:  ghc-prof
13 BuildRequires:  ghc-zlib-bindings
14 BuildRequires:  ghc-zlib-bindings-prof
15 BuildRequires:  rpmbuild(macros) >= 1.608
16 %requires_releq ghc
17 Requires(post,postun):  /usr/bin/ghc-pkg
18 Requires:       ghc-zlib-bindings
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 # debuginfo is not useful for ghc
22 %define         _enable_debug_packages  0
23
24 # don't compress haddoc files
25 %define         _noautocompressdoc      *.haddock
26
27 %description
28 zlib-enum is a stop-gap package to provide enumeratees for zlib
29 compression/decompression.
30
31 %package prof
32 Summary:        Profiling %{pkgname} library for GHC
33 Summary(pl.UTF-8):      Biblioteka profilująca %{pkgname} dla GHC.
34 Group:          Development/Libraries
35 Requires:       %{name} = %{version}-%{release}
36 Requires:       ghc-zlib-bindings-prof
37
38 %description prof
39 Profiling %{pkgname} library for GHC.  Should be installed when
40 GHC's profiling subsystem is needed.
41
42 %description prof -l pl.UTF-8
43 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
44 kiedy potrzebujemy systemu profilującego z GHC.
45
46 %prep
47 %setup -q -n %{pkgname}-%{version}
48
49 %build
50 runhaskell Setup.hs configure -v2 --enable-library-profiling \
51         --prefix=%{_prefix} \
52         --libdir=%{_libdir} \
53         --libexecdir=%{_libexecdir} \
54         --docdir=%{_docdir}/%{name}-%{version}
55
56 runhaskell Setup.hs build
57 runhaskell Setup.hs haddock --executables
58
59 %install
60 rm -rf $RPM_BUILD_ROOT
61 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
62
63 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
64
65 # work around automatic haddock docs installation
66 %{__rm} -rf %{name}-%{version}-doc
67 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
68 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
69
70 runhaskell Setup.hs register \
71         --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
72
73 %clean
74 rm -rf $RPM_BUILD_ROOT
75
76 %post
77 %ghc_pkg_recache
78
79 %postun
80 %ghc_pkg_recache
81
82 %files
83 %defattr(644,root,root,755)
84 %doc %{name}-%{version}-doc/*
85 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
86 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
87 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.o
88 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
89 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
90
91 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec
92 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Zlib
93 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Zlib/*.hi
94
95 %files prof
96 %defattr(644,root,root,755)
97 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
98 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Zlib/*.p_hi
This page took 0.087877 seconds and 2 git commands to generate.