%define ghc_ver %(/usr/bin/ghc --numeric-version) %define pkgname zip-archive Name: ghc-zip-archive Version: 0.2.3.7 Release: 1mamba Summary: GHC library and tools for creating and modifying zip archives Group: System/Libraries Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://hackage.haskell.org/package/zip-archive Source: http://hackage.haskell.org/packages/archive/zip-archive/%{version}/zip-archive-%{version}.tar.gz License: BSD ## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-END BuildRequires: ghc BuildRequires: ghc-digest BuildRequires: ghc-utf8-string Requires: ghc = %{ghc_ver} Requires: ghc-digest Requires: ghc-utf8-string BuildRoot: %{_tmppath}/%{name}-%{version}-root %description The zip-archive library provides functions for creating, modifying, and extracting files from zip archives. %prep %setup -q -n %{pkgname}-%{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 --executables --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} %{_datadir}/doc/%{name}-%{version}/LICENSE %{_datadir}/doc/%{name}-%{version}/html %changelog * Sun Apr 12 2015 Davide Madrisan 0.2.3.7-1mamba - update to 0.2.3.7 * Sun Sep 08 2013 Silvan Calarco 0.1.3.4-1mamba - package created by silvan using the webbuild interface