diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 67bba15..ede1bf3 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -7,7 +7,7 @@ # configure %cabal_configure\ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{ghclibdocdir}/%{pkg_name}-%{version} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_shared:--enable-shared} %{?cabal_configure_options} +%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} %{?cabal_configure_options} # install %cabal_install %cabal copy --destdir=%{buildroot} -v @@ -27,7 +27,7 @@ %define basepkg ghc-%{pkgname}\ %define pkgdir %{ghclibdir}/%{pkgnamever}\ %define docdir %{ghclibdocdir}/%{pkgnamever}\ -rm -f %{basepkg}.files %{basepkg}-devel.files %{basepkg}-prof.files\ +rm -f %{basepkg}.files %{basepkg}-devel.files\ %if %{undefined ghc_without_shared}\ echo "%defattr(-,root,root,-)" > %{basepkg}.files\ if [ -d "%{buildroot}%{pkgdir}" ]; then\ @@ -49,16 +49,12 @@ fi\ 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 "*_p.a" -o -name "*.p_hi" -o -name "libHS*.so" \\) >> %{basepkg}-devel.files\ -fi\ -echo "%defattr(-,root,root,-)" > %{basepkg}-prof.files\ -if [ -d "%{buildroot}%{pkgdir}" ]; then\ -find %{buildroot}%{pkgdir} \\( -name "*_p.a" -o -name "*.p_hi" \\) >> %{basepkg}-prof.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 %{basepkg}-prof.files\ +sed -i -e "s!%{buildroot}!!g" %{!?ghc_without_shared:%{basepkg}.files} %{basepkg}-devel.files\ %{nil} # compiler version @@ -83,10 +79,6 @@ Requires(postun): ghc = %{ghc_version}\ Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver:%{version}}-%{release}\ %endif -# prof pkg basic requires -%ghc_prof_requires Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}}-devel = %{?pkgver}%{!?pkgver:%{version}}-%{release}\ -%{nil} - # ghc_lib_package [-c cdepslist] [-h pkgdepslist] (-o deprecated no-op) %ghc_lib_package(c:h:o:)\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ @@ -99,8 +91,6 @@ Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver: %endif\ \ %ghc_package_devel\ -\ -%ghc_package_prof\ %{nil} # ghc_binlib_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] (-o deprecated no-op) [-x] [name] [version] @@ -152,6 +142,8 @@ Group: Development/Libraries\ %{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-doc/g")}\ Obsoletes: %{basepkg}-doc < %{version}-%{release}\ Provides: %{basepkg}-doc = %{version}-%{release}\ +Obsoletes: %{basepkg}-prof < %{version}-%{release}\ +Provides: %{basepkg}-prof = %{version}-%{release}\ \ %description -n %{basepkg}-devel\ %{?common_description}%{!?common_description:Haskell %{pkgname} library.}\ @@ -170,30 +162,6 @@ This package contains the development files.\ %defattr(-,root,root,-)\ %{nil} -# ghc_package_prof [-h pkgdepslist] [-l licensetag] -%ghc_package_prof(h:l:)\ -%define pkgname %{?1}%{!?1:%{pkg_name}}\ -%define pkgver %{?2}%{!?2:%{version}}\ -%define pkgnamever %{pkgname}-%{pkgver}\ -%define basepkg ghc-%{pkgname}\ -%package -n %{basepkg}-prof\ -Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname}} profiling libraries\ -Group: Development/Libraries\ -%{?1:Version: %{pkgver}}\ -%{-l:License: %{-l*}}\ -%{?ghc_prof_requires}\ -%{-h:Requires: %(echo "%{-h*}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-prof/g")}\ -%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-prof/g")}\ -\ -%description -n %{basepkg}-prof\ -%{?common_description}%{!?common_description:Haskell %{pkgname} library.}\ -\ -This package contains the profiling development files.\ -\ -%files -n %{basepkg}-prof -f %{basepkg}-prof.files\ -%defattr(-,root,root,-)\ -%{nil} - # ghc_strip_dynlinked %ghc_strip_dynlinked\ %if %{undefined __debug_package}\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 1176d12..ca85ee6 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,7 +1,9 @@ %global debug_package %{nil} +%global macros_file %{_sysconfdir}/rpm/macros.ghc + Name: ghc-rpm-macros -Version: 0.10.55 +Version: 0.10.56 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -19,8 +21,8 @@ Source3: ghc-deps.sh %description A set of macros for building GHC packages following the Haskell Guidelines -of the Fedora Haskell SIG. This package probably shouldn't be installed on -its own as GHC is needed in order to make use of these macros. +of the Fedora Haskell SIG. ghc needs to be installed in order to make use of +these macros. %prep %setup -c -T @@ -33,15 +35,15 @@ echo no build stage needed %install mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm -install -p -m 0644 %{SOURCE0} ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm/macros.ghc +install -p -m 0644 %{SOURCE0} ${RPM_BUILD_ROOT}/%{macros_file} -mkdir -p ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm -install -p %{SOURCE3} ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm +mkdir -p %{buildroot}/%{_prefix}/lib/rpm +install -p %{SOURCE3} %{buildroot}/%{_prefix}/lib/rpm # this is why this package is now arch-dependent: # turn off shared libs and dynamic linking on secondary archs %ifnarch %{ix86} x86_64 -cat >> ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm/macros.ghc <> %{buildroot}/%{macros_file} < - 0.10.56-1 +- merge prof subpackages into devel to simplify packaging +- condition --htmldir on pkg_name + * Mon May 9 2011 Jens Petersen - 0.10.55-1 - include ghc_pkg_c_deps even when -c option used