ghc-aeson/ghc-aeson.spec

72 lines
2.2 KiB
RPMSpec
Raw Normal View History

%define ghc_ver %(ghc --numeric-version)
%define pkgname aeson
Name: ghc-aeson
Version: 0.7.0.6
Release: 1mamba
Summary: GHC library: Fast JSON parsing and encoding
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://hackage.haskell.org/package/%{pkgname}
Source: http://hackage.haskell.org/packages/archive/aeson-%{version}/aeson-%{version}.tar.gz
License: BSD
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
BuildRequires: ghc
BuildRequires: ghc-blaze-builder
BuildRequires: ghc-dlist
BuildRequires: ghc-attoparsec
BuildRequires: ghc-scientific
#BuildRequires: ghc-text -- provided by haskell-platform
Requires: ghc-blaze-builder
Requires: ghc-dlist
Requires: ghc = %{ghc_ver}
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
A JSON parsing and encoding library optimized for ease of use and high performance.
%prep
%setup -q -n aeson-%{version}
%build
runghc Setup.lhs configure -v2 \
--prefix=%{_prefix} \
--libdir=%{_libdir} \
--libexecdir=%{_libexecdir} \
--docdir=%{_docdir}/%{name}-%{version}
runghc Setup.lhs build
runghc Setup.lhs haddock --executable --html-location=URL --hyperlink-source
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
runghc Setup.lhs copy --destdir=%{buildroot}
runghc Setup.lhs 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
* Sun Apr 12 2015 Davide Madrisan <davide.madrisan@gmail.com> 0.7.0.6-1mamba
- update to 0.7.0.6
* Sun Sep 08 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 0.6.2.0-1mamba
- package created by silvan using the webbuild interface