ghc-scientific/ghc-scientific.spec

66 lines
2.0 KiB
RPMSpec
Raw Permalink Normal View History

%define ghc_ver %(/usr/bin/ghc --numeric-version)
%define pkgname scientific
Name: ghc-scientific
Version: 0.3.3.8
Release: 1mamba
Summary: GHC scientific library: Numbers represented using scientific notation
Group: Development/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Davide Madrisan <davide.madrisan@gmail.com>
URL: http://hackage.haskell.org/package/%{pkgname}
Source: http://hackage.haskell.org/package/scientific-%{version}/scientific-%{version}.tar.gz
License: BSD
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
BuildRequires: ghc
BuildRequires: hscolour
BuildRequires: libgmp-devel
#BuildRequires: ghc-hashable -- hashable-1.1.2.5 provided by haskell-platform
#BuildRequires: ghc-text -- text-0.11.3.1 haskell-platform
Requires: ghc = %{ghc_ver}
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
GHC scientific library: Numbers represented using scientific notation.
%prep
%setup -q -n scientific-%{version}
%build
runghc Setup.hs configure -v2 \
--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 %{pkgname}-%{version} &>/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.3.3.8-1mamba
- package created by autospec