rpms/cpphs/devel cpphs.spec,1.11,1.12

Jens Petersen petersen at fedoraproject.org
Mon Jan 11 02:53:57 UTC 2010


Author: petersen

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

Modified Files:
	cpphs.spec 
Log Message:
- update to ghc-rpm-macros-0.5.1 and cabal2spec-0.21.1:
- drop doc and prof bcond
- common summary and common_description
- use ghc_binlib_package with license arg




Index: cpphs.spec
===================================================================
RCS file: /cvs/extras/rpms/cpphs/devel/cpphs.spec,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -p -r1.11 -r1.12
--- cpphs.spec	22 Dec 2009 16:45:45 -0000	1.11
+++ cpphs.spec	11 Jan 2010 02:53:57 -0000	1.12
@@ -1,13 +1,24 @@
-%bcond_without doc
-%bcond_without prof
+%global pkg_name cpphs
+
+%global common_summary Haskell library for %{pkg_name}
+
+%global common_description Cpphs is a re-implementation of the C pre-processor that is both more\
+compatible with Haskell, and itself written in Haskell so that it can be\
+distributed with compilers.\
+\
+This version of the C pre-processor is pretty-much feature-complete and\
+compatible with traditional (K&R) pre-processors. Additional features\
+include: a plain-text mode; an option to unlit literate code files; and\
+an option to turn off macro-expansion.
+
 %bcond_without shared
 
-# ghc does not emit debug information
+# debuginfo is not useful for ghc
 %global debug_package %{nil}
 
-Name:           cpphs
+Name:           %{pkg_name}
 Version:        1.9
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        C pre-processor for Haskell
 Group:          Development/Languages
 License:        GPL+ and LGPLv2+
@@ -15,75 +26,21 @@ URL:            http://hackage.haskell.o
 Source0:        http://hackage.haskell.org/packages/archive/%{name}/%{version}/%{name}-%{version}.tar.gz
 # fedora ghc archs:
 ExclusiveArch:  %{ix86} x86_64 ppc alpha
-BuildRequires:  ghc, ghc-rpm-macros >= 0.3.1
-%if %{with doc}
+BuildRequires:  ghc, ghc-rpm-macros >= 0.5.1
 BuildRequires:  ghc-doc
-%endif
-%if %{with prof}
 BuildRequires:  ghc-prof
-%endif
+%{?ghc_pkg_deps:BuildRequires:  %{ghc_pkg_deps}, %(echo %{ghc_pkg_deps} | sed -e "s/\(ghc-[^, ]\+\)-devel/\1-doc,\1-prof/g")}
 
 %description
-Cpphs is a re-implementation of the C pre-processor that is both more
-compatible with Haskell, and itself written in Haskell so that it can be
-distributed with compilers.
-
-This version of the C pre-processor is pretty-much feature-complete and
-compatible with traditional (K&R) pre-processors. Additional features
-include: a plain-text mode; an option to unlit literate code files; and
-an option to turn off macro-expansion.
+%{common_description}
+
+%files
+%defattr(-,root,root,-)
+%doc LICENCE-GPL docs/index.html
+%{_bindir}/%{name}
+
 
-%if %{with shared}
-%package -n ghc-%{name}
-Summary:        Haskell library for %{name}
-Group:          System Environment/Libraries
-License:        LGPLv2+
-
-%description -n ghc-%{name}
-Haskell %{name} library for ghc.
-%endif
-
-
-%package -n ghc-%{name}-devel
-Summary:        Haskell %{name} library development files
-Group:          Development/Libraries
-License:        LGPLv2+
-Requires:       ghc = %{ghc_version}
-Requires(post): ghc = %{ghc_version}
-Requires(postun): ghc = %{ghc_version}
-%if %{with shared}
-Requires:       ghc-%{name} = %{version}-%{release}
-%endif
-
-%description -n ghc-%{name}-devel
-Haskell %{name} library for ghc.
-
-
-%if %{with doc}
-%package -n ghc-%{name}-doc
-Summary:        Documentation for %{name}
-Group:          Development/Libraries
-Requires:       ghc-doc = %{ghc_version}
-Requires(post): 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
-License:        LGPLv2+
-Requires:       ghc-%{name}-devel = %{version}-%{release}
-Requires:       ghc-prof = %{ghc_version}
-
-%description -n ghc-%{name}-prof
-This package contains profiling libraries for %{name}.
-%endif
+%ghc_binlib_package -l LGPLv2+
 
 
 %prep
@@ -92,79 +49,28 @@ This package contains profiling librarie
 
 %build
 # dynamic + prof breaks cabal looking for p_dyn
-%cabal_configure --ghc %{?with_prof:-p}
+%cabal_configure --ghc -p
 %cabal build
-%if %{with doc}
 %cabal haddock
-%endif
 
 
 %install
 %cabal_install
 %cabal_pkg_conf
 
-%ghc_gen_filelists ghc-%{name}
+%ghc_gen_filelists
 
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-
-%post -n ghc-%{name}-devel
-ghc-pkg recache
-
-
-%if %{with doc}
-%post -n ghc-%{name}-doc
-%ghc_reindex_haddock
-%endif
-
-
-%preun -n ghc-%{name}-devel
-ghc-pkg recache
-
-
-%if %{with doc}
-%postun -n ghc-%{name}-doc
-if [ "$1" -eq 0 ] ; then
-  %ghc_reindex_haddock
-fi
-%endif
-
-
-%files
-%defattr(-,root,root,-)
-%doc docs/index.html
-%{_bindir}/%{name}
-
-
-%if %{with shared}
-%files -n ghc-%{name} -f ghc-%{name}.files
-%defattr(-,root,root,-)
-%doc LICENCE-LGPL
-%endif
-
-
-%files -n ghc-%{name}-devel -f ghc-%{name}-devel.files
-%defattr(-,root,root,-)
-%if %{without shared}
-%doc LICENCE-LGPL
-%endif
-
-
-%if %{with doc}
-%files -n ghc-%{name}-doc -f ghc-%{name}-doc.files
-%defattr(-,root,root,-)
-%endif
-
-
-%if %{with prof}
-%files -n ghc-%{name}-prof -f ghc-%{name}-prof.files
-%defattr(-,root,root,-)
-%endif
-
-
 %changelog
+* Mon Jan 11 2010 Jens Petersen <petersen at redhat.com> - 1.9-4
+- update to ghc-rpm-macros-0.5.1 and cabal2spec-0.21.1:
+- drop doc and prof bcond
+- common summary and common_description
+- use ghc_binlib_package with license arg
+
 * Wed Dec 23 2009 Jens Petersen <petersen at redhat.com> - 1.9-3
 - devel package requires shared library not base
 



More information about the scm-commits mailing list