rpms/ghc/devel cabal-binlib-template.spec.in, 1.3, 1.4 cabal-lib-template.spec.in, 1.3, 1.4 ghc.spec, 1.66, 1.67

Jens Petersen petersen at fedoraproject.org
Mon Jan 19 05:40:26 UTC 2009


Author: petersen

Update of /cvs/extras/rpms/ghc/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv27699

Modified Files:
	cabal-binlib-template.spec.in cabal-lib-template.spec.in 
	ghc.spec 
Log Message:
- move spec templates to haskell-packaging for easy updating
- provide correct haddock version

spec templating:
- use bcond for 
- add doc subpackages to lib and binlib templates
- add license header for cabal2spec




Index: cabal-binlib-template.spec.in
===================================================================
RCS file: /cvs/extras/rpms/ghc/devel/cabal-binlib-template.spec.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- cabal-binlib-template.spec.in	5 Dec 2008 09:50:10 -0000	1.3
+++ cabal-binlib-template.spec.in	19 Jan 2009 05:39:55 -0000	1.4
@@ -3,8 +3,8 @@
 %define pkg_libdir %{_libdir}/ghc-%{ghc_version}/%{name}-%{version}
 %define pkg_docdir %{_docdir}/ghc/libraries/%{name}-%{version}
 
-%define build_prof 1
-%define build_doc 1
+%bcond_without prof
+%bcond_without doc
 
 # ghc does not emit debug information
 %define debug_package %{nil}
@@ -15,14 +15,14 @@
 Summary:        *FIXME*
 
 Group:          *FIXME*
-License:        BSD?
+License:        BSD? *FIXME*
 URL:            http://hackage.haskell.org/cgi-bin/hackage-scripts/package/%{name}
 Source0:        http://hackage.haskell.org/packages/archive/%{name}/%{version}/%{name}-%{version}.tar.gz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 # ghc has only been bootstrapped on the following archs:
 ExclusiveArch:  i386 x86_64 ppc
 BuildRequires:  ghc = %{ghc_version}
-%if %{build_prof}
+%if %{with prof}
 BuildRequires:  ghc-prof = %{ghc_version}
 %endif
 
@@ -37,13 +37,24 @@
 Requires:       ghc = %{ghc_version}
 Requires(post): ghc = %{ghc_version}
 Requires(preun): ghc = %{ghc_version}
-Requires(postun): ghc = %{ghc_version}
 
 %description -n ghc-%{name}
 Haskell %{name} library. *FIXME*
 
 
-%if %{build_prof}
+%if %{with doc}
+%package -n ghc-%{name}-doc
+Summary: Documentation for %{name}
+Group: Development/Libraries
+Requires: ghc-doc = %{ghc_version}
+Requires(postun): ghc-doc = %{ghc_version}
+
+%description -n ghc-%{name}-doc
+This package contains development documentation files for the %{name} library.
+%endif
+
+
+%if %{with prof}
 %package -n ghc-%{name}-prof
 Summary: Profiling libraries for %{name}
 Group: Development/Libraries
@@ -60,14 +71,9 @@
 
 
 %build
-%cabal_configure --ghc \
-%if %{build_prof}
-  -p
-%else
-%{nil}
-%endif
+%cabal_configure --ghc %{!?without_prof:-p}
 %cabal build
-%if %{build_doc}
+%if %{with doc}
 %cabal haddock
 %endif
 %ghc_gen_scripts
@@ -86,7 +92,10 @@
 
 %post -n ghc-%{name}
 %ghc_register_pkg
-%if %{build_doc}
+
+
+%if %{with doc}
+%post -n ghc-%{name}-doc
 %ghc_reindex_haddock
 %endif
 
@@ -97,26 +106,32 @@
 fi
 
 
-%postun -n ghc-%{name}
+%if %{with doc}
+%postun -n ghc-%{name}-doc
 if [ "$1" -eq 0 ] ; then
-%if %{build_doc}
   %ghc_reindex_haddock
-%endif
 fi
+%endif
+
 
 %files
 %defattr(-,root,root,-)
 %doc LICENSE
 %{_bindir}/%{name}
 
+
 %files -n ghc-%{name} -f ghc-%{name}.files
 %defattr(-,root,root,-)
-%if %{build_doc}
+
+
+%if %{with doc}
+%files -n ghc-%{name}-doc
+%defattr(-,root,root,-)
 %{pkg_docdir}
 %endif
 
 
-%if %{build_prof}
+%if %{with prof}
 %files -n ghc-%{name}-prof -f ghc-%{name}-prof.files
 %defattr(-,root,root,-)
 %endif


Index: cabal-lib-template.spec.in
===================================================================
RCS file: /cvs/extras/rpms/ghc/devel/cabal-lib-template.spec.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- cabal-lib-template.spec.in	5 Dec 2008 09:50:10 -0000	1.3
+++ cabal-lib-template.spec.in	19 Jan 2009 05:39:55 -0000	1.4
@@ -4,8 +4,8 @@
 %define pkg_libdir %{_libdir}/ghc-%{ghc_version}/%{pkg_name}-%{version}
 %define pkg_docdir %{_docdir}/ghc/libraries/%{pkg_name}-%{version}
 
-%define build_prof 1
-%define build_doc 1
+%bcond_without prof
+%bcond_without doc
 
 # ghc does not emit debug information
 %define debug_package %{nil}
@@ -16,27 +16,39 @@
 Summary:        Haskell %{pkg_name} library *FIXME*
 
 Group:          Development/Libraries
