]> git.pld-linux.org Git - SPECS.git/blob - ghc-nats.spec
SPECS updated Tue 30 Apr 15:06:09 CEST 2024
[SPECS.git] / ghc-nats.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname nats
6 Summary:        Haskell 98 natural numbers
7 Summary(pl.UTF-8):      Liczby naturalne dla Haskella 98
8 Name:           ghc-%{pkgname}
9 Version:        0.1.2
10 Release:        1
11 License:        BSD
12 Group:          Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/nats
14 Source0:        http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5:  86b609392a5272aa0eb4c66d3bbd4172
16 URL:            http://hackage.haskell.org/package/nats
17 BuildRequires:  ghc >= 6.12.3
18 BuildRequires:  ghc-base >= 2
19 BuildRequires:  ghc-base < 10
20 %if %{with prof}
21 BuildRequires:  ghc-prof >= 6.12.3
22 BuildRequires:  ghc-base-prof >= 2
23 BuildRequires:  ghc-base-prof < 10
24 %endif
25 BuildRequires:  rpmbuild(macros) >= 1.608
26 Requires(post,postun):  /usr/bin/ghc-pkg
27 %requires_eq    ghc
28 Requires:       ghc-base >= 2
29 Requires:       ghc-base < 10
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 haddock files
36 %define         _noautocompressdoc      *.haddock
37
38 %description
39 Haskell 98 natural numbers.
40
41 %description -l pl.UTF-8
42 Liczby naturalne dla Haskella 98.
43
44 %package prof
45 Summary:        Profiling %{pkgname} library for GHC
46 Summary(pl.UTF-8):      Biblioteka profilująca %{pkgname} dla GHC
47 Group:          Development/Libraries
48 Requires:       %{name} = %{version}-%{release}
49 Requires:       ghc-base-prof >= 2
50 Requires:       ghc-base-prof < 10
51
52 %description prof
53 Profiling %{pkgname} library for GHC. Should be installed when
54 GHC's profiling subsystem is needed.
55
56 %description prof -l pl.UTF-8
57 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
58 kiedy potrzebujemy systemu profilującego z GHC.
59
60 %package doc
61 Summary:        HTML documentation for ghc %{pkgname} package
62 Summary(pl.UTF-8):      Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
63 Group:          Documentation
64
65 %description doc
66 HTML documentation for ghc %{pkgname} package.
67
68 %description doc -l pl.UTF-8
69 Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
70
71 %prep
72 %setup -q -n %{pkgname}-%{version}
73
74 %build
75 runhaskell Setup.lhs configure -v2 \
76         %{?with_prof:--enable-library-profiling} \
77         --prefix=%{_prefix} \
78         --libdir=%{_libdir} \
79         --libexecdir=%{_libexecdir} \
80         --docdir=%{_docdir}/%{name}-%{version}
81
82 runhaskell Setup.lhs build
83 runhaskell Setup.lhs haddock --executables
84
85 %install
86 rm -rf $RPM_BUILD_ROOT
87 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
88
89 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
90
91 # work around automatic haddock docs installation
92 %{__rm} -rf %{name}-%{version}-doc
93 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
94 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
95
96 runhaskell Setup.lhs register \
97         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
98
99 %clean
100 rm -rf $RPM_BUILD_ROOT
101
102 %post
103 %ghc_pkg_recache
104
105 %postun
106 %ghc_pkg_recache
107
108 %files
109 %defattr(644,root,root,755)
110 %doc CHANGELOG.markdown LICENSE README.markdown
111 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
112 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
113 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HSnats-%{version}.o
114 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSnats-%{version}.a
115 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Numeric
116 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Numeric/Natural.hi
117 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Numeric/Natural
118 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Numeric/Natural/*.hi
119
120 %if %{with prof}
121 %files prof
122 %defattr(644,root,root,755)
123 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSnats-%{version}_p.a
124 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Numeric/Natural.p_hi
125 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Numeric/Natural/*.p_hi
126 %endif
127
128 %files doc
129 %defattr(644,root,root,755)
130 %doc %{name}-%{version}-doc/*
This page took 0.620284 seconds and 3 git commands to generate.