]> git.pld-linux.org Git - packages/ghc-zlib-bindings.git/blob - ghc-zlib-bindings.spec
72073445178b6cfc23ff0c0d508a53742a9a6b8d
[packages/ghc-zlib-bindings.git] / ghc-zlib-bindings.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname zlib-bindings
6 Summary:        Low-level bindings to the zlib package
7 Summary(pl.UTF-8):      Niskopoziomowe wiązania do pakietu zlib
8 Name:           ghc-%{pkgname}
9 Version:        0.1.1.5
10 Release:        1
11 License:        BSD
12 Group:          Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/zlib-bindings
14 Source0:        http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5:  c8c3d5e20a5c46612f0715f777a2823e
16 URL:            http://hackage.haskell.org/package/zlib-bindings
17 BuildRequires:  ghc >= 6.12.3
18 BuildRequires:  ghc-base >= 4
19 BuildRequires:  ghc-bytestring >= 0.9.1.4
20 BuildRequires:  ghc-zlib >= 0.5.2.0
21 %if %{with prof}
22 BuildRequires:  ghc-prof >= 6.12.3
23 BuildRequires:  ghc-base-prof >= 4
24 BuildRequires:  ghc-bytestring-prof >= 0.9.1.4
25 BuildRequires:  ghc-zlib-prof >= 0.5.2.0
26 %endif
27 BuildRequires:  rpmbuild(macros) >= 1.608
28 Requires(post,postun):  /usr/bin/ghc-pkg
29 %requires_eq    ghc
30 Requires:       ghc-base >= 4
31 Requires:       ghc-bytestring >= 0.9.1.4
32 Requires:       ghc-zlib >= 0.5.2.0
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 # debuginfo is not useful for ghc
36 %define         _enable_debug_packages  0
37
38 # don't compress haddock files
39 %define         _noautocompressdoc      *.haddock
40
41 %description
42 Provides necessary functions for producing a streaming interface.
43
44 %description -l pl.UTF-8
45 Ten pakiet dostarcza funkcje niezbędne do tworzenia interfejsu
46 strumieniowego.
47
48 %package prof
49 Summary:        Profiling %{pkgname} library for GHC
50 Summary(pl.UTF-8):      Biblioteka profilująca %{pkgname} dla GHC.
51 Group:          Development/Libraries
52 Requires:       %{name} = %{version}-%{release}
53 Requires:       ghc-base-prof >= 4
54 Requires:       ghc-bytestring-prof >= 0.9.1.4
55 Requires:       ghc-zlib-prof >= 0.5.2.0
56
57 %description prof
58 Profiling %{pkgname} library for GHC. Should be installed when GHC's
59 profiling subsystem is needed.
60
61 %description prof -l pl.UTF-8
62 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
63 kiedy potrzebujemy systemu profilującego z GHC.
64
65 %prep
66 %setup -q -n %{pkgname}-%{version}
67
68 %build
69 runhaskell Setup.lhs configure -v2 \
70         %{?with_prof:--enable-library-profiling} \
71         --prefix=%{_prefix} \
72         --libdir=%{_libdir} \
73         --libexecdir=%{_libexecdir} \
74         --docdir=%{_docdir}/%{name}-%{version}
75
76 runhaskell Setup.lhs build
77 runhaskell Setup.lhs haddock --executables
78
79 %install
80 rm -rf $RPM_BUILD_ROOT
81 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
82
83 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
84
85 # work around automatic haddock docs installation
86 %{__rm} -rf %{name}-%{version}-doc
87 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
88 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
89
90 runhaskell Setup.lhs register \
91         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
92
93 %clean
94 rm -rf $RPM_BUILD_ROOT
95
96 %post
97 %ghc_pkg_recache
98
99 %postun
100 %ghc_pkg_recache
101
102 %files
103 %defattr(644,root,root,755)
104 %doc %{name}-%{version}-doc/*
105 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
106 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
107 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSzlib-bindings-%{version}-*.so
108 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSzlib-bindings-%{version}-*.a
109 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSzlib-bindings-%{version}-*_p.a
110 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec
111 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/*.hi
112 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/*.dyn_hi
113 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Zlib
114 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Zlib/*.hi
115 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Zlib/*.dyn_hi
116
117 %if %{with prof}
118 %files prof
119 %defattr(644,root,root,755)
120 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSzlib-bindings-%{version}-*_p.a
121 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/*.p_hi
122 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Zlib/*.p_hi
123 %endif
This page took 0.056195 seconds and 2 git commands to generate.