no _pkgdocdir in RHEL7 and docdir path different to F20+

This commit is contained in:
Jens Petersen 2014-03-28 17:40:33 +09:00
parent 671df91867
commit 8f2ef1279a
2 changed files with 8 additions and 4 deletions

View File

@ -21,7 +21,7 @@ fi
# configure
%cabal_configure\
%ghc_check_bootstrap\
%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_pkgdocdir} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options} $cabal_configure_extra_options
%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options} $cabal_configure_extra_options
# install
%cabal_install %cabal copy --destdir=%{buildroot} -v
@ -87,7 +87,7 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.
# 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} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}} %{?1:--docdir=%{_docdir}/ghc-%1 --htmldir=%{ghclibdocdir}/%1} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci} --ghc-option=-O2\
%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci} --ghc-option=-O2\
%cabal build\
%{nil}
@ -133,6 +133,7 @@ fi
%{nil}
# ghc_fix_dynamic_rpath prog ...
# (assumes cwd = pkg_name!)
%ghc_fix_dynamic_rpath()\
%if %{undefined ghc_without_dynamic}\
if ! type chrpath > /dev/null; then exit 1; fi\
@ -140,7 +141,7 @@ PDIR=$(cd ..; pwd)\
for i in %*; do\
PROG=%{buildroot}%{_bindir}/$i\
if [ -x "$PROG" ]; then\
RPATH=$(chrpath $PROG| sed -e "s@^$PROG: RPATH=@@")\
RPATH=$(chrpath $PROG | sed -e "s@^$PROG: RPATH=@@")\
case $RPATH in\
*$PDIR*)\
NEWRPATH=$(echo $RPATH | sed -e "s@$PDIR@%{ghclibdir}@g" -e "s@/dist/build@@g")\

View File

@ -6,7 +6,7 @@
#%%global without_hscolour 1
Name: ghc-rpm-macros
Version: 1.2.4
Version: 1.2.5
Release: 1%{?dist}
Summary: RPM macros for building packages for GHC
@ -90,6 +90,9 @@ EOF
%changelog
* Fri Mar 28 2014 Jens Petersen <petersen@redhat.com> - 1.2.5-1
- handle no _pkgdocdir in RHEL7 and docdir path different to F20+
* Mon Mar 17 2014 Jens Petersen <petersen@redhat.com> - 1.2.4-1
- abort ghc_fix_dynamic_rpath if no chrpath