rpms/ghc-rpm-macros/devel ghc-rpm-macros.ghc, 1.26, 1.27 ghc-rpm-macros.spec, 1.29, 1.30

Jens Petersen petersen at fedoraproject.org
Thu Jul 15 14:43:34 UTC 2010


Author: petersen

Update of /cvs/pkgs/rpms/ghc-rpm-macros/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv11537

Modified Files:
	ghc-rpm-macros.ghc ghc-rpm-macros.spec 
Log Message:
merge -doc into -devel and provide -o obsoletes doc subpackage option


Index: ghc-rpm-macros.ghc
===================================================================
RCS file: /cvs/pkgs/rpms/ghc-rpm-macros/devel/ghc-rpm-macros.ghc,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -p -r1.26 -r1.27
--- ghc-rpm-macros.ghc	28 Jun 2010 07:33:21 -0000	1.26
+++ ghc-rpm-macros.ghc	15 Jul 2010 14:43:34 -0000	1.27
@@ -22,7 +22,7 @@
 pkgname=%{?1}%{!?1:%{pkg_name}} \
 basefile=ghc-${pkgname} \
 pkgnamever=${pkgname}-%{version} \
-rm -f ${basefile}.files ${basefile}-devel.files ${basefile}-prof.files ${basefile}-doc.files \
+rm -f ${basefile}.files ${basefile}-devel.files ${basefile}-prof.files \
 echo "%defattr(-,root,root,-)" > ${basefile}.files \
 if [ -d "${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}" ]; then \
   %{!?1:echo "%{_docdir}/%{name}-%{version}" >> ${basefile}%{!?with_shared:-devel}.files} %{?1::} \
@@ -43,9 +43,8 @@ echo "%defattr(-,root,root,-)" > ${basef
 if [ -d "${RPM_BUILD_ROOT}%{ghcpkgdir}" ]; then \
 find ${RPM_BUILD_ROOT}%{ghcpkgdir} \\( -name "*_p.a" -o -name "*.p_hi" \\) >> ${basefile}-prof.files \
 fi \
-echo "%defattr(-,root,root,-)" > ${basefile}-doc.files \
 if [ -d "${RPM_BUILD_ROOT}%{ghcdocdir}" ]; then \
-echo "%{ghcdocdir}" >> ${basefile}-doc.files \
+echo "%{ghcdocdir}" >> ${basefile}-devel.files \
 fi \
 sed -i -e "s!${RPM_BUILD_ROOT}!!g" ${basefile}.files ${basefile}-devel.files ${basefile}-prof.files \
 %{nil}
@@ -77,8 +76,8 @@ Requires(postun): ghc-doc = %{ghc_versio
 %ghc_prof_requires Requires:       ghc-prof = %{ghc_version}\
 Requires:       ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}}-devel = %{-v:%{-v*}}%{!-v:%{version}}-%{release}
 
-# ghc_lib_package [-n pkgname] [-c cdepslist] [-h pkgdepslist]
-%ghc_lib_package(n:c:h:)\
+# ghc_lib_package [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-o obsolete-docver]
+%ghc_lib_package(n:c:h:o:)\
 %define ghc_pkg_name %{-n:ghc-%{-n*}}%{!-n:ghc-%{pkg_name}}\
 %if %{with shared}\
 %files -n %{ghc_pkg_name} -f %{ghc_pkg_name}.files\