-License:        BSD?
+License:        BSD? *FIXME*
 URL:            http://hackage.haskell.org/cgi-bin/hackage-scripts/package/%{pkg_name}
 Source0:        http://hackage.haskell.org/packages/archive/%{pkg_name}/%{version}/%{pkg_name}-%{version}.tar.gz
-Provides:       %{name}-devel = %{version}-%{release}
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+Provides:       %{name}-devel = %{version}-%{release}
 # ghc has only been bootstrapped on the following archs:
 ExclusiveArch:  i386 x86_64 ppc
 BuildRequires:  ghc = %{ghc_version}
-%if %{build_prof}
+%if %{with prof}
 BuildRequires:  ghc-prof = %{ghc_version}
 %endif
 Requires:       ghc = %{ghc_version}
 Requires(post): ghc = %{ghc_version}
 Requires(preun): ghc = %{ghc_version}
-Requires(postun): ghc = %{ghc_version}
 
 %description
 Haskell %{pkg_name} library for ghc-%{ghc_version}. *FIXME*
 
 
-%if %{build_prof}
+%if %{with doc}
+%package doc
+Summary: Documentation for %{name}
+Group: Development/Libraries
+Requires: ghc-doc = %{ghc_version}
+Requires(postun): ghc-doc = %{ghc_version}
+
+%description doc
+This package contains development documentation files for the %{name} library.
+%endif
+
+
+%if %{with prof}
 %package prof
 Summary: Profiling libraries for %{name}
 Group: Development/Libraries
@@ -53,14 +65,9 @@
 
 
 %build
-%cabal_configure --ghc \
-%if %{build_prof}
-  -p
-%else
-%{nil}
-%endif
+%cabal_configure --ghc %{!?without_prof:-p}
 %cabal build
-%if %{build_doc}
+%if %{with doc}
 %cabal haddock
 %endif
 %ghc_gen_scripts
@@ -77,9 +84,12 @@
 rm -rf $RPM_BUILD_ROOT
 
 
-%post 
+%post
 %ghc_register_pkg
-%if %{build_doc}
+
+
+%if %{with doc}
+%post doc
 %ghc_reindex_haddock
 %endif
 
@@ -90,23 +100,27 @@
 fi
 
 
-%postun
+%if %{with doc}
+%postun doc
 if [ "$1" -eq 0 ] ; then
-%if %{build_doc}
   %ghc_reindex_haddock
-%endif
 fi
+%endif
 
 
 %files -f %{name}.files
 %defattr(-,root,root,-)
 %doc LICENSE
-%if %{build_doc}
+
+
+%if %{with doc}
+%files doc
+%defattr(-,root,root,-)
 %{pkg_docdir}
 %endif
 
 
-%if %{build_prof}
+%if %{with prof}
 %files prof -f %{name}-prof.files
 %defattr(-,root,root,-)
 %endif


Index: ghc.spec
===================================================================
RCS file: /cvs/extras/rpms/ghc/devel/ghc.spec,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -r1.66 -r1.67
--- ghc.spec	5 Dec 2008 09:50:10 -0000	1.66
+++ ghc.spec	19 Jan 2009 05:39:55 -0000	1.67
@@ -25,17 +25,13 @@
 Source0:	http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-src.tar.bz2
 Source1:	http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-src-extralibs.tar.bz2
 Source2:	ghc-rpm-macros.ghc
-Source3:	cabal2spec
-Source4:	cabal-bin-template.spec.in
-Source5:	cabal-lib-template.spec.in
-Source6:	cabal-binlib-template.spec.in
 URL:		http://haskell.org/ghc/
 Requires:	gcc, gmp-devel, libedit-devel
 Requires(post): policycoreutils
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Obsoletes:      ghc682, ghc681, ghc661, ghc66, haddock <= 2.0.0.0
 # introduced for f11 and to be removed for f13:
-Provides:       haddock = 2.2.2
+Provides:       haddock = 2.3.0
 BuildRequires:  ghc, happy, sed
 BuildRequires:  gmp-devel, libedit-devel
 %if %{build_doc}
@@ -131,13 +127,6 @@
 mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm
 cp -p %{SOURCE2} ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm/macros.ghc
 
-# spec templating
-# cabal2spec
-install -m 0755 -p %{SOURCE3} ${RPM_BUILD_ROOT}/%{_bindir}
-# templates for bin, lib and binlib cabal hackages
-mkdir -p ${RPM_BUILD_ROOT}/%{_datadir}/ghc
-cp -p %{SOURCE4} %{SOURCE5} %{SOURCE6} ${RPM_BUILD_ROOT}/%{_datadir}/ghc/
-
 SRC_TOP=$PWD
 rm -f rpm-*-filelist rpm-*.files
 ( cd $RPM_BUILD_ROOT
@@ -203,7 +192,6 @@
 %{_bindir}/*
 %{_sysconfdir}/rpm/macros.ghc
 %config(noreplace) %{_libdir}/ghc-%{version}/package.conf
-%{_datadir}/ghc
 
 %if %{build_prof}
 %files prof -f rpm-prof-filelist
@@ -229,11 +217,9 @@
 %endif
 
 %changelog
-* Fri Dec  5 2008 Jens Petersen <petersen at redhat.com>
-- more template fixes:
-  - version pkg_docdir
-  - put provides in lib subsubpackage
-  - binlib scripts are for lib subpackage
+* Mon Jan 19 2009 Jens Petersen <petersen at redhat.com> - 6.10.1-6
+- move spec templates to a haskell-packaging for easy updating
+- provide correct haddock version
 
 * Mon Dec  1 2008 Jens Petersen <petersen at redhat.com> - 6.10.1-6
 - update macros.ghc to latest proposed revised packaging guidelines:




More information about the fedora-extras-commits mailing list