[ghc-rpm-macros/el5] rewind to 0.8.1

Jens Petersen petersen at fedoraproject.org
Fri Jun 1 07:50:47 UTC 2012


commit bc8d4ce9984a40b03e0e59f90896fb44dcd28864
Author: Jens Petersen <petersen at redhat.com>
Date:   Fri Jun 1 16:50:24 2012 +0900

    rewind to 0.8.1
    
    which was used to bootstrap ghc-6.12.3 for el6

 AUTHORS             |    6 +-
 ghc-deps.sh         |   80 -----------
 ghc-rpm-macros.ghc  |  366 +++++++++++++++++++--------------------------------
 ghc-rpm-macros.spec |  281 ++++------------------------------------
 4 files changed, 160 insertions(+), 573 deletions(-)
---
diff --git a/AUTHORS b/AUTHORS
index adc72fc..9725c64 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,7 +1,3 @@
-Maintainer:
-Jens Petersen <petersen at redhat.com>
-
-Initial implementation:
 Bryan O'Sullivan
 Jens Petersen
-Yaakov Nemoy
+Yaakov Nemoy
\ No newline at end of file
diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc
index 4b94a4e..2f99c79 100644
--- a/ghc-rpm-macros.ghc
+++ b/ghc-rpm-macros.ghc
@@ -1,295 +1,199 @@
-# RPM Macros for packaging Haskell cabalized packages  -*-rpm-spec-*-
-# see https://fedoraproject.org/wiki/PackagingDrafts/Haskell for more details
-
 # "cabal"
-%cabal [ -x Setup ] || ghc --make %{!?ghc_user_conf:-no-user-package-conf} %{!?ghc_without_dynamic:-dynamic} Setup\
-./Setup
-
-# check ghc version was rebuilt against self
-%ghc_check_bootstrap\
-if [ ! "$(ghc --info | grep \\"Booter\\ version\\",\\"%{ghc_version}\\")" ]; then\
-  echo "Warning: this ghc build is not self-bootstrapped."\
-%if %{undefined ghc_bootstrapping}\
-  echo "The ghc package should be rebuilt against its current version before\
-proceeding, to avoid dependency ABI breakage from a future ghc rebuild."\
-  echo "To override set ghc_bootstrapping."\
-  echo "Aborting."\
-  exit 1\
-%endif\
-fi
+%cabal %{_bindir}/runghc Setup
 
 # configure
-%cabal_configure\
-%ghc_check_bootstrap\
-%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_shared:--enable-shared} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options}
+%cabal_configure \
+%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{ghcdocdir} --libsubdir='$compiler/$pkgid' %{?with_shared:--enable-shared} %{?with_dynamic:--ghc-option=-dynamic}
 
 # install
-%cabal_install %cabal copy --destdir=%{buildroot} -v
+%cabal_install %cabal copy --destdir=${RPM_BUILD_ROOT} -v
 
 # root dir for ghc docs
 %ghcdocbasedir %{_docdir}/ghc/html
-# libraries doc dir
-%ghclibdocdir %{ghcdocbasedir}/libraries
+# ghcdocdir [pkgname]
+%ghcdocdir() %{ghcdocbasedir}/libraries/%{?1}%{!?1:%{pkg_name}}-%{version}
 # top library dir
