merge subpackaging support and other cleanup from 0.11.4
This commit is contained in:
parent
6cc692f693
commit
50de2873df
|
@ -3,84 +3,90 @@
|
||||||
|
|
||||||
# configure
|
# configure
|
||||||
%cabal_configure \
|
%cabal_configure \
|
||||||
%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{ghcdocdir} --libsubdir='$compiler/$pkgid' %{!?without_shared:--enable-shared} %{?with_dynamic:--ghc-option=-dynamic}
|
%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{ghclibdocdir}/%{pkg_name}-%{version} --libsubdir='$compiler/$pkgid' --ghc %{!?without_shared:--enable-shared} %{?with_dynamic:--ghc-option=-dynamic}
|
||||||
|
|
||||||
# install
|
# install
|
||||||
%cabal_install %cabal copy --destdir=${RPM_BUILD_ROOT} -v
|
%cabal_install %cabal copy --destdir=%{buildroot} -v
|
||||||
|
|
||||||
# root dir for ghc docs
|
# root dir for ghc docs
|
||||||
%ghcdocbasedir %{_docdir}/ghc/html
|
%ghcdocbasedir %{_docdir}/ghc/html
|
||||||
# ghcdocdir [pkgname]
|
# libraries doc dir
|
||||||
%ghcdocdir() %{ghcdocbasedir}/libraries/%{?1}%{!?1:%{pkg_name}}-%{version}
|
%ghclibdocdir %{ghcdocbasedir}/libraries
|
||||||
# top library dir
|
# top library dir
|
||||||
%ghcpkgbasedir %{_libdir}/ghc-%{ghc_version}
|
%ghclibdir %{_libdir}/ghc-%{ghc_version}
|
||||||
# ghcpkgdir [pkgname]
|
|
||||||
%ghcpkgdir() %{ghcpkgbasedir}/%{?1}%{!?1:%{pkg_name}}-%{version}
|
|
||||||
|
|
||||||
# ghc_gen_filelists [pkgname]
|
# ghc_gen_filelists [name] [version]
|
||||||
%ghc_gen_filelists()\
|
%ghc_gen_filelists()\
|
||||||
pkgname=%{?1}%{!?1:%{pkg_name}} \
|
%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||||
basefile=ghc-${pkgname} \
|
%define pkgver %{?2}%{!?2:%{version}}\
|
||||||
pkgnamever=${pkgname}-%{version} \
|
%define pkgnamever %{pkgname}-%{pkgver}\
|
||||||
rm -f ${basefile}.files ${basefile}-devel.files ${basefile}-prof.files \
|
%define basepkg ghc-%{pkgname}\
|
||||||
|
%define pkgdir %{ghclibdir}/%{pkgnamever}\
|
||||||
|
%define docdir %{ghclibdocdir}/%{pkgnamever}\
|
||||||
|
rm -f %{basepkg}.files %{basepkg}-devel.files %{basepkg}-prof.files\
|
||||||
%if 0%{!?without_shared:1}\
|
%if 0%{!?without_shared:1}\
|
||||||
echo "%defattr(-,root,root,-)" > ${basefile}.files \
|
echo "%defattr(-,root,root,-)" > %{basepkg}.files\
|
||||||
if [ -d "${RPM_BUILD_ROOT}%{ghcpkgdir}" ]; then \
|
if [ -d "%{buildroot}%{pkgdir}" ]; then\
|
||||||
echo "%dir %{ghcpkgdir}" >> ${basefile}.files \
|
echo "%dir %{pkgdir}" >> %{basepkg}.files\
|
||||||
echo "%attr(755,root,root) %{ghcpkgdir}/libHS${pkgnamever}-ghc%{ghc_version}.so" >> ${basefile}.files \
|
echo "%attr(755,root,root) %{pkgdir}/libHS%{pkgnamever}-ghc%{ghc_version}.so" >> %{basepkg}.files\
|
||||||
fi\
|
fi\
|
||||||
%endif\
|
%endif\
|
||||||
echo "%defattr(-,root,root,-)" > ${basefile}-devel.files \
|
echo "%defattr(-,root,root,-)" > %{basepkg}-devel.files\
|
||||||
if [ -d "${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}" ]; then \
|
%if 0%{!?1:1}\
|
||||||
%{!?1:echo "%{_docdir}/%{name}-%{version}" >> ${basefile}%{?without_shared:-devel}.files} %{?1::} \
|
if [ -d "%{buildroot}%{_docdir}/%{name}-%{version}" ]; then\
|
||||||
|
echo "%{_docdir}/%{name}-%{version}" >> %{basepkg}%{?without_shared:-devel}.files\
|
||||||
fi\
|
fi\
|
||||||
echo "%{ghcpkgbasedir}/package.conf.d/${pkgnamever}*.conf" >> ${basefile}-devel.files \
|
%endif\
|
||||||
if [ -d "${RPM_BUILD_ROOT}%{ghcpkgdir}" ]; then \
|
echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf" >> %{basepkg}-devel.files\
|
||||||
find ${RPM_BUILD_ROOT}%{ghcpkgdir} -type d | sed "s/^/%dir /" >> ${basefile}-devel.files \
|
if [ -d "%{buildroot}%{pkgdir}" ]; then\
|
||||||
find ${RPM_BUILD_ROOT}%{ghcpkgdir} ! \\( -type d -o -name "*_p.a" -o -name "*.p_hi" -o -name "libHS*.so" \\) >> ${basefile}-devel.files \
|
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\
|
fi\
|
||||||
echo "%defattr(-,root,root,-)" > ${basefile}-prof.files \
|
echo "%defattr(-,root,root,-)" > %{basepkg}-prof.files\
|
||||||
if [ -d "${RPM_BUILD_ROOT}%{ghcpkgdir}" ]; then \
|
if [ -d "%{buildroot}%{pkgdir}" ]; then\
|
||||||
find ${RPM_BUILD_ROOT}%{ghcpkgdir} \\( -name "*_p.a" -o -name "*.p_hi" \\) >> ${basefile}-prof.files \
|
find %{buildroot}%{pkgdir} \\( -name "*_p.a" -o -name "*.p_hi" \\) >> %{basepkg}-prof.files\
|
||||||
fi\
|
fi\
|
||||||
if [ -d "${RPM_BUILD_ROOT}%{ghcdocdir}" ]; then \
|
if [ -d "%{buildroot}%{docdir}" ]; then\
|
||||||
echo "%{ghcdocdir}" >> ${basefile}-devel.files \
|
echo "%{docdir}" >> %{basepkg}-devel.files\
|
||||||
fi\
|
fi\
|
||||||
sed -i -e "s!${RPM_BUILD_ROOT}!!g" %{!?without_shared:${basefile}.files} ${basefile}-devel.files ${basefile}-prof.files \
|
sed -i -e "s!%{buildroot}!!g" %{!?without_shared:%{basepkg}.files} %{basepkg}-devel.files %{basepkg}-prof.files\
|
||||||
%{nil}
|
%{nil}
|
||||||
|
|
||||||
# compiler version
|
# compiler version
|
||||||
%ghc_version %{!?ghc_version_override:%(ghc --numeric-version)}%{?ghc_version_override}
|
%ghc_version %{!?ghc_version_override:%(ghc --numeric-version)}%{?ghc_version_override}
|
||||||
|
|
||||||
# create and install package.conf file
|
# create and install package.conf file
|
||||||
# cabal_pkg_conf [pkgname]
|
# cabal_pkg_conf [name] [version]
|
||||||
%cabal_pkg_conf \
|
%cabal_pkg_conf()\
|
||||||
|
%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||||
|
%define pkgver %{?2}%{!?2:%{version}}\
|
||||||
|
%define pkgnamever %{pkgname}-%{pkgver}\
|
||||||
%cabal register --gen-pkg-config\
|
%cabal register --gen-pkg-config\
|
||||||
mkdir -p $RPM_BUILD_ROOT%{ghcpkgbasedir}/package.conf.d \
|
mkdir -p %{buildroot}%{ghclibdir}/package.conf.d\
|
||||||
install --mode=0644 %{?1}%{!?1:%{pkg_name}}-%{version}.conf $RPM_BUILD_ROOT%{ghcpkgbasedir}/package.conf.d
|
install --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.d\
|
||||||
|
%{nil}
|
||||||
|
|
||||||
# devel pkg basic requires
|
# devel pkg basic requires
|
||||||
%ghc_requires Requires: ghc = %{ghc_version}\
|
%ghc_devel_requires Requires: ghc = %{ghc_version}\
|
||||||
Requires(post): ghc = %{ghc_version}\
|
Requires(post): ghc = %{ghc_version}\
|
||||||
Requires(postun): ghc = %{ghc_version}\
|
Requires(postun): ghc = %{ghc_version}\
|
||||||
%if 0%{!?without_shared:1}\
|
%if 0%{!?without_shared:1}\
|
||||||
Requires: ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}} = %{-v:%{-v*}}%{!-v:%{version}}-%{release}\
|
Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver:%{version}}-%{release}\
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# 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
|
# prof pkg basic requires
|
||||||
%ghc_prof_requires Requires: ghc-prof = %{ghc_version}\
|
%ghc_prof_requires Requires: ghc-prof = %{ghc_version}\
|
||||||
Requires: ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}}-devel = %{-v:%{-v*}}%{!-v:%{version}}-%{release}
|
Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}}-devel = %{?pkgver}%{!?pkgver:%{version}}-%{release}\
|
||||||
|
%{nil}
|
||||||
|
|
||||||
# ghc_lib_package [-n pkgname] [-c cdepslist] [-h pkgdepslist] (-o deprecated no-op)
|
# ghc_lib_package [-c cdepslist] [-h pkgdepslist] (-o deprecated no-op)
|
||||||
%ghc_lib_package(n:c:h:o:)\
|
%ghc_lib_package(c:h:o:)\
|
||||||
%define ghc_pkg_name ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}}\
|
%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||||
|
%define pkgver %{?2}%{!?2:%{version}}\
|
||||||
|
%define pkgnamever %{pkgname}-%{pkgver}\
|
||||||
|
%define basepkg ghc-%{pkgname}\
|
||||||
%if 0%{!?without_shared:1}\
|
%if 0%{!?without_shared:1}\
|
||||||
%files -n %{ghc_pkg_name} -f %{ghc_pkg_name}.files\
|
%files -n %{basepkg} -f %{basepkg}.files\
|
||||||
%defattr(-,root,root,-)\
|
%defattr(-,root,root,-)\
|
||||||
%endif\
|
%endif\
|
||||||
\
|
\
|
||||||
|
@ -89,20 +95,23 @@ Requires: ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}}-devel = %{-v:%{-v*}}%{!-v:%{v
|
||||||
%ghc_package_prof\
|
%ghc_package_prof\
|
||||||
%{nil}
|
%{nil}
|
||||||
|
|
||||||
# ghc_binlib_package [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-v version] (-o deprecated no-op)
|
# ghc_binlib_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] (-o deprecated no-op) [-x] [name] [version]
|
||||||
%ghc_binlib_package(n:c:h:l:v:o:)\
|
%ghc_binlib_package(c:h:l:o:x:)\
|
||||||
%define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\
|
%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||||
%define ghc_pkg_name ghc-%{local_pkg_name}\
|
%define pkgver %{?2}%{!?2:%{version}}\
|
||||||
%package -n %{ghc_pkg_name}\
|
%define pkgnamever %{pkgname}-%{pkgver}\
|
||||||
Summary: %{?common_summary}%{!?common_summary:%{local_pkg_name} library}\
|
%{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgnamever}}}\
|
||||||
|
%define basepkg ghc-%{pkgname}\
|
||||||
|
%package -n %{basepkg}\
|
||||||
|
Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library}\
|
||||||
Group: System Environment/Libraries\
|
Group: System Environment/Libraries\
|
||||||
%{-v:Version: %{-v*}}\
|
%{?1:Version: %{pkgver}}\
|
||||||
%{-l:License: %{-l*}}\
|
%{-l:License: %{-l*}}\
|
||||||
\
|
\
|
||||||
%description -n %{ghc_pkg_name}\
|
%description -n %{basepkg}\
|
||||||
%{?common_description}%{!?common_description:Haskell %{local_pkg_name} library.}\
|
%{?common_description}%{!?common_description:Haskell %{pkgname} library.}\
|
||||||
\
|
\
|
||||||
%if 0%{!?without_shared:1} \
|
%if 0%{?ghc_version:%{!?without_shared:1}}\
|
||||||
This package provides the shared library.\
|
This package provides the shared library.\
|
||||||
%endif\
|
%endif\
|
||||||
\
|
\
|
||||||
|
@ -114,91 +123,100 @@ This package provides the shared library.\
|
||||||
# for docs post and postun
|
# for docs post and postun
|
||||||
%ghc_reindex_haddock ( cd %{ghcdocbasedir}/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index ) || :
|
%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 deprecated no-op)
|
# ghc_package_devel [-c cdepslist] [-h pkgdepslist] [-l licensetag] (-o deprecated no-op) [name] [version]
|
||||||
%ghc_package_devel(n:c:h:l:v:o:)\
|
%ghc_package_devel(c:h:l:o:)\
|
||||||
%define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\
|
%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||||
%define ghc_pkg_name ghc-%{local_pkg_name}\
|
%define pkgver %{?2}%{!?2:%{version}}\
|
||||||
%package -n %{ghc_pkg_name}-devel\
|
%define pkgnamever %{pkgname}-%{pkgver}\
|
||||||
Summary: %{?common_summary}%{!?common_summary:%{local_pkg_name} library} development files\
|
%define basepkg ghc-%{pkgname}\
|
||||||
|
%package -n %{basepkg}-devel\
|
||||||
|
Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library} development files\
|
||||||
Group: Development/Libraries\
|
Group: Development/Libraries\
|
||||||
%{-v:Version: %{-v*}}\
|
%{?1:Version: %{pkgver}}\
|
||||||
%{-l:License: %{-l*}}\
|
%{-l:License: %{-l*}}\
|
||||||
%{?ghc_requires}\
|
%{?ghc_devel_requires}\
|
||||||
%{?ghc_doc_requires}\
|
|
||||||
%{!-h:%{?ghc_pkg_deps:Requires: %{ghc_pkg_deps}}}\
|
%{!-h:%{?ghc_pkg_deps:Requires: %{ghc_pkg_deps}}}\
|
||||||
%{-h:Requires: %{-h*}}\
|
%{-h:Requires: %{-h*}}\
|
||||||
%{!-c:%{?ghc_pkg_c_deps:Requires: %{ghc_pkg_c_deps}}}\
|
%{!-c:%{?ghc_pkg_c_deps:Requires: %{ghc_pkg_c_deps}}}\
|
||||||
%{-c:Requires: %{-c*}}\
|
%{-c:Requires: %{-c*}}\
|
||||||
%{?ghc_pkg_obsoletes:Obsoletes: %{ghc_pkg_obsoletes}}\
|
%{?ghc_pkg_obsoletes:Obsoletes: %{ghc_pkg_obsoletes}}\
|
||||||
%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-doc/g")}\
|
%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-doc/g")}\
|
||||||
Obsoletes: %{ghc_pkg_name}-doc < %{version}-%{release}\
|
Obsoletes: %{basepkg}-doc < %{version}-%{release}\
|
||||||
Provides: %{ghc_pkg_name}-doc = %{version}-%{release}\
|
Provides: %{basepkg}-doc = %{version}-%{release}\
|
||||||
\
|
\
|
||||||
%description -n %{ghc_pkg_name}-devel\
|
%description -n %{basepkg}-devel\
|
||||||
%{?common_description}%{!?common_description:Haskell %{local_pkg_name} library.}\
|
%{?common_description}%{!?common_description:Haskell %{pkgname} library.}\
|
||||||
\
|
\
|
||||||
This package contains the development files.\
|
This package contains the development files.\
|
||||||
\
|
\
|
||||||
%post -n %{ghc_pkg_name}-devel\
|
%post -n %{basepkg}-devel\
|
||||||
%ghc_pkg_recache\
|
%ghc_pkg_recache\
|
||||||
%ghc_reindex_haddock\
|
%ghc_reindex_haddock\
|
||||||
\
|
\
|
||||||
%postun -n %{ghc_pkg_name}-devel\
|
%postun -n %{basepkg}-devel\
|
||||||
%ghc_pkg_recache\
|
%ghc_pkg_recache\
|
||||||
%ghc_reindex_haddock\
|
%ghc_reindex_haddock\
|
||||||
\
|
\
|
||||||
%files -n %{ghc_pkg_name}-devel -f %{ghc_pkg_name}-devel.files\
|
%files -n %{basepkg}-devel -f %{basepkg}-devel.files\
|
||||||
%defattr(-,root,root,-)\
|
%defattr(-,root,root,-)\
|
||||||
%{nil}
|
%{nil}
|
||||||
|
|
||||||
# ghc_package_prof [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-v version]
|
# ghc_package_prof [-h pkgdepslist] [-l licensetag]
|
||||||
%ghc_package_prof(n:h:l:v:)\
|
%ghc_package_prof(h:l:)\
|
||||||
%define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\
|
%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||||
%define ghc_pkg_name ghc-%{local_pkg_name}\
|
%define pkgver %{?2}%{!?2:%{version}}\
|
||||||
%package -n %{ghc_pkg_name}-prof\
|
%define pkgnamever %{pkgname}-%{pkgver}\
|
||||||
Summary: Profiling libraries for %{?common_summary}%{!?common_summary:%{local_pkg_name}}\
|
%define basepkg ghc-%{pkgname}\
|
||||||
|
%package -n %{basepkg}-prof\
|
||||||
|
Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname}} profiling libraries\
|
||||||
Group: Development/Libraries\
|
Group: Development/Libraries\
|
||||||
%{-v:Version: %{-v*}}\
|
%{?1:Version: %{pkgver}}\
|
||||||
%{-l:License: %{-l*}}\
|
%{-l:License: %{-l*}}\
|
||||||
%{?ghc_prof_requires}\
|
%{?ghc_prof_requires}\
|
||||||
%{!-h:%{?ghc_pkg_deps:Requires: %(echo "%{ghc_pkg_deps}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-prof/g")}}\
|
%{!-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")}\
|
%{-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")}\
|
%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-prof/g")}\
|
||||||
\
|
\
|
||||||
%description -n %{ghc_pkg_name}-prof\
|
%description -n %{basepkg}-prof\
|
||||||
%{?common_description}%{!?common_description:Haskell %{local_pkg_name} library.}\
|
%{?common_description}%{!?common_description:Haskell %{pkgname} library.}\
|
||||||
\
|
\
|
||||||
This package contains the profiling library.\
|
This package contains the profiling development files.\
|
||||||
\
|
\
|
||||||
%files -n %{ghc_pkg_name}-prof -f %{ghc_pkg_name}-prof.files\
|
%files -n %{basepkg}-prof -f %{basepkg}-prof.files\
|
||||||
%defattr(-,root,root,-)\
|
%defattr(-,root,root,-)\
|
||||||
%{nil}
|
%{nil}
|
||||||
|
|
||||||
# ghc_strip_dynlinked
|
# ghc_strip_dynlinked
|
||||||
%ghc_strip_dynlinked\
|
%ghc_strip_dynlinked\
|
||||||
%if 0%{!?__debug_package:1}\
|
%if 0%{!?__debug_package:1}\
|
||||||
find $RPM_BUILD_ROOT -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -exec strip "{}" \\;\
|
find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -exec strip "{}" \\;\
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# ghc_bin_build
|
# ghc_bin_build
|
||||||
%ghc_bin_build\
|
%ghc_bin_build\
|
||||||
%cabal_configure --ghc\
|
%cabal_configure\
|
||||||
%cabal build
|
%cabal build
|
||||||
|
|
||||||
# ghc_lib_build
|
# ghc_lib_build [name] [version]
|
||||||
%ghc_lib_build\
|
%ghc_lib_build()\
|
||||||
%cabal_configure --ghc -p\
|
%{?1:cd %1-%2}\
|
||||||
|
%cabal_configure %{!?without_prof:-p} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2}\
|
||||||
%cabal build\
|
%cabal build\
|
||||||
%cabal haddock %{!?without_hscolour:--hyperlink-source} %{?with_devhelp:--haddock-option=--html-help=devhelp}
|
%{!?without_haddock:%cabal haddock %{!?without_hscolour:--hyperlink-source}}\
|
||||||
|
%{?1:cd -}\
|
||||||
|
%{nil}
|
||||||
|
|
||||||
# ghc_bin_install
|
# install bin package
|
||||||
%ghc_bin_install\
|
%ghc_bin_install\
|
||||||
%cabal_install\
|
%cabal_install\
|
||||||
%ghc_strip_dynlinked
|
%ghc_strip_dynlinked
|
||||||
|
|
||||||
# ghc_lib_install
|
# ghc_lib_install [name] [version]
|
||||||
%ghc_lib_install\
|
%ghc_lib_install()\
|
||||||
|
%{?1:cd %1-%2}\
|
||||||
%cabal_install\
|
%cabal_install\
|
||||||
%cabal_pkg_conf\
|
%cabal_pkg_conf\
|
||||||
|
%{?1:cd -}\
|
||||||
%ghc_gen_filelists\
|
%ghc_gen_filelists\
|
||||||
%ghc_strip_dynlinked
|
%{!?1:%ghc_strip_dynlinked}\
|
||||||
|
%{nil}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Name: ghc-rpm-macros
|
Name: ghc-rpm-macros
|
||||||
Version: 0.8.3
|
Version: 0.10.50
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Macros for building packages for GHC
|
Summary: Macros for building packages for GHC
|
||||||
|
|
||||||
|
@ -13,7 +13,6 @@ URL: https://fedoraproject.org/wiki/Haskell_SIG
|
||||||
Source0: ghc-rpm-macros.ghc
|
Source0: ghc-rpm-macros.ghc
|
||||||
Source1: COPYING
|
Source1: COPYING
|
||||||
Source2: AUTHORS
|
Source2: AUTHORS
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
|
@ -32,15 +31,10 @@ echo no build stage needed
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm
|
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}/%{_sysconfdir}/rpm/macros.ghc
|
||||||
|
|
||||||
|
|
||||||
%clean
|
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc COPYING AUTHORS
|
%doc COPYING AUTHORS
|
||||||
|
@ -48,10 +42,27 @@ rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Jan 29 2011 Jens Petersen <petersen@redhat.com> - 0.10.50-1
|
||||||
|
- merge subpackaging support from 0.11.4:
|
||||||
|
- drop ghcdocdir and ghcpkgdir
|
||||||
|
- new ghclibdocdir
|
||||||
|
- improve prof summary and description
|
||||||
|
- add without_prof and without_haddock option macros
|
||||||
|
- add ghc_binlib_package option to exclude package from ghc_packages_list
|
||||||
|
- condition lib base package additional description for srpm
|
||||||
|
- use buildroot instead of RPM_BUILD_ROOT
|
||||||
|
- rename ghcpkgbasedir to ghclibdir
|
||||||
|
- move name and version macro options (-n and -v) to optional args
|
||||||
|
- ghc_gen_filelists, ghc_lib_build, ghc_lib_install, cabal_pkg_conf
|
||||||
|
now take optional "[name] [version]" args
|
||||||
|
- drop with_devhelp since --html-help option gone from haddock-2.8.0
|
||||||
|
- rename ghc_requires to ghc_devel_requires
|
||||||
|
- drop ghc_doc_requires
|
||||||
|
|
||||||
* Wed Dec 29 2010 Jens Petersen <petersen@redhat.com> - 0.8.3-1
|
* Wed Dec 29 2010 Jens Petersen <petersen@redhat.com> - 0.8.3-1
|
||||||
- revert disabling debug_package, since with redhat-rpm-config installed
|
- revert disabling debug_package, since with redhat-rpm-config installed
|
||||||
the behaviour depended on the position of ghc_lib_package in the spec file
|
the behaviour depended on the position of ghc_lib_package in the spec file
|
||||||
(reported by narasim_7)
|
(reported by narasim)
|
||||||
|
|
||||||
* Thu Sep 30 2010 Jens Petersen <petersen@redhat.com> - 0.8.2-1
|
* Thu Sep 30 2010 Jens Petersen <petersen@redhat.com> - 0.8.2-1
|
||||||
- add ghc_pkg_obsoletes for obsoleting old packages
|
- add ghc_pkg_obsoletes for obsoleting old packages
|
||||||
|
|
Loading…
Reference in New Issue