3 %bcond_without prof # profiling library
5 %define pkgname jira-wiki-markup
6 Summary: Handle Jira wiki markup
11 Group: Development/Languages
12 #Source0Download: http://hackage.haskell.org/package/jira-wiki-markup
13 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14 # Source0-md5: 0e8c20759654d476e246df7d8118c4e8
15 URL: http://hackage.haskell.org/package/jira-wiki-markup
16 BuildRequires: ghc >= 6.12.3
18 BuildRequires: ghc-prof
20 BuildRequires: rpmbuild(macros) >= 1.608
22 Requires(post,postun): /usr/bin/ghc-pkg
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 # debuginfo is not useful for ghc
26 %define _enable_debug_packages 0
28 # don't compress haddock files
29 %define _noautocompressdoc *.haddock
32 Parse jira wiki text into an abstract syntax tree for easy
33 transformation to other formats.
36 Summary: Profiling %{pkgname} library for GHC
37 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
38 Group: Development/Libraries
39 Requires: %{name} = %{version}-%{release}
42 Profiling %{pkgname} library for GHC. Should be installed when
43 GHC's profiling subsystem is needed.
45 %description prof -l pl.UTF-8
46 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
47 kiedy potrzebujemy systemu profilującego z GHC.
50 %setup -q -n %{pkgname}-%{version}
53 #!/usr/bin/env runhaskell
54 > import Distribution.Simple
59 runhaskell Setup.lhs configure -v2 \
60 %{?with_prof:--enable-library-profiling} \
63 --libexecdir=%{_libexecdir} \
64 --docdir=%{_docdir}/%{name}-%{version}
66 runhaskell Setup.lhs build
67 runhaskell Setup.lhs haddock
70 rm -rf $RPM_BUILD_ROOT
71 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
73 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
75 # work around automatic haddock docs installation
76 %{__rm} -rf %{name}-%{version}-doc
77 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
78 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
80 runhaskell Setup.lhs register \
81 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
84 rm -rf $RPM_BUILD_ROOT
93 %defattr(644,root,root,755)
94 %doc CHANGELOG.md README.md %{name}-%{version}-doc/*
95 %attr(755,root,root) %{_bindir}/jira-wiki-markup
96 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
97 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
98 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
99 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
100 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
102 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text
103 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Jira
104 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Jira/*.hi
105 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Jira/*.dyn_hi
106 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Jira/Parser
107 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Jira/Parser/*.hi
108 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Jira/Parser/*.dyn_hi
112 %defattr(644,root,root,755)
113 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
114 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Jira/*.p_hi
115 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Jira/Parser/*.p_hi