-%ghclibdir %{_libdir}/ghc-%{ghc_version}
-
-# ghc_gen_filelists [name] [version]
-%ghc_gen_filelists()\
-%define pkgname %{?1}%{!?1:%{pkg_name}}\
-%define pkgver %{?2}%{!?2:%{version}}\
-%define pkgnamever %{pkgname}-%{pkgver}\
-%define basepkg ghc-%{pkgname}\
-%define pkgdir %{ghclibdir}/%{pkgnamever}\
-%define docdir %{ghclibdocdir}/%{pkgnamever}\
-rm -f %{basepkg}.files %{basepkg}-devel.files\
-%if %{undefined ghc_without_shared}\
-if [ -d "%{buildroot}%{pkgdir}" ]; then\
-echo "%dir %{pkgdir}" >> %{basepkg}.files\
-echo "%attr(755,root,root) %{pkgdir}/libHS%{pkgnamever}-ghc%{ghc_version}.so" >> %{basepkg}.files\
-fi\
-%endif\
-%if 0%{!?1:1} && %{defined ghc_without_shared}\
-if [ "%{name}" = "ghc-%{pkg_name}" ]; then\
-  if [ -d "%{buildroot}%{_docdir}/%{name}-%{version}" ]; then\
-    mv %{buildroot}%{_docdir}/%{name}-%{version} %{buildroot}%{_docdir}/%{name}-devel-%{version}\
-%if %{undefined ghc_exclude_docdir}\
-    echo "%{_docdir}/%{name}-devel-%{version}" >> %{basepkg}-devel.files\
-%endif\
-  fi\
-fi\
-%endif\
-%if 0%{!?1:1} && %{undefined ghc_exclude_docdir}\
-if [ -d "%{buildroot}%{_docdir}/%{name}-%{version}" ]; then\
-  echo "%{_docdir}/%{name}-%{version}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\
-elif [ -d "%{buildroot}%{_docdir}/ghc-%{pkgnamever}" ]; then\
-  echo "%{_docdir}/ghc-%{pkgnamever}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\
-fi\
-%endif\
-echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf" >> %{basepkg}-devel.files\
-if [ -d "%{buildroot}%{pkgdir}" ]; then\
-find %{buildroot}%{pkgdir} -type d | sed "s/^/%dir /" >> %{basepkg}-devel.files\
-find %{buildroot}%{pkgdir} ! \\( -type d -o -name "libHS*.so" \\) >> %{basepkg}-devel.files\
-fi\
-if [ -d "%{buildroot}%{docdir}" ]; then\
-echo "%{docdir}" >> %{basepkg}-devel.files\
-fi\
-sed -i -e "s!%{buildroot}!!g" %{!?ghc_without_shared:%{basepkg}.files} %{basepkg}-devel.files\
+%ghcpkgbasedir %{_libdir}/ghc-%{ghc_version}
+# ghcpkgdir [pkgname]
+%ghcpkgdir() %{ghcpkgbasedir}/%{?1}%{!?1:%{pkg_name}}-%{version}
+
+# ghc_gen_filelists [pkgname]
+%ghc_gen_filelists() \
+pkgname=%{?1}%{!?1:%{pkg_name}} \
+basefile=ghc-${pkgname} \
+pkgnamever=${pkgname}-%{version} \
+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::} \
+fi \
+%if %{with shared} \
+if [ -d "${RPM_BUILD_ROOT}%{ghcpkgdir}" ]; then \
+echo "%dir %{ghcpkgdir}" >> ${basefile}.files \
+echo "%attr(755,root,root) %{ghcpkgdir}/libHS${pkgnamever}-ghc%{ghc_version}.so" >> ${basefile}.files \
+fi \
+%endif \
+echo "%defattr(-,root,root,-)" > ${basefile}-devel.files \
+echo "%{_libdir}/ghc-%{ghc_version}/package.conf.d/${pkgnamever}*.conf" >> ${basefile}-devel.files \
+if [ -d "${RPM_BUILD_ROOT}%{ghcpkgdir}" ]; then \
+find ${RPM_BUILD_ROOT}%{ghcpkgdir} -type d | sed "s/^/%dir /" >> ${basefile}-devel.files \
+find ${RPM_BUILD_ROOT}%{ghcpkgdir} ! \\( -type d -o -name "*_p.a" -o -name "*.p_hi" -o -name "libHS*.so" \\) >> ${basefile}-devel.files \
+fi \
+echo "%defattr(-,root,root,-)" > ${basefile}-prof.files \
+if [ -d "${RPM_BUILD_ROOT}%{ghcpkgdir}" ]; then \
+find ${RPM_BUILD_ROOT}%{ghcpkgdir} \\( -name "*_p.a" -o -name "*.p_hi" \\) >> ${basefile}-prof.files \
+fi \
+if [ -d "${RPM_BUILD_ROOT}%{ghcdocdir}" ]; then \
+echo "%{ghcdocdir}" >> ${basefile}-devel.files \
+fi \
+sed -i -e "s!${RPM_BUILD_ROOT}!!g" ${basefile}.files ${basefile}-devel.files ${basefile}-prof.files \
 %{nil}
 
-%ghc_add_basepkg_file()\
-%define basepkg ghc-%{pkg_name}\
-echo "%*" >> %{basepkg}%{?ghc_without_shared:-devel}.files
-
 # compiler version
 %ghc_version %{!?ghc_version_override:%(ghc --numeric-version)}%{?ghc_version_override}
 
 # create and install package.conf file
