no _pkgdocdir in RHEL7 and docdir path different to F20+

epel9
Jens Petersen 11 years ago
parent 671df91867
commit 8f2ef1279a

@ -21,7 +21,7 @@ fi
# configure # configure
%cabal_configure\ %cabal_configure\
%ghc_check_bootstrap\ %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 # install
%cabal_install %cabal copy --destdir=%{buildroot} -v %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 [name] [version]
%ghc_lib_build_without_haddock()\ %ghc_lib_build_without_haddock()\
%global debug_package %{nil}\ %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\ %cabal build\
%{nil} %{nil}
@ -133,6 +133,7 @@ fi
%{nil} %{nil}
# ghc_fix_dynamic_rpath prog ... # ghc_fix_dynamic_rpath prog ...
# (assumes cwd = pkg_name!)
%ghc_fix_dynamic_rpath()\ %ghc_fix_dynamic_rpath()\
%if %{undefined ghc_without_dynamic}\ %if %{undefined ghc_without_dynamic}\
if ! type chrpath > /dev/null; then exit 1; fi\ if ! type chrpath > /dev/null; then exit 1; fi\
@ -140,7 +141,7 @@ PDIR=$(cd ..; pwd)\
for i in %*; do\ for i in %*; do\
PROG=%{buildroot}%{_bindir}/$i\ PROG=%{buildroot}%{_bindir}/$i\
if [ -x "$PROG" ]; then\ if [ -x "$PROG" ]; then\
RPATH=$(chrpath $PROG| sed -e "s@^$PROG: RPATH=@@")\ RPATH=$(chrpath $PROG | sed -e "s@^$PROG: RPATH=@@")\
case $RPATH in\ case $RPATH in\
*$PDIR*)\ *$PDIR*)\
NEWRPATH=$(echo $RPATH | sed -e "s@$PDIR@%{ghclibdir}@g" -e "s@/dist/build@@g")\ NEWRPATH=$(echo $RPATH | sed -e "s@$PDIR@%{ghclibdir}@g" -e "s@/dist/build@@g")\

@ -6,7 +6,7 @@
#%%global without_hscolour 1 #%%global without_hscolour 1
Name: ghc-rpm-macros Name: ghc-rpm-macros
Version: 1.2.4 Version: 1.2.5
Release: 1%{?dist} Release: 1%{?dist}
Summary: RPM macros for building packages for GHC Summary: RPM macros for building packages for GHC
@ -90,6 +90,9 @@ EOF
%changelog %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 * Mon Mar 17 2014 Jens Petersen <petersen@redhat.com> - 1.2.4-1
- abort ghc_fix_dynamic_rpath if no chrpath - abort ghc_fix_dynamic_rpath if no chrpath

Loading…
Cancel
Save