]> git.pld-linux.org Git - packages/ghc-HUnit.git/blob - ghc-HUnit.spec
rebuild with ghc 8.10.7
[packages/ghc-HUnit.git] / ghc-HUnit.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname HUnit
6 Summary:        A unit testing framework for Haskell
7 Summary(pl.UTF-8):      Szkielet testów jednostkowych dla Haskella
8 Name:           ghc-%{pkgname}
9 Version:        1.6.0.0
10 Release:        2
11 License:        BSD
12 Group:          Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/HUnit
14 Source0:        http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5:  4c7fbdab4e57eef5776640a3f97d10ce
16 URL:            http://hackage.haskell.org/package/HUnit
17 BuildRequires:  ghc >= 6.12.3
18 BuildRequires:  ghc-base >= 3
19 BuildRequires:  ghc-call-stack
20 BuildRequires:  ghc-deepseq
21 %if %{with prof}
22 BuildRequires:  ghc-prof >= 6.12.3
23 BuildRequires:  ghc-base-prof >= 3
24 BuildRequires:  ghc-call-stack-prof
25 BuildRequires:  ghc-deepseq-prof
26 %endif
27 BuildRequires:  rpmbuild(macros) >= 1.608
28 Requires(post,postun):  /usr/bin/ghc-pkg
29 %requires_eq    ghc
30 Requires:       ghc-base >= 3
31 Requires:       ghc-call-stack
32 Requires:       ghc-deepseq
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 # debuginfo is not useful for ghc
36 %define         _enable_debug_packages  0
37
38 # don't compress haddock files
39 %define         _noautocompressdoc      *.haddock
40
41 %description
42 HUnit is a unit testing framework for Haskell, inspired by the JUnit
43 tool for Java, see: <http://www.junit.org/>.
44
45 %description -l pl.UTF-8
46 HUnit to szkielet testów jednostkowych dla Haskella, zainspirowany
47 narzędziem JUnit dla Javy, p. <http://www.junit.org/>.
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 >= 3
55 Requires:       ghc-call-stack-prof
56 Requires:       ghc-deepseq-prof
57
58 %description prof
59 Profiling %{pkgname} library for GHC. Should be installed when GHC's
60 profiling subsystem is needed.
61
62 %description prof -l pl.UTF-8
63 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
64 kiedy potrzebujemy systemu profilującego z GHC.
65
66 %package doc
67 Summary:        HTML documentation for ghc %{pkgname} package
68 Summary(pl.UTF-8):      Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
69 Group:          Documentation
70
71 %description doc
72 HTML documentation for ghc %{pkgname} package.
73
74 %description doc -l pl.UTF-8
75 Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
76
77 %prep
78 %setup -q -n %{pkgname}-%{version}
79
80 %build
81 runhaskell Setup.lhs configure -v2 \
82         %{?with_prof:--enable-library-profiling} \
83         --prefix=%{_prefix} \
84         --libdir=%{_libdir} \
85         --libexecdir=%{_libexecdir} \
86         --docdir=%{_docdir}/%{name}-%{version}
87
88 runhaskell Setup.lhs build
89 runhaskell Setup.lhs haddock --executables
90
91 %install
92 rm -rf $RPM_BUILD_ROOT
93 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
94
95 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
96
97 # work around automatic haddock docs installation
98 %{__rm} -rf %{name}-%{version}-doc
99 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
100 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
101
102 runhaskell Setup.lhs register \
103         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
104
105 %clean
106 rm -rf $RPM_BUILD_ROOT
107
108 %post
109 %ghc_pkg_recache
110
111 %postun
112 %ghc_pkg_recache
113
114 %files
115 %defattr(644,root,root,755)
116 %doc CHANGELOG.md LICENSE README.md
117 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
118 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
119 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSHUnit-%{version}-*.so
120 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSHUnit-%{version}-*.a
121 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSHUnit-%{version}-*_p.a
122 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.hi
123 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.dyn_hi
124 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Test
125 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Test/*.hi
126 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Test/*.dyn_hi
127 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Test/HUnit
128 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Test/HUnit/*.hi
129 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Test/HUnit/*.dyn_hi
130
131 %if %{with prof}
132 %files prof
133 %defattr(644,root,root,755)
134 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSHUnit-%{version}-*_p.a
135 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.p_hi
136 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Test/*.p_hi
137 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Test/HUnit/*.p_hi
138 %endif
139
140 %files doc
141 %defattr(644,root,root,755)
142 %doc %{name}-%{version}-doc/*
This page took 0.071503 seconds and 3 git commands to generate.