-# cabal_pkg_conf [name] [version]
-%cabal_pkg_conf()\
-%define pkgname %{?1}%{!?1:%{pkg_name}}\
-%define pkgver %{?2}%{!?2:%{version}}\
-%define pkgnamever %{pkgname}-%{pkgver}\
-%cabal register --gen-pkg-config\
-mkdir -p %{buildroot}%{ghclibdir}/package.conf.d\
-install --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.d\
-%{nil}
+# cabal_pkg_conf [pkgname]
+%cabal_pkg_conf \
+%cabal register --gen-pkg-config \
+mkdir -p $RPM_BUILD_ROOT%{_libdir}/ghc-%{ghc_version}/package.conf.d \
+install --mode=0644 %{?1}%{!?1:%{pkg_name}}-%{version}.conf $RPM_BUILD_ROOT%{_libdir}/ghc-%{ghc_version}/package.conf.d
 
 # devel pkg basic requires
-%ghc_devel_requires Requires:       ghc-compiler = %{ghc_version}\
-Requires(post): ghc-compiler = %{ghc_version}\
-Requires(postun): ghc-compiler = %{ghc_version}\
-%if %{undefined ghc_without_shared}\
-Requires:       ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver:%{version}}-%{release}\
+%ghc_requires Requires:       ghc = %{ghc_version}\
+Requires(post): ghc = %{ghc_version}\
+Requires(postun): ghc = %{ghc_version}\
+%if %{with shared}\
+Requires:       ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}} = %{-v:%{-v*}}%{!-v:%{version}}-%{release}\
 %endif
 
-%ghc_shared_files\
-%if %{undefined ghc_without_shared}\
-%files -n %{basepkg} -f %{basepkg}.files\
-%{?base_doc_files:%doc %base_doc_files}\
+# doc pkg basic requires
+%ghc_doc_requires Requires:       ghc-doc = %{ghc_version}\
+Requires(post): ghc-doc = %{ghc_version}\
+Requires(postun): ghc-doc = %{ghc_version}
+
+# prof pkg basic requires
+%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] [-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\
+%defattr(-,root,root,-)\
 %endif\
-%{nil}
-
-# ghc_lib_package [-c cdepslist] [-h pkgdepslist]
-%ghc_lib_package(c:h:)\
-%define pkgname %{?1}%{!?1:%{pkg_name}}\
-%define basepkg ghc-%{pkgname}\
-%ghc_shared_files\
 \
 %ghc_package_devel\
+\
+%ghc_package_prof\
 %{nil}
 
-# ghc_package [-l licensetag] [name] [version]
-%ghc_package(l:)\
-%define pkgname %{?1}%{!?1:%{pkg_name}}\
-%define pkgver %{?2}%{!?2:%{version}}\
-%define basepkg ghc-%{pkgname}\
-%package -n %{basepkg}\
-Summary:        %{?common_summary}%{!?common_summary:Haskell %{pkgname} library}\
+# 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}\
+Summary:        %{?common_summary}%{!?common_summary:%{local_pkg_name} library}\
 Group:          System Environment/Libraries\
-%{?1:Version:        %{pkgver}}\
+%{-v:Version:        %{-v*}}\
 %{-l:License:        %{-l*}}\
-%{?ghc_pkg_obsoletes:Obsoletes:      %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1/g")}
-
-# ghc_description [name] [version]
-%ghc_description\
-%define pkgname %{?1}%{!?1:%{pkg_name}}\
-%define basepkg ghc-%{pkgname}\
-%description -n %{basepkg}\
-%{?common_description}%{!?common_description:Haskell %{pkgname} library.}\
-%if %{defined ghc_version} && %{undefined ghc_without_shared}\
-This package provides the shared library.\
-%endif
-
-# ghc_binlib_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-x] [name] [version]
-%ghc_binlib_package(c:h:l:x)\
-%define pkgname %{?1}%{!?1:%{pkg_name}}\
-%define pkgver %{?2}%{!?2:%{version}}\
-%define pkgnamever %{pkgname}-%{pkgver}\
-%{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgnamever}}}\
-%define basepkg ghc-%{pkgname}\
-%ghc_package\
 \
-%ghc_description\
+%description -n %{ghc_pkg_name}\
+%{?common_description}%{!?common_description:Haskell %{local_pkg_name} library.}\
+\
+This package provides the shared library.\
 \
 %ghc_lib_package\
 %{nil}
 
 %ghc_pkg_recache %{_bindir}/ghc-pkg recache --no-user-package-conf || :
 
-# (deprecated) for docs post and postun
-%ghc_reindex_haddock :
+# for docs post and postun
+%ghc_reindex_haddock ( cd %{ghcdocbasedir}/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index ) || :
 
