diff --git a/README.md b/README.md index ede5afa..556b3cf 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # ghc-scientific +GHC scientific library: Numbers represented using scientific notation. + diff --git a/ghc-scientific.spec b/ghc-scientific.spec new file mode 100644 index 0000000..41ac86e --- /dev/null +++ b/ghc-scientific.spec @@ -0,0 +1,65 @@ +%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 +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 0.3.3.8-1mamba +- package created by autospec