merge prof subpackages into devel to simplify packaging

This commit is contained in:
Jens Petersen 2011-05-16 10:58:56 +09:00
parent eab5583c0d
commit 1bc67af711
2 changed files with 9 additions and 38 deletions

View File

@ -36,7 +36,7 @@ fi\
%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\
@ -58,16 +58,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
@ -92,10 +88,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]
%ghc_lib_package(c:h:)\
%define pkgname %{?1}%{!?1:%{pkg_name}}\
@ -108,8 +100,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] [-x] [name] [version]
@ -162,6 +152,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.}\
@ -178,30 +170,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}\

View File

@ -1,7 +1,7 @@
%global debug_package %{nil}
Name: ghc-rpm-macros
Version: 0.12.1
Version: 0.13
Release: 1%{?dist}
Summary: Macros for building packages for GHC
@ -58,6 +58,9 @@ EOF
%changelog
* Wed May 11 2011 Jens Petersen <petersen@redhat.com> - 0.13-1
- merge prof subpackages into devel to simplify packaging
* Mon May 9 2011 Jens Petersen <petersen@redhat.com> - 0.12.1-1
- include ghc_pkg_c_deps even when -c option used