3 %bcond_without prof # profiling library
5 %define pkgname unix-compat
6 Summary: Portable POSIX-compatibility layer
7 Summary(pl.UTF-8): Przenośna warstwa zgodności z POSIX
12 Group: Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/unix-compat
14 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5: 41dae7a35895cc7a289d14d98287ce4a
16 URL: http://hackage.haskell.org/package/unix-compat
17 BuildRequires: ghc >= 6.12.3
18 BuildRequires: ghc-unix >= 2.4
19 BuildRequires: ghc-unix < 2.8
21 BuildRequires: ghc-prof >= 6.12.3
22 BuildRequires: ghc-unix-prof >= 2.4
23 BuildRequires: ghc-unix-prof < 2.8
25 BuildRequires: rpmbuild(macros) >= 1.608
27 Requires(post,postun): /usr/bin/ghc-pkg
28 Requires: ghc-unix >= 2.4
29 Requires: ghc-unix < 2.8
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 # debuginfo is not useful for ghc
33 %define _enable_debug_packages 0
35 # don't compress haddoc files
36 %define _noautocompressdoc *.haddock
39 This package provides portable implementations of parts of the unix
40 package. This package re-exports the unix package when available.
41 When it isn't available, portable implementations are used.
43 %description -l pl.UTF-8
44 Ten pakiet dostarcza przenośne implementacje części pakietu unix. O
45 ile to możliwe, reeksportuje pakiet unix. Jeśli nie jest on dostępny,
46 używane są przenośne implementacje.
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-unix-prof >= 2.4
54 Requires: ghc-unix-prof < 2.8
57 Profiling %{pkgname} library for GHC. Should be installed when GHC's
58 profiling subsystem is needed.
60 %description prof -l pl.UTF-8
61 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
62 kiedy potrzebujemy systemu profilującego z GHC.
65 %setup -q -n %{pkgname}-%{version}
68 runhaskell Setup.lhs configure -v2 \
69 %{?with_prof:--enable-library-profiling} \
72 --libexecdir=%{_libexecdir} \
73 --docdir=%{_docdir}/%{name}-%{version}
75 runhaskell Setup.lhs build
76 runhaskell Setup.lhs haddock --executables
79 rm -rf $RPM_BUILD_ROOT
80 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
82 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
84 # work around automatic haddock docs installation
85 %{__rm} -rf %{name}-%{version}-doc
86 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
87 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
89 runhaskell Setup.lhs register \
90 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
93 rm -rf $RPM_BUILD_ROOT
102 %defattr(644,root,root,755)
103 %doc %{name}-%{version}-doc/*
104 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
105 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
106 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HSunix-compat-%{version}.o
107 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSunix-compat-%{version}.a
108 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/include
109 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System
110 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/*.hi
111 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/PosixCompat
112 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/PosixCompat/*.hi
115 %defattr(644,root,root,755)
116 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSunix-compat-%{version}_p.a
117 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/*.p_hi
118 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/PosixCompat/*.p_hi