-%ghc_devel_files\
-%files -n %{basepkg}-devel -f %{basepkg}-devel.files\
-%if %{defined ghc_without_shared}\
-%{?base_doc_files:%doc %base_doc_files}\
-%endif\
-%{?devel_doc_files:%doc %devel_doc_files}\
-%{nil}
-
-%ghc_files()\
-%{?1:%define base_doc_files %*}\
-%define basepkg ghc-%{pkg_name}\
-%ghc_shared_files\
-\
-%ghc_devel_files\
-%{nil}
-
-# ghc_devel_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [name] [version]
-%ghc_devel_package(c:h:l:)\
-%define pkgname %{?1}%{!?1:%{pkg_name}}\
-%define pkgver %{?2}%{!?2:%{version}}\
-%define basepkg ghc-%{pkgname}\
-%package -n %{basepkg}-devel\
-Summary:        %{?common_summary}%{!?common_summary:Haskell %{pkgname} library} development files\
+# 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\
+Summary:        %{?common_summary}%{!?common_summary:%{local_pkg_name} library} development files\
 Group:          Development/Libraries\
-%{?1:Version:        %{pkgver}}\
+%{-v:Version:        %{-v*}}\
 %{-l:License:        %{-l*}}\
-%{?ghc_devel_requires}\
+%{?ghc_requires}\
+%{?ghc_doc_requires}\
+%{!-h:%{?ghc_pkg_deps:Requires:       %{ghc_pkg_deps}}}\
 %{-h:Requires:       %{-h*}}\
-%{?ghc_pkg_c_deps:Requires:       %{ghc_pkg_c_deps}}\
+%{!-c:%{?ghc_pkg_c_deps:Requires:       %{ghc_pkg_c_deps}}}\
 %{-c:Requires:       %{-c*}}\
-%{?ghc_pkg_obsoletes:Obsoletes:      %{ghc_pkg_obsoletes}}\
-%{?ghc_pkg_obsoletes:Obsoletes:      %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-doc/g")}\
-Obsoletes:      %{basepkg}-doc < %{pkgver}-%{release}\
-Obsoletes:      %{basepkg}-prof < %{pkgver}-%{release}\
-%if %{undefined without_prof}\
-Provides:       %{basepkg}-prof = %{pkgver}-%{release}\
-%endif
-
-# ghc_devel_description
-%ghc_devel_description\
-%define pkgname %{?1}%{!?1:%{pkg_name}}\
-%define basepkg ghc-%{pkgname}\
-%description -n %{basepkg}-devel\
-%{?common_description}%{!?common_description:Haskell %{pkgname} library.}\
+%{-o:Obsoletes:      %{ghc_pkg_name}-doc < %{-o*}}\
+Provides:       %{ghc_pkg_name}-doc = %{version}-%{release}\
 \
-This package contains the development files.
-
-# ghc_devel_post_postun
-%ghc_devel_post_postun\
-%define pkgname %{?1}%{!?1:%{pkg_name}}\
-%define basepkg ghc-%{pkgname}\
-%post -n %{basepkg}-devel\
+%description -n %{ghc_pkg_name}-devel\
+%{?common_description}%{!?common_description:Haskell %{local_pkg_name} library.}\
+\
+This package contains the development files.\
+\
+%post -n %{ghc_pkg_name}-devel\
+%ghc_pkg_recache\
+%ghc_reindex_haddock\
+\
+%postun -n %{ghc_pkg_name}-devel\
 %ghc_pkg_recache\
+%ghc_reindex_haddock\
 \
-%postun -n %{basepkg}-devel\
-%ghc_pkg_recache
+%files -n %{ghc_pkg_name}-devel -f %{ghc_pkg_name}-devel.files\
+%defattr(-,root,root,-)\
+%{nil}
 
-# ghc_package_devel [-c cdepslist] [-h pkgdepslist] [-l licensetag] [name] [version]
-%ghc_package_devel(c:h:l:)\
-%define pkgname %{?1}%{!?1:%{pkg_name}}\
-%define basepkg ghc-%{pkgname}\
-%ghc_devel_package\
+# ghc_package_prof [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-v version]
+%ghc_package_prof(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}-prof\
+Summary:        Profiling libraries for %{?common_summary}%{!?common_summary:%{local_pkg_name}}\
+Group:          Development/Libraries\
+%{-v:Version:        %{-v*}}\
+%{-l:License:        %{-l*}}\
+%{?ghc_prof_requires}\
+%{!-h:%{?ghc_pkg_deps:Requires:       %(echo %{ghc_pkg_deps} | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-prof/g")}}\
+%{-h:Requires:       %(echo %{-h*} | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-prof/g")}\
 \
-%ghc_devel_description\
+%description -n %{ghc_pkg_name}-prof\
+%{?common_description}%{!?common_description:Haskell %{local_pkg_name} library.}\
 \
-%ghc_devel_post_postun\
+This package contains the profiling library.\
 \
-%ghc_devel_files\
+%files -n %{ghc_pkg_name}-prof -f %{ghc_pkg_name}-prof.files\
+%defattr(-,root,root,-)\
 %{nil}
 
 # ghc_strip_dynlinked
 %ghc_strip_dynlinked\
-%if %{undefined __debug_package}\
-find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -exec strip "{}" \\;\
+%if 0%{!?__debug_package:1}\
+find $RPM_BUILD_ROOT -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -exec strip "{}" \\;\
 %endif
 
 # ghc_bin_build
 %ghc_bin_build\
-%global debug_package %{nil}\
-%cabal_configure\
+%cabal_configure --ghc\
 %cabal build
 
-# ghc_lib_build [name] [version]
-%ghc_lib_build()\
-%global debug_package %{nil}\
-%{?1:cd %1-%2}\
-%cabal_configure %{!?without_prof:-p} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2}\
+# ghc_lib_build
+%ghc_lib_build\
+%cabal_configure --ghc -p\
 %cabal build\
-%if %{undefined without_haddock}\
-%cabal haddock %{!?without_hscolour:%(if [ -x %{_bindir}/HsColour ]; then echo --hyperlink-source; fi)}\
-%endif\
-%{?1:cd -}\
-%{nil}
+%cabal haddock %{?with_hscolour:--hyperlink-source}
 
-# install bin package
+# ghc_bin_install
 %ghc_bin_install\
-%if %{undefined ghc_bootstrapping}\
-%global _use_internal_dependency_generator 0\
-%global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\
-%endif\
 %cabal_install\
 %ghc_strip_dynlinked
 
-# ghc_lib_install [name] [version]
-%ghc_lib_install()\
-%if %{undefined ghc_bootstrapping}\
-%global _use_internal_dependency_generator 0\
-%global __find_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir}\
-%global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\
-%endif\
-%{?1:cd %1-%2}\
+# ghc_lib_install
+%ghc_lib_install\
 %cabal_install\
 %cabal_pkg_conf\
