ghc-blaze-html/ghc-blaze-html.spec

74 lines
2.4 KiB
RPMSpec

%define ghc_ver %(ghc --numeric-version)
%define pkgname blaze-html
Name: ghc-blaze-html
Version: 0.9.1.2
Release: 1mamba
Epoch: 1
Summary: GHC library: A blazingly fast HTML combinator library for Haskell
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://hackage.haskell.org/package/%{pkgname}
Source: http://hackage.haskell.org/packages/archive/blaze-html/%{version}/blaze-html-%{version}.tar.gz
License: BSD
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
BuildRequires: ghc
BuildRequires: ghc-blaze-builder
BuildRequires: ghc-blaze-markup
Requires: ghc-blaze-builder
Requires: ghc-blaze-markup
Requires: ghc = %{ghc_ver}
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
A blazingly fast HTML combinator library for the Haskell programming language.
The Text.Blaze module is a good starting point, as well as this tutorial: http://jaspervdj.be/blaze/tutorial.html.
%prep
%setup -q -n blaze-html-%{version}
%build
runghc Setup.hs configure -v3 \
--prefix=%{_prefix} \
--libdir=%{_libdir} \
--libexecdir=%{_libexecdir} \
--docdir=%{_docdir}/%{name}-%{version}
runghc Setup.hs build
runghc Setup.hs haddock --executables --html-location=URL --hyperlink-source
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
runghc Setup.hs copy --destdir=%{buildroot}
runghc Setup.hs register \
--gen-pkg-config="%{buildroot}%{_libdir}/ghc-%{ghc_ver}/%{pkgname}-%{version}/%{pkgname}-%{version}.conf"
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
ghc-pkg register %{_libdir}/ghc-%{ghc_ver}/%{pkgname}-%{version}/%{pkgname}-%{version}.conf &>/dev/null || :
%preun
ghc-pkg unregister %{_libdir}/ghc-%{ghc_ver}/%{pkgname}-%{version}/%{pkgname}-%{version}.conf &>/dev/null || :
%files
%defattr(-,root,root)
%{_libdir}/ghc-%{ghc_ver}/%{pkgname}-%{version}
%dir %{_docdir}/%{name}-%{version}
%{_docdir}/%{name}-%{version}/LICENSE
%{_docdir}/%{name}-%{version}/html
%changelog
* Thu Feb 04 2021 Automatic Build System <autodist@mambasoft.it> 0.9.1.2-1mamba
- automatic version update by autodist
* Sun Apr 12 2015 Davide Madrisan <davide.madrisan@gmail.com> 0.7.1.0-1mamba
- update to 0.7.1.0
* Sun Sep 08 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 0.6.1.1-1mamba
- package created by silvan using the webbuild interface