[packages/ghc-xml] - new

qboosh qboosh at pld-linux.org
Fri Dec 20 21:17:13 CET 2013


commit a9cc65476c28f0ea71051c2da3a99c0f4f07860b
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Dec 20 21:17:07 2013 +0100

    - new

 ghc-xml.spec | 139 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 139 insertions(+)
---
diff --git a/ghc-xml.spec b/ghc-xml.spec
new file mode 100644
index 0000000..b7f17ac
--- /dev/null
+++ b/ghc-xml.spec
@@ -0,0 +1,139 @@
+#
+# Conditional build:
+%bcond_without	prof	# profiling library
+#
+%define		pkgname	xml
+Summary:	A simple XML library
+Summary(pl.UTF-8):	Prosta biblioteka do XML-a
+Name:		ghc-%{pkgname}
+Version:	1.3.13
+Release:	1
+License:	BSD
+Group:		Development/Languages
+#Source0Download: http://hackage.haskell.org/package/xml
+Source0:	http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
+# Source0-md5:	17823634f69305e8d4cc99b22934a78c
+URL:		http://hackage.haskell.org/package/xml
+BuildRequires:	ghc >= 6.12.3
+BuildRequires:	ghc-base >= 3
+BuildRequires:	ghc-base < 5
+BuildRequires:	ghc-bytestring
+BuildRequires:	ghc-text
+%if %{with prof}
+BuildRequires:	ghc-prof >= 6.12.3
+BuildRequires:	ghc-base-prof >= 3
+BuildRequires:	ghc-base-prof < 5
+BuildRequires:	ghc-bytestring-prof
+BuildRequires:	ghc-text-prof
+%endif
+BuildRequires:	rpmbuild(macros) >= 1.608
+Requires(post,postun):	/usr/bin/ghc-pkg
+%requires_eq	ghc
+Requires:	ghc-base >= 3
+Requires:	ghc-base < 5
+Requires:	ghc-bytestring
+Requires:	ghc-text
+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
+A simple XML library.
+
+%description -l pl.UTF-8
+Prosta biblioteka do XML-a.
+
+%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 >= 3
+Requires:	ghc-base-prof < 5
+Requires:	ghc-bytestring-prof
+Requires:	ghc-text-prof
+
+%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.
+
+%package doc
+Summary:	HTML documentation for ghc %{pkgname} package
+Summary(pl.UTF-8):	Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
+Group:		Documentation
+
+%description doc
+HTML documentation for ghc %{pkgname} package.
+
+%description doc -l pl.UTF-8
+Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
+
+%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 LICENSE
+%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
+%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HSxml-%{version}.o
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSxml-%{version}.a
+%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text
+%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/XML
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/XML/Light.hi
+%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/XML/Light
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/XML/Light/*.hi
+
+%if %{with prof}
+%files prof
+%defattr(644,root,root,755)
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSxml-%{version}_p.a
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/XML/Light.p_hi
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/XML/Light/*.p_hi
+%endif
+
+%files doc
+%defattr(644,root,root,755)
+%doc %{name}-%{version}-doc/*
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ghc-xml.git/commitdiff/a9cc65476c28f0ea71051c2da3a99c0f4f07860b



More information about the pld-cvs-commit mailing list