-%{?1:cd -}\
 %ghc_gen_filelists\
-%{!?1:%ghc_strip_dynlinked}\
-%{nil}
-
-# - without_hscolour, without_testsuite, and ghc_bootstrapping
-#   need to be set locally in the spec file
-
-# skip prof libs, and documentation
-%ghc_test\
-%global without_prof 1\
-%global without_haddock 1\
-%global without_manual 1
-
-# skip shared and prof libs, documentation, and testsuite
-%ghc_bootstrap\
-%global ghc_without_shared 1\
-%global ghc_without_dynamic 1\
-%ghc_test
-
-%ghc_exclude_docdir 1
+%ghc_strip_dynlinked
diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec
index b569e03..8e788bf 100644
--- a/ghc-rpm-macros.spec
+++ b/ghc-rpm-macros.spec
@@ -1,31 +1,26 @@
-%global debug_package %{nil}
+Name:		ghc-rpm-macros
+Version:	0.8.1
+Release:	1%{?dist}
+Summary:	Macros for building packages for GHC
 
-%global macros_file %{_sysconfdir}/rpm/macros.ghc
-
-Name:           ghc-rpm-macros
-Version:        0.90
-Release:        1%{?dist}
-Summary:        Macros for building packages for GHC
-
-Group:          Development/Libraries
-License:        GPLv3
-URL:            https://fedoraproject.org/wiki/Haskell_SIG
+Group:		Development/Libraries
+License:	GPLv3
+URL:		https://fedoraproject.org/wiki/Haskell_SIG
 
 # This is a Fedora maintained package which is specific to
 # our distribution.  Thus the source is only available from
-# within this srpm.  But it could be moved to fedorahosted.org
-# if other rpm distros want to use it.
-Source0:        ghc-rpm-macros.ghc
-Source1:        COPYING
-Source2:        AUTHORS
-Source3:        ghc-deps.sh
-Requires:       redhat-rpm-config
+# within this srpm.
+Source0:	ghc-rpm-macros.ghc
+Source1:	COPYING
+Source2:	AUTHORS
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:	noarch
 
 %description
 A set of macros for building GHC packages following the Haskell Guidelines
-of the Fedora Haskell SIG.  ghc needs to be installed in order to make use of
-these macros.
-
+of the Haskell SIG. This package probably shouldn't be installed on its own
+as GHC is needed in order to make use of these macros.
 
 %prep
 %setup -c -T
