%define ghc_ver %(ghc --version | sed "s|.*version ||") %define pkgname %(echo %name | sed "s|^ghc-||") Name: ghc-citeproc-hs Version: 0.3.10 Release: 1mamba Summary: A library for rendering bibliographic reference citations into a variety of styles Group: System/Libraries Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://hackage.haskell.org/package/%{pkgname} Source: http://hackage.haskell.org/packages/archive/citeproc-hs/%{version}/citeproc-hs-%{version}.tar.gz Patch0: ghc-citeproc-hs-0.3.10-build.patch License: BSD ## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-END BuildRequires: ghc BuildRequires: ghc-pandoc-types BuildRequires: ghc-json BuildRequires: ghc-hexpat Requires: ghc = %{ghc_ver} Requires: ghc-json Requires: ghc-hexpat BuildRoot: %{_tmppath}/%{name}-%{version}-root %description citeproc-hs is a library for rendering bibliographic reference citations into a variety of styles using a macro language called Citation Style Language (CSL). More details on CSL can be found here: http://citationstyles.org/. %prep %setup -q -n citeproc-hs-%{version} %patch0 -p1 %build runghc Setup.lhs configure \ --prefix=%{_prefix} --libdir=%{_libdir} runghc Setup.lhs build %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 if [ $1 -ge 1 ]; then ghc-pkg register %{_libdir}/ghc-%{ghc_ver}/%{pkgname}-%{version}/%{pkgname}-%{version}.conf &>/dev/null || true fi : %preun if [ $1 -eq 0 ]; then ghc-pkg unregister %{_libdir}/ghc-%{ghc_ver}/%{pkgname}-%{version}/%{pkgname}-%{version}.conf &>/dev/null || true fi : %files %defattr(-,root,root) %dir %{_libdir}/ghc-%{ghc_ver}/%{pkgname}-%{version} %{_libdir}/ghc-%{ghc_ver}/%{pkgname}-%{version}/* %{_datadir}/doc/%{pkgname}-%{version}/LICENSE %{_datadir}/citeproc-hs-%{version}/locales/locales-*.xml %changelog * Mon Apr 20 2015 Silvan Calarco 0.3.10-1mamba - update to 0.3.10 * Sun Sep 08 2013 Silvan Calarco 0.3.8-1mamba - package created by silvan using the webbuild interface