[packages/ghc-libyaml] - new

baggins baggins at pld-linux.org
Fri May 29 22:37:18 CEST 2020


commit a7fa60f9a688f92a654ea6fd0d45a7770490c370
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Fri May 29 22:37:00 2020 +0200

     - new

 ghc-libyaml.spec | 125 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 125 insertions(+)
---
diff --git a/ghc-libyaml.spec b/ghc-libyaml.spec
new file mode 100644
index 0000000..b6424f7
--- /dev/null
+++ b/ghc-libyaml.spec
@@ -0,0 +1,125 @@
+#
+# Conditional build:
+%bcond_without	prof	# profiling library
+#
+%define		pkgname	libyaml
+Summary:	Low-level, streaming YAML interface
+Name:		ghc-%{pkgname}
+Version:	0.1.2
+Release:	1
+License:	BSD
+Group:		Development/Languages
+#Source0Download: http://hackage.haskell.org/package/libyaml
+Source0:	http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
+# Source0-md5:	330d02162ac413cdc435f69b5b2d1bc6
+URL:		http://hackage.haskell.org/package/libyaml
+BuildRequires:	ghc >= 6.12.3
+BuildRequires:	ghc-base >= 4.9.1
+BuildRequires:	ghc-bytestring >= 0.9.1.4
+BuildRequires:	ghc-conduit >= 1.2.8
+BuildRequires:	ghc-resourcet >= 0.3
+BuildRequires:	yaml-devel
+%if %{with prof}
+BuildRequires:	ghc-prof
+BuildRequires:	ghc-base-prof >= 4.9.1
+BuildRequires:	ghc-bytestring-prof >= 0.9.1.4
+BuildRequires:	ghc-conduit-prof >= 1.2.8
+BuildRequires:	ghc-resourcet-prof >= 0.3
+%endif
+BuildRequires:	rpmbuild(macros) >= 1.608
+%requires_eq	ghc
+Requires(post,postun):	/usr/bin/ghc-pkg
+Requires:	ghc-base >= 4.9.1
+Requires:	ghc-bytestring >= 0.9.1.4
+Requires:	ghc-conduit >= 1.2.8
+Requires:	ghc-resourcet >= 0.3
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+# debuginfo is not useful for ghc
+%define		_enable_debug_packages	0
+
+# don't compress haddock files
+%define		_noautocompressdoc	*.haddock
+
+%description
+This package provides a haskell wrapper over the libyaml C library
+by Kirill Simonov. It contains the C source so you don't need to worry
+about any non-Haskell dependencies.
+
+%package prof
+Summary:	Profiling %{pkgname} library for GHC
+Summary(pl.UTF-8):	Biblioteka profilująca %{pkgname} dla GHC
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+Requires:	ghc-base-prof >= 4.9.1
+Requires:	ghc-bytestring-prof >= 0.9.1.4
+Requires:	ghc-conduit-prof >= 1.2.8
+Requires:	ghc-resourcet-prof >= 0.3
+
+%description prof
+Profiling %{pkgname} library for GHC.  Should be installed when
+GHC's profiling subsystem is needed.
+
+%description prof -l pl.UTF-8
+Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
+kiedy potrzebujemy systemu profilującego z GHC.
+
+%prep
+%setup -q -n %{pkgname}-%{version}
+
+%build
+runhaskell Setup.hs configure -v2 \
+	%{?with_prof:--enable-library-profiling} \
+	--prefix=%{_prefix} \
+	--libdir=%{_libdir} \
+	--libexecdir=%{_libexecdir} \
+	--docdir=%{_docdir}/%{name}-%{version}
+
+runhaskell Setup.hs build
+runhaskell Setup.hs haddock --executables
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
+
+runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
+
+# work around automatic haddock docs installation
+%{__rm} -rf %{name}-%{version}-doc
+cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
+
+runhaskell Setup.hs register \
+	--gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+%ghc_pkg_recache
+
+%postun
+%ghc_pkg_recache
+
+%files
+%defattr(644,root,root,755)
+%doc README.md %{name}-%{version}-doc/*
+%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
+%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
+%exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
+
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.hi
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.dyn_hi
+%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/*.hi
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/*.dyn_hi
+
+%if %{with prof}
+%files prof
+%defattr(644,root,root,755)
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.p_hi
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/*.p_hi
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ghc-libyaml.git/commitdiff/a7fa60f9a688f92a654ea6fd0d45a7770490c370



More information about the pld-cvs-commit mailing list