@@ -37,252 +32,24 @@ echo no build stage needed
 
 
 %install
-install -p -D -m 0644 %{SOURCE0} ${RPM_BUILD_ROOT}/%{macros_file}
-
-install -p -D -m 0755 %{SOURCE3} %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh
+rm -rf $RPM_BUILD_ROOT
+mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm
+cp -p %{SOURCE0} ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm/macros.ghc
 
-# this is why this package is now arch-dependent:
-# turn off shared libs and dynamic linking on secondary archs
-%ifnarch %{ix86} x86_64
-cat >> %{buildroot}/%{macros_file} <<EOF
 
-# shared libraries are only supported on primary intel archs
-%%ghc_without_dynamic 1
-%%ghc_without_shared 1
-EOF
-%endif
+%clean
+rm -rf $RPM_BUILD_ROOT
 
 
 %files
+%defattr(-,root,root,-)
 %doc COPYING AUTHORS
-%config(noreplace) %{macros_file}
-%{_prefix}/lib/rpm/ghc-deps.sh
+%config(noreplace) %{_sysconfdir}/rpm/macros.ghc
 
 
 %changelog
-* Mon Mar 19 2012 Jens Petersen <petersen at redhat.com> - 0.90-1
-- use new rpm metadata hash format for ghc-7.4
-- drop prof meta hash data
-- no longer include doc files automatically by default
-- no longer provide doc subpackage
-- do not provide prof when without_prof set
-
-* Thu Feb 23 2012 Jens Petersen <petersen at redhat.com> - 0.15.5-1
-- fix handling of devel docdir for non-shared builds
-- simplify ghc_bootstrap
-
-* Thu Jan 19 2012 Jens Petersen <petersen at redhat.com> - 0.15.4-1
-- allow dynamic linking of Setup with ghc_without_shared set
-
-* Fri Jan  6 2012 Jens Petersen <petersen at redhat.com> - 0.15.3-1
-- new ghc_add_basepkg_file to add a path to base lib package filelist
-
-* Wed Dec 28 2011 Jens Petersen <petersen at redhat.com> - 0.15.2-1
-- add ghc_devel_post_postun to help koji/mock with new macros
-
-* Tue Dec 27 2011 Jens Petersen <petersen at redhat.com> - 0.15.1-1
-- add ghc_package, ghc_description, ghc_devel_package, ghc_devel_description
-
-* Tue Dec 27 2011 Jens Petersen <petersen at redhat.com> - 0.15-1
-- new ghc_files wrapper macro for files which takes base doc files as args
-  and uses new ghc_shared_files and ghc_devel_files macros
-- when building for non-shared archs move installed docfiles to devel docdir
-
-* Fri Dec  2 2011 Jens Petersen <petersen at redhat.com> - 0.14.3-1
-- do not use ghc user config by default when compiling Setup
-- do not setup hscolour if without_hscolour defined
-
-* Thu Nov 17 2011 Jens Petersen <petersen at redhat.com> - 0.14.2-1
-- test for HsColour directly when running "cabal haddock" instead of
-  check hscolour is available (reported by Giam Teck Choon, #753833)
-
-* Sat Nov 12 2011 Jens Petersen <petersen at redhat.com> - 0.14.1-1
-- fix double listing of docdir in base lib package
-
-* Tue Nov  1 2011 Jens Petersen <petersen at redhat.com> - 0.14-1
-- replace devel ghc requires with ghc-compiler
-- disable testsuite in ghc_bootstrap
-
-* Mon Oct 17 2011 Jens Petersen <petersen at redhat.com> - 0.13.13-1
-- add ghc_bootstrapping to ghc_bootstrap for packages other than ghc
-- make ghc-deps.sh also work when bootstrapping a new ghc version
-
-* Sat Oct 15 2011 Jens Petersen <petersen at redhat.com> - 0.13.12-1
-- add ghc_exclude_docdir to exclude docdir from filelists
-
-* Fri Sep 30 2011 Jens Petersen <petersen at redhat.com> - 0.13.11-1
-- fix devel subpackage's prof and doc obsoletes and provides versions
-  for multiple lib packages like ghc (reported by Henrik Nordström)
-
-* Tue Sep 13 2011 Jens Petersen <petersen at redhat.com> - 0.13.10-1
-- do not setup ghc-deps.sh when ghc_bootstrapping
-- add ghc_test build config
-
-* Wed Aug  3 2011 Jens Petersen <petersen at redhat.com> - 0.13.9-1
-- drop without_testsuite from ghc_bootstrap since it breaks koji
-
-* Fri Jul  1 2011 Jens Petersen <petersen at redhat.com> - 0.13.8-1
-- drop redundant defattr from filelists
-- move dependency generator setup from ghc_package_devel to ghc_lib_install
-  in line with ghc_bin_install
-
-* Mon Jun 27 2011 Jens Petersen <petersen at redhat.com> - 0.13.7-1
-- add requires for redhat-rpm-config for ghc_arches
-- drop ghc_bootstrapping from ghc_bootstrap: doesn't work for koji
-
-* Fri Jun 17 2011 Jens Petersen <petersen at redhat.com> - 0.13.6-1
-- also set ghc_without_dynamic for ghc_bootstrap
-- drop without_hscolour from ghc_bootstrap: doesn't work for koji
-
-* Fri Jun 17 2011 Jens Petersen <petersen at redhat.com> - 0.13.5-1
-- ghc_bootstrap is now a macro which sets ghc_bootstrapping,
-  ghc_without_shared, without_prof, without_haddock, without_hscolour,
-  without_manual, without_testsuite
-- tweaks to ghc_check_bootstrap
-
-* Fri Jun 17 2011 Jens Petersen <petersen at redhat.com> - 0.13.4-1
-- add ghc_check_bootstrap
-
-* Thu Jun  2 2011 Jens Petersen <petersen at redhat.com> - 0.13.3-1
-- rename macros.ghc-pkg back to macros.ghc
-- move the devel summary prefix back to a suffix
-
-* Sat May 28 2011 Jens Petersen <petersen at redhat.com> - 0.13.2-1
-- macros need to live in /etc/rpm
-- use macro_file for macros.ghc filepath
-
-* Sat May 28 2011 Jens Petersen <petersen at redhat.com> - 0.13.1-1
-- move macros.ghc to /usr/lib/rpm to avoid conflict with redhat-rpm-config
-
-* Wed May 11 2011 Jens Petersen <petersen at redhat.com> - 0.13-1
-- merge prof subpackages into devel to simplify packaging
-
-* Mon May  9 2011 Jens Petersen <petersen at redhat.com> - 0.12.1-1
-- include ghc_pkg_c_deps even when -c option used
-
-* Sat May  7 2011 Jens Petersen <petersen at redhat.com> - 0.12.0-1
-- drop ghc_pkg_deps from ghc_package_devel and ghc_package_prof since
-  ghc-deps.sh generates better inter-package dependencies already
-- condition --htmldir on pkg_name
-
-* Fri Apr  1 2011 Jens Petersen <petersen at redhat.com> - 0.11.14-1
-- provides ghc-*-doc still needed for current lib templates
-
-* Mon Mar 28 2011 Jens Petersen <petersen at redhat.com> - 0.11.13-1
-- ghc-deps.sh: check PKGBASEDIR exists to avoid warning for bin package
-- abort cabal_configure if ghc is not self-bootstrapped
-- make ghc_reindex_haddock a safe no-op
-- no longer provide ghc-*-doc
-- no longer run ghc_reindex_haddock in ghc-*-devel scripts
-
-* Thu Mar 10 2011 Jens Petersen <petersen at redhat.com> - 0.11.12-1
-- add ghc_pkg_obsoletes to binlib base lib package too
-
-* Wed Mar  9 2011 Jens Petersen <petersen at redhat.com> - 0.11.11-1
-- add docdir when subpackaging packages too
-
-* Sun Feb 13 2011 Jens Petersen <petersen at redhat.com> - 0.11.10-1
-- this package is now arch-dependent
-- rename without_shared to ghc_without_shared and without_dynamic
-  to ghc_without_dynamic so that they can be globally defined for
-  secondary archs without shared libs
-- use %%undefined macro
-- disable debug_package in ghc_bin_build and ghc_lib_build
-- set ghc_without_shared and ghc_without_dynamic on secondary
-  (ie non main intel) archs
-- disable debuginfo for self
-
-* Fri Feb 11 2011 Jens Petersen <petersen at redhat.com> - 0.11.9-1
-- revert "set without_shared and without_dynamic by default on secondary archs
-  in cabal_bin_build and cabal_lib_build" change, since happening for all archs
-
-* Thu Feb 10 2011 Jens Petersen <petersen at redhat.com> - 0.11.8-1
-- only link Setup dynamically if without_shared and without_dynamic not set
-- set without_shared and without_dynamic by default on secondary archs
-  in cabal_bin_build and cabal_lib_build
-- add cabal_configure_options to pass extra options to cabal_configure
-
-* Thu Feb 10 2011 Jens Petersen <petersen at redhat.com> - 0.11.7-1
-- fix ghc-deps.sh for without_shared libraries
-
-* Tue Feb 08 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.11.6-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
-
-* Sat Jan 29 2011 Jens Petersen <petersen at redhat.com> - 0.11.6-1
-- simplify adding shared subpackage license file
-- own ghc-deps.sh not /usr/lib/rpm
-
-* Sun Jan 23 2011 Jens Petersen <petersen at redhat.com> - 0.11.5-1
-- add rpm hash requires for dynamic executables in ghc-deps.sh
-- compile Setup in cabal macro
-- use _rpmconfigdir
-
-* Sat Jan 22 2011 Jens Petersen <petersen at redhat.com> - 0.11.4-1
-- drop deprecated ghcdocdir and ghcpkgdir
-- new ghclibdocdir
-- replace some missed RPM_BUILD_ROOT's
-- bring back ghc requires in ghc_devel_requires
-- improve prof summary and description
-- add without_prof and without_haddock option macros
-
-* Fri Jan 21 2011 Jens Petersen <petersen at redhat.com> - 0.11.3-1
-- compile Setup to help speed up builds
-
-* Thu Jan 20 2011 Jens Petersen <petersen at redhat.com> - 0.11.2-1
-- put docdir (license) also into shared lib subpackage
-- add ghc_binlib_package option to exclude package from ghc_packages_list
-- condition lib base package additional description for srpm
-
-* Mon Jan  3 2011 Jens Petersen <petersen at redhat.com> - 0.11.1-1
-- use buildroot instead of RPM_BUILD_ROOT
-- rename ghcpkgbasedir to ghclibdir
-- split "[name-version]" args into "[name] [version]" args
-- move remaining name and version macro options (-n and -v) to args
-- drop deprecated -o options
-
-* Thu Dec 30 2010 Jens Petersen <petersen at redhat.com> - 0.11.0-1
-- add support for subpackaging ghc's libraries:
-- deprecate ghcpkgdir and ghcdocdir from now on
-- ghc_gen_filelists optional arg is now name-version
-- ghc_lib_build, ghc_lib_install, cabal_pkg_conf now take optional
-  name-version arg
-
-* Mon Dec 20 2010 Jens Petersen <petersen at redhat.com> - 0.10.3-1
-- revert disabling debug_package, since with redhat-rpm-config installed
-  the behaviour depended on the position of ghc_lib_package in the spec file
-  (reported by narasim)
-
-* Fri Nov 26 2010 Jens Petersen <petersen at redhat.com>
-- drop with_devhelp since --html-help option gone from haddock-2.8.0
-
-* Tue Nov 23 2010 Jens Petersen <petersen at redhat.com> - 0.10.2-1
-- ignore ghc's builtin pseudo-libs
-
-* Tue Nov 23 2010 Jens Petersen <petersen at redhat.com> - 0.10.1-1
-- bring back the explicit n-v-r internal package requires for devel and prof packages
-
-* Mon Nov 22 2010 Jens Petersen <petersen at redhat.com> - 0.10.0-1
-- turn on pkg hash metadata (for ghc-7 builds)
-- ghc-deps.sh now requires an extra buildroot/ghcpkgbasedir arg
-- automatic internal package deps from prof to devel to base
-- rename ghc_requires to ghc_devel_requires
-- drop ghc_doc_requires
-- ghc_reindex_haddock is deprecated and now a no-op
-
-* Thu Sep 30 2010 Jens Petersen <petersen at redhat.com> - 0.9.1-1
-- fix without_shared build so it actually works
-
-* Thu Sep 30 2010 Jens Petersen <petersen at redhat.com> - 0.9.0-1
-- add rpm provides and requires script ghc-deps.sh for package hash metadata
-- turn on hash provides and disable debuginfo by default
-- make shared and hscolour default
-- use without_shared and without_hscolour to disable them
-- add ghc_pkg_obsoletes for obsoleting old packages
-- use ghcpkgbasedir
-- always obsolete -doc packages, but keep -o for now for backward compatibility
-
 * Fri Jul 16 2010 Jens Petersen <petersen at redhat.com> - 0.8.1-1
-- fix ghc_strip_dynlinked when no dynlinked files
+- fix ghc_strip_dynlinked for no dynlinked files
 - devel should provide doc also when not obsoleting
 
 * Fri Jul 16 2010 Jens Petersen <petersen at redhat.com> - 0.8.0-1


More information about the scm-commits mailing list