]>
Commit | Line | Data |
---|---|---|
862a403a JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without prof # profiling library | |
4 | # | |
5 | %define pkgname jira-wiki-markup | |
6 | Summary: Handle Jira wiki markup | |
e716ee20 | 7 | Summary(pl.UTF-8): Obsługa znaczników wiki w formacie Jiry |
862a403a JR |
8 | Name: ghc-%{pkgname} |
9 | Version: 1.3.0 | |
0326852d | 10 | Release: 2 |
862a403a JR |
11 | License: MIT |
12 | Group: Development/Languages | |
13 | #Source0Download: http://hackage.haskell.org/package/jira-wiki-markup | |
14 | Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz | |
15 | # Source0-md5: 0e8c20759654d476e246df7d8118c4e8 | |
16 | URL: http://hackage.haskell.org/package/jira-wiki-markup | |
17 | BuildRequires: ghc >= 6.12.3 | |
18 | %if %{with prof} | |
19 | BuildRequires: ghc-prof | |
20 | %endif | |
21 | BuildRequires: rpmbuild(macros) >= 1.608 | |
22 | %requires_eq ghc | |
23 | Requires(post,postun): /usr/bin/ghc-pkg | |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
26 | # debuginfo is not useful for ghc | |
27 | %define _enable_debug_packages 0 | |
28 | ||
29 | # don't compress haddock files | |
30 | %define _noautocompressdoc *.haddock | |
31 | ||
32 | %description | |
e716ee20 | 33 | Parse Jira wiki text into an abstract syntax tree for easy |
862a403a JR |
34 | transformation to other formats. |
35 | ||
e716ee20 JB |
36 | %description -l pl.UTF-8 |
37 | Przetwarzanie tekstu wiki w formacie Jiry do abstrakcyjnego drzewa | |
38 | składniowego w celu łatwego przetwarzania do innych formatów. | |
39 | ||
862a403a JR |
40 | %package prof |
41 | Summary: Profiling %{pkgname} library for GHC | |
42 | Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC | |
43 | Group: Development/Libraries | |
44 | Requires: %{name} = %{version}-%{release} | |
45 | ||
46 | %description prof | |
47 | Profiling %{pkgname} library for GHC. Should be installed when | |
48 | GHC's profiling subsystem is needed. | |
49 | ||
50 | %description prof -l pl.UTF-8 | |
51 | Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana | |
52 | kiedy potrzebujemy systemu profilującego z GHC. | |
53 | ||
54 | %prep | |
55 | %setup -q -n %{pkgname}-%{version} | |
56 | ||
57 | cat >Setup.lhs<<'EOF' | |
58 | #!/usr/bin/env runhaskell | |
59 | > import Distribution.Simple | |
60 | > main = defaultMain | |
61 | EOF | |
62 | ||
63 | %build | |
64 | runhaskell Setup.lhs configure -v2 \ | |
65 | %{?with_prof:--enable-library-profiling} \ | |
66 | --prefix=%{_prefix} \ | |
67 | --libdir=%{_libdir} \ | |
68 | --libexecdir=%{_libexecdir} \ | |
69 | --docdir=%{_docdir}/%{name}-%{version} | |
70 | ||
71 | runhaskell Setup.lhs build | |
72 | runhaskell Setup.lhs haddock | |
73 | ||
74 | %install | |
75 | rm -rf $RPM_BUILD_ROOT | |
76 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
77 | ||
78 | runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT | |
79 | ||
80 | # work around automatic haddock docs installation | |
81 | %{__rm} -rf %{name}-%{version}-doc | |
82 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc | |
83 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
84 | ||
85 | runhaskell Setup.lhs register \ | |
86 | --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
87 | ||
88 | %clean | |
89 | rm -rf $RPM_BUILD_ROOT | |
90 | ||
91 | %post | |
92 | %ghc_pkg_recache | |
93 | ||
94 | %postun | |
95 | %ghc_pkg_recache | |
96 | ||
97 | %files | |
98 | %defattr(644,root,root,755) | |
99 | %doc CHANGELOG.md README.md %{name}-%{version}-doc/* | |
100 | %attr(755,root,root) %{_bindir}/jira-wiki-markup | |
101 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
102 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} | |
e716ee20 | 103 | %attr(755,root,root) %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so |
862a403a JR |
104 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a |
105 | %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a | |
106 | ||
107 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text | |
108 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Jira | |
109 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Jira/*.hi | |
110 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Jira/*.dyn_hi | |
111 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Jira/Parser | |
112 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Jira/Parser/*.hi | |
113 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Jira/Parser/*.dyn_hi | |
114 | ||
115 | %if %{with prof} | |
116 | %files prof | |
117 | %defattr(644,root,root,755) | |
118 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a | |
119 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Jira/*.p_hi | |
120 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Jira/Parser/*.p_hi | |
121 | %endif |