1
0
ghc-rpm-macros/buildService.patch

100 lines
4.6 KiB
Diff

diff -Nur 0.95.1/ghc-rpm-macros.ghc 0.95.1-suse-packaging/ghc-rpm-macros.ghc
--- 0.95.1/ghc-rpm-macros.ghc 2012-06-24 11:03:15.000000000 +0200
+++ 0.95.1-suse-packaging/ghc-rpm-macros.ghc 2012-06-24 11:30:57.000000000 +0200
@@ -21,13 +21,14 @@
# 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_dynamic:--enable-executable-dynamic} %{?cabal_configure_options} $cabal_configure_extra_options
+%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options} $cabal_configure_extra_options
# install
%cabal_install %cabal copy --destdir=%{buildroot} -v
# root dir for ghc docs
-%ghcdocbasedir %{_docdir}/ghc/html
+%ghcdocroot %{_datadir}/doc/ghc
+%ghcdocbasedir %{ghcdocroot}/html
# libraries doc dir
%ghclibdocdir %{ghcdocbasedir}/libraries
# top library dir
@@ -50,19 +51,19 @@
%endif\
%if %{defined ghc_without_shared}\
if [ "%{name}" = "%{basepkg}" -o -n "%{?1}" ]; then\
- if [ -d "%{buildroot}%{_docdir}/%{basepkg}-%{pkgver}" ]; then\
- mv %{buildroot}%{_docdir}/%{basepkg}-%{pkgver} %{buildroot}%{_docdir}/%{basepkg}-devel-%{pkgver}\
+ if [ -d "%{buildroot}%{_docdir}/%{basepkg}" ]; then\
+ mv %{buildroot}%{_docdir}/%{basepkg} %{buildroot}%{_docdir}/%{basepkg}-devel\
%if %{undefined ghc_exclude_docdir}\
- echo "%{_docdir}/%{basepkg}-devel-%{version}" >> %{basepkg}-devel.files\
+ echo "%{_docdir}/%{basepkg}-devel" >> %{basepkg}-devel.files\
%endif\
fi\
fi\
%endif\
%if %{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\
+if [ -d "%{buildroot}%{_docdir}/%{name}" ]; then\
+ echo "%{_docdir}/%{name}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\
+elif [ -d "%{buildroot}%{_docdir}/ghc-%{pkgname}" ]; then\
+ echo "%{_docdir}/ghc-%{pkgname}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\
fi\
%endif\
echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf" >> %{basepkg}-devel.files\
@@ -109,6 +110,7 @@
%ghc_shared_files\
%if %{undefined ghc_without_shared}\
%files -n %{basepkg} -f %{basepkg}.files\
+%defattr(-,root,root,-)\
%{?base_doc_files:%doc %base_doc_files}\
%endif\
%{nil}
@@ -129,7 +131,7 @@
%define basepkg ghc-%{pkgname}\
%package -n %{basepkg}\
Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library}\
-Group: System Environment/Libraries\
+Group: System/Libraries\
%{?1:Version: %{pkgver}}\
%{-l:License: %{-l*}}\
%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1/g")}
@@ -165,6 +167,7 @@
%ghc_devel_files\
%files -n %{basepkg}-devel -f %{basepkg}-devel.files\
+%defattr(-,root,root,-)\
%if %{defined ghc_without_shared}\
%{?base_doc_files:%doc %base_doc_files}\
%endif\
@@ -187,7 +190,7 @@
%define basepkg ghc-%{pkgname}\
%package -n %{basepkg}-devel\
Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library} development files\
-Group: Development/Libraries\
+Group: Development/Libraries/Other\
%{?1:Version: %{pkgver}}\
%{-l:License: %{-l*}}\
%{?ghc_devel_requires}\
@@ -196,8 +199,6 @@
%{-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
@@ -249,7 +250,7 @@
# ghc_lib_build_without_haddock [name] [version]
%ghc_lib_build_without_haddock()\
%global debug_package %{nil}\
-%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2} %{!?ghc_with_lib_for_ghci:--disable-library-for-ghci}\
+%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?1:--docdir=%{_docdir}/ghc-%1 --htmldir=%{ghclibdocdir}/%1} %{!?ghc_with_lib_for_ghci:--disable-library-for-ghci}\
%cabal build\
%{nil}