]> git.pld-linux.org Git - packages/ghc-dlist.git/blob - ghc-dlist.spec
- up to 0.8.0.8
[packages/ghc-dlist.git] / ghc-dlist.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname dlist
6 Summary:        Differences lists
7 Summary(pl.UTF-8):      Listy różnic
8 Name:           ghc-%{pkgname}
9 Version:        0.8.0.8
10 Release:        1
11 License:        BSD
12 Group:          Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/dlist
14 Source0:        http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5:  2765820965532ac11c4f67d907ca0e63
16 URL:            http://hackage.haskell.org/package/dlist
17 BuildRequires:  ghc >= 6.12.3
18 BuildRequires:  ghc-base >= 2
19 BuildRequires:  ghc-base < 5
20 %if %{with prof}
21 BuildRequires:  ghc-prof >= 6.12.3
22 BuildRequires:  ghc-base-prof >= 2
23 BuildRequires:  ghc-base-prof < 5
24 %endif
25 BuildRequires:  rpmbuild(macros) >= 1.608
26 %requires_eq    ghc
27 Requires:       ghc-base >= 2
28 Requires:       ghc-base < 5
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 # debuginfo is not useful for ghc
32 %define         _enable_debug_packages  0
33
34 # don't compress haddock files
35 %define         _noautocompressdoc      *.haddock
36
37 %description
38 Differences lists: a list-like type supporting O(1) append. This is
39 particularly useful for efficient logging and pretty printing, (e.g.
40 with the Writer monad), where list append quickly becomes too
41 expensive. 
42
43 %description -l pl.UTF-8
44 Listy różnic: typ podobny do listy obsługujący dołączanie O(1). Jest
45 przydatny szczególnie do wydajnego logowania i ładnego wypisywania
46 (np. przy użyciu monady Writer), gdzie dołączanie do zwykłej listy
47 szybko staje się zbyt kosztowne.
48
49 %package prof
50 Summary:        Profiling %{pkgname} library for GHC
51 Summary(pl.UTF-8):      Biblioteka profilująca %{pkgname} dla GHC
52 Group:          Development/Libraries
53 Requires:       %{name} = %{version}-%{release}
54 Requires:       ghc-base-prof >= 2
55 Requires:       ghc-base-prof < 5
56
57 %description prof
58 Profiling %{pkgname} library for GHC. Should be installed when
59 GHC's 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 %package doc
66 Summary:        HTML documentation for ghc %{pkgname} package
67 Summary(pl.UTF-8):      Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
68 Group:          Documentation
69
70 %description doc
71 HTML documentation for ghc %{pkgname} package.
72
73 %description doc -l pl.UTF-8
74 Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
75
76 %prep
77 %setup -q -n %{pkgname}-%{version}
78
79 %build
80 runhaskell Setup.lhs configure -v2 \
81         %{?with_prof:--enable-library-profiling} \
82         --prefix=%{_prefix} \
83         --libdir=%{_libdir} \
84         --libexecdir=%{_libexecdir} \
85         --docdir=%{_docdir}/%{name}-%{version}
86
87 runhaskell Setup.lhs build
88 runhaskell Setup.lhs haddock --executables
89
90 %install
91 rm -rf $RPM_BUILD_ROOT
92 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
93
94 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
95
96 # work around automatic haddock docs installation
97 rm -rf %{name}-%{version}-doc
98 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc
99 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
100
101 runhaskell Setup.lhs register \
102         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
103
104 %clean
105 rm -rf $RPM_BUILD_ROOT
106
107 %post
108 %ghc_pkg_recache
109
110 %postun
111 %ghc_pkg_recache
112
113 %files
114 %defattr(644,root,root,755)
115 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
116 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
117 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSdlist-%{version}-*.so
118 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSdlist-%{version}-*.a
119 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSdlist-%{version}-*_p.a
120 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data
121 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/DList.hi
122 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/DList.dyn_hi
123
124 %if %{with prof}
125 %files prof
126 %defattr(644,root,root,755)
127 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSdlist-%{version}-*_p.a
128 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/DList.p_hi
129 %endif
130
131 %files doc
132 %defattr(644,root,root,755)
133 %doc %{name}-%{version}-doc/*
This page took 0.068333 seconds and 3 git commands to generate.