@@ -87,13 +86,11 @@ Requires:       ghc-%{-n:%{-n*}}%{!-n:%{
 \
 %ghc_package_devel\
 \
-%ghc_package_doc\
-\
 %ghc_package_prof\
 %{nil}
 
-# ghc_binlib_package [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-v version]
-%ghc_binlib_package(n:c:h:l:v:)\
+# ghc_binlib_package [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-v version] [-o obsolete-docver]
+%ghc_binlib_package(n:c:h:l:v:o:)\
 %define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\
 %define ghc_pkg_name ghc-%{local_pkg_name}\
 %package -n %{ghc_pkg_name}\
@@ -112,8 +109,11 @@ This package provides the shared library
 
 %ghc_pkg_recache %{_bindir}/ghc-pkg recache --no-user-package-conf || :
 
-# ghc_package_devel [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-v version]
-%ghc_package_devel(n:c:h:l:v:)\
+# for docs post and postun
+%ghc_reindex_haddock ( cd %{ghcdocbasedir}/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index ) || :
+
+# ghc_package_devel [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-v version] [-o obsolete-docver]
+%ghc_package_devel(n:c:h:l:v:o:)\
 %define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\
 %define ghc_pkg_name ghc-%{local_pkg_name}\
 %package -n %{ghc_pkg_name}-devel\
@@ -122,10 +122,13 @@ Group:          Development/Libraries\
 %{-v:Version:        %{-v*}}\
 %{-l:License:        %{-l*}}\
 %{?ghc_requires}\
+%{?ghc_doc_requires}\
 %{!-h:%{?ghc_pkg_deps:Requires:       %{ghc_pkg_deps}}}\
 %{-h:Requires:       %{-h*}}\
 %{!-c:%{?ghc_pkg_c_deps:Requires:       %{ghc_pkg_c_deps}}}\
 %{-c:Requires:       %{-c*}}\
+%{-o:Obsoletes:      %{ghc_pkg_name}-doc < %{-o*}}\
+%{-o:Provides:       %{ghc_pkg_name}-doc = %{version}-%{release}}\
 \
 %description -n %{ghc_pkg_name}-devel\
 %{?common_description}%{!?common_description:Haskell %{local_pkg_name} library.}\
@@ -134,45 +137,13 @@ This package contains the development fi
 \
 %post -n %{ghc_pkg_name}-devel\
 %ghc_pkg_recache\
+%ghc_reindex_haddock\
 \
 %postun -n %{ghc_pkg_name}-devel\
 %ghc_pkg_recache\
-\
-%files -n %{ghc_pkg_name}-devel -f %{ghc_pkg_name}-devel.files\
-%defattr(-,root,root,-)\
-%{nil}
-
-# for docs post and postun
-# re-index haddock
-%ghc_reindex_haddock ( cd %{ghcdocbasedir}/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index ) || :
-
-# ghc_package_doc [-n pkgname] [-h pkgdepslist] [-l licensetag] [-v version]
-%ghc_package_doc(n:h:l:v:)\
-%define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\
-%define ghc_pkg_name ghc-%{local_pkg_name}\
-%package -n %{ghc_pkg_name}-doc\
-Summary:        Documentation for %{?common_summary}%{!?common_summary:%{local_pkg_name} library}\
-Group:          Development/Libraries\
-%{-v:Version:        %{-v*}}\
-%{-l:License:        %{-l*}}\
-%{?ghc_doc_requires}\
-%{!-h:%{?ghc_pkg_deps:Requires:       %(echo %{ghc_pkg_deps} | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-doc/g")}}\
-%{-h:Requires:       %(echo %{-h*} | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-doc/g")}\
-\
-%description -n %{ghc_pkg_name}-doc\
-%{?common_description}%{!?common_description:Haskell %{local_pkg_name} library.}\
-\
-This package contains development documentation files.\
-\
-%post -n %{ghc_pkg_name}-doc\
 %ghc_reindex_haddock\
 \
-%postun -n %{ghc_pkg_name}-doc\
-if [ "$1" -eq 0 ] ; then\
-  %ghc_reindex_haddock\
-fi\
-\
-%files -n %{ghc_pkg_name}-doc -f %{ghc_pkg_name}-doc.files\
+%files -n %{ghc_pkg_name}-devel -f %{ghc_pkg_name}-devel.files\
 %defattr(-,root,root,-)\
 %{nil}
 


Index: ghc-rpm-macros.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ghc-rpm-macros/devel/ghc-rpm-macros.spec,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -p -r1.29 -r1.30
--- ghc-rpm-macros.spec	28 Jun 2010 07:33:22 -0000	1.29
+++ ghc-rpm-macros.spec	15 Jul 2010 14:43:34 -0000	1.30
@@ -1,5 +1,5 @@
 Name:		ghc-rpm-macros
-Version:	0.7.1
+Version:	0.8.0
 Release:	1%{?dist}
 Summary:	Macros for building packages for GHC
 
@@ -48,6 +48,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Fri Jul 16 2010 Jens Petersen <petersen at redhat.com> - 0.8.0-1
+- merge -doc into -devel and provide -o obsoletes doc subpackage option
+
 * Mon Jun 28 2010 Jens Petersen <petersen at redhat.com> - 0.7.1-1
 - support hscolour'ing of src from haddock
 - really remove redundant summary and description option flags



More information about the scm-commits mailing list