3 %bcond_without prof # profiling library
5 %define pkgname temporary
6 Summary: Portable temporary file and directory support for Windows and Unix
7 Summary(pl.UTF-8): Przenośna obsługa plików i katalogów tymczasowych dla Windows i Uniksa
12 Group: Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/temporary
14 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5: 3f2d619133f19080886b8aa81da7f419
16 URL: http://hackage.haskell.org/package/temporary
17 BuildRequires: ghc >= 6.12.3
18 BuildRequires: ghc-base >= 3
19 BuildRequires: ghc-directory >= 1.0
20 BuildRequires: ghc-filepath >= 1.1
21 BuildRequires: ghc-transformers >= 0.2.0.0
22 BuildRequires: ghc-exceptions >= 0.6
23 BuildRequires: ghc-random >= 1.1
25 BuildRequires: ghc-prof >= 6.12.3
26 BuildRequires: ghc-base-prof >= 3
27 BuildRequires: ghc-directory-prof >= 1.0
28 BuildRequires: ghc-filepath-prof >= 1.1
29 BuildRequires: ghc-transformers-prof >= 0.2.0.0
30 BuildRequires: ghc-exceptions-prof >= 0.6
31 BuildRequires: ghc-random-prof >= 1.1
33 BuildRequires: rpmbuild(macros) >= 1.608
34 Requires(post,postun): /usr/bin/ghc-pkg
36 Requires: ghc-base >= 3
37 Requires: ghc-directory >= 1.0
38 Requires: ghc-filepath >= 1.1
39 Requires: ghc-transformers >= 0.2.0.0
40 Requires: ghc-exceptions >= 0.6
41 Requires: ghc-random >= 1.1
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44 # debuginfo is not useful for ghc
45 %define _enable_debug_packages 0
47 # don't compress haddock files
48 %define _noautocompressdoc *.haddock
51 The functions for creating temporary files and directories in the base
52 library are quite limited. The unixutils package contains some good
53 ones, but they aren't portable to Windows. This library just
54 repackages the Cabal implementations of its own temporary file and
55 folder functions so that you can use them without linking against
56 Cabal or depending on it being installed.
58 %description -l pl.UTF-8
59 Funkcje do tworzenia plików i katalogów tymczasowych w bibliotece
60 podstawowej są nieco ograniczone. Pakiet unixutils zawiera kilka
61 dobrych, ale nie są one przenośne na Windows. Ta biblioteka zawiera
62 przepakietowane implementacje funkcji i katalogów tymczasowych z
63 pakietu Cabal, dzięki czemu można ich używać bez zależności od
67 Summary: Profiling %{pkgname} library for GHC
68 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
69 Group: Development/Libraries
70 Requires: %{name} = %{version}-%{release}
71 Requires: ghc-prof >= 6.12.3
72 Requires: ghc-base-prof >= 3
73 Requires: ghc-directory-prof >= 1.0
74 Requires: ghc-filepath-prof >= 1.1
75 Requires: ghc-transformers-prof >= 0.2.0.0
76 Requires: ghc-exceptions-prof >= 0.6
77 Requires: ghc-random-prof >= 1.1
80 Profiling %{pkgname} library for GHC. Should be installed when
81 GHC's profiling subsystem is needed.
83 %description prof -l pl.UTF-8
84 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
85 kiedy potrzebujemy systemu profilującego z GHC.
88 Summary: HTML documentation for ghc %{pkgname} package
89 Summary(pl.UTF-8): Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
93 HTML documentation for ghc %{pkgname} package.
95 %description doc -l pl.UTF-8
96 Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
99 %setup -q -n %{pkgname}-%{version}
102 runhaskell Setup.lhs configure -v2 \
103 %{?with_prof:--enable-library-profiling} \
104 --prefix=%{_prefix} \
105 --libdir=%{_libdir} \
106 --libexecdir=%{_libexecdir} \
107 --docdir=%{_docdir}/%{name}-%{version}
109 runhaskell Setup.lhs build
110 runhaskell Setup.lhs haddock --executables
113 rm -rf $RPM_BUILD_ROOT
114 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
116 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
118 # work around automatic haddock docs installation
119 %{__rm} -rf %{name}-%{version}-doc
120 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
121 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
123 runhaskell Setup.lhs register \
124 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
127 rm -rf $RPM_BUILD_ROOT
136 %defattr(644,root,root,755)
138 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
139 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
140 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHStemporary-%{version}-*.so
141 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHStemporary-%{version}-*.a
142 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHStemporary-%{version}-*_p.a
143 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System
144 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/IO
145 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/IO/Temp.hi
146 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/IO/Temp.dyn_hi
150 %defattr(644,root,root,755)
151 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHStemporary-%{version}-*_p.a
152 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/IO/Temp.p_hi
156 %defattr(644,root,root,755)
157 %doc %{name}-%{version}-doc/*