]> git.pld-linux.org Git - packages/ghc-unix-compat.git/blob - ghc-unix-compat.spec
- sane deps
[packages/ghc-unix-compat.git] / ghc-unix-compat.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname unix-compat
6 Summary:        Portable POSIX-compatibility layer
7 Summary(pl.UTF-8):      Przenośna warstwa zgodności z POSIX
8 Name:           ghc-%{pkgname}
9 Version:        0.4.1.1
10 Release:        3
11 License:        BSD
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
20 %if %{with prof}
21 BuildRequires:  ghc-prof >= 6.12.3
22 BuildRequires:  ghc-unix-prof >= 2.4
23 BuildRequires:  ghc-unix-prof < 2.8
24 %endif
25 BuildRequires:  rpmbuild(macros) >= 1.608
26 %requires_eq    ghc
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)
31
32 # debuginfo is not useful for ghc
33 %define         _enable_debug_packages  0
34
35 # don't compress haddoc files
36 %define         _noautocompressdoc      *.haddock
37
38 %description
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.
42
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.
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-unix-prof >= 2.4
54 Requires:       ghc-unix-prof < 2.8
55
56 %description prof
57 Profiling %{pkgname} library for GHC. Should be installed when GHC's
58 profiling subsystem is needed.
59
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.
63
64 %prep
65 %setup -q -n %{pkgname}-%{version}
66
67 %build
68 runhaskell Setup.lhs configure -v2 \
69         %{?with_prof:--enable-library-profiling} \
70         --prefix=%{_prefix} \
71         --libdir=%{_libdir} \
72         --libexecdir=%{_libexecdir} \
73         --docdir=%{_docdir}/%{name}-%{version}
74
75 runhaskell Setup.lhs build
76 runhaskell Setup.lhs haddock --executables
77
78 %install
79 rm -rf $RPM_BUILD_ROOT
80 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
81
82 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
83
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}
88
89 runhaskell Setup.lhs register \
90         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
91
92 %clean
93 rm -rf $RPM_BUILD_ROOT
94
95 %post
96 %ghc_pkg_recache
97
98 %postun
99 %ghc_pkg_recache
100
101 %files
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
113
114 %files prof
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
This page took 0.051407 seconds and 3 git commands to generate.