forked from pool/ghc-rpm-macros
Accepting request 126225 from home:ptrommler:haskell-platform
Update to latest form upstream. Fix obsoletes rpmlint warning. OBS-URL: https://build.opensuse.org/request/show/126225 OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc-rpm-macros?expand=0&rev=7
This commit is contained in:
parent
ec03c230db
commit
719f02c951
@ -1,24 +1,12 @@
|
||||
diff -Nur 0.90/ghc-deps.sh 0.90-suse-packaging/ghc-deps.sh
|
||||
--- 0.90/ghc-deps.sh 2012-04-23 17:36:55.000000000 +0200
|
||||
+++ 0.90-suse-packaging/ghc-deps.sh 2012-04-26 16:08:59.000000000 +0200
|
||||
@@ -68,7 +68,7 @@
|
||||
fi
|
||||
elif [ "$MODE" = "--requires" ]; then
|
||||
if file $i | grep -q 'executable, .* dynamically linked'; then
|
||||
- BIN_DEPS=$(ldd $i | grep libHS | grep -v libHSrts | sed -e "s%^\\tlibHS\(.*\)-ghc${GHCVERSION}.so =.*%\1%")
|
||||
+ BIN_DEPS=$(ldd $i | grep libHS | grep -v libHSrts | grep -v libHSffi | sed -e "s%^\\tlibHS\(.*\)-ghc${GHCVERSION}.so =.*%\1%")
|
||||
for p in ${BIN_DEPS}; do
|
||||
HASH=$(${GHC_PKG} --global field $p id | sed -e "s/^id: \+//")
|
||||
echo "ghc($HASH)"
|
||||
diff -Nur 0.90/ghc-rpm-macros.ghc 0.90-suse-packaging/ghc-rpm-macros.ghc
|
||||
--- 0.90/ghc-rpm-macros.ghc 2012-04-23 17:36:47.000000000 +0200
|
||||
+++ 0.90-suse-packaging/ghc-rpm-macros.ghc 2012-04-26 16:10:36.000000000 +0200
|
||||
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_shared:--enable-shared} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options}
|
||||
+%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_shared:--enable-shared} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options}
|
||||
-%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
|
||||
@ -32,20 +20,20 @@ diff -Nur 0.90/ghc-rpm-macros.ghc 0.90-suse-packaging/ghc-rpm-macros.ghc
|
||||
# top library dir
|
||||
@@ -50,19 +51,19 @@
|
||||
%endif\
|
||||
%if 0%{!?1:1} && %{defined ghc_without_shared}\
|
||||
if [ "%{name}" = "ghc-%{pkg_name}" ]; then\
|
||||
- if [ -d "%{buildroot}%{_docdir}/%{name}-%{version}" ]; then\
|
||||
- mv %{buildroot}%{_docdir}/%{name}-%{version} %{buildroot}%{_docdir}/%{name}-devel-%{version}\
|
||||
+ if [ -d "%{buildroot}%{_docdir}/%{name}" ]; then\
|
||||
+ mv %{buildroot}%{_docdir}/%{name} %{buildroot}%{_docdir}/%{name}-devel\
|
||||
%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}/%{name}-devel-%{version}" >> %{basepkg}-devel.files\
|
||||
+ echo "%{_docdir}/%{name}-devel" >> %{basepkg}-devel.files\
|
||||
- echo "%{_docdir}/%{basepkg}-devel-%{version}" >> %{basepkg}-devel.files\
|
||||
+ echo "%{_docdir}/%{basepkg}-devel" >> %{basepkg}-devel.files\
|
||||
%endif\
|
||||
fi\
|
||||
fi\
|
||||
%endif\
|
||||
%if 0%{!?1:1} && %{undefined ghc_exclude_docdir}\
|
||||
%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\
|
||||
@ -57,7 +45,7 @@ diff -Nur 0.90/ghc-rpm-macros.ghc 0.90-suse-packaging/ghc-rpm-macros.ghc
|
||||
fi\
|
||||
%endif\
|
||||
echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf" >> %{basepkg}-devel.files\
|
||||
@@ -105,6 +106,7 @@
|
||||
@@ -109,6 +110,7 @@
|
||||
%ghc_shared_files\
|
||||
%if %{undefined ghc_without_shared}\
|
||||
%files -n %{basepkg} -f %{basepkg}.files\
|
||||
@ -65,16 +53,16 @@ diff -Nur 0.90/ghc-rpm-macros.ghc 0.90-suse-packaging/ghc-rpm-macros.ghc
|
||||
%{?base_doc_files:%doc %base_doc_files}\
|
||||
%endif\
|
||||
%{nil}
|
||||
@@ -125,7 +127,7 @@
|
||||
@@ -129,7 +131,7 @@
|
||||
%define basepkg ghc-%{pkgname}\
|
||||
%package -n %{basepkg}\
|
||||
Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library}\
|
||||
-Group: System Environment/Libraries\
|
||||
+Group: Development/Libraries/Other\
|
||||
+Group: System/Libraries\
|
||||
%{?1:Version: %{pkgver}}\
|
||||
%{-l:License: %{-l*}}\
|
||||
%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1/g")}
|
||||
@@ -161,6 +163,7 @@
|
||||
@@ -165,6 +167,7 @@
|
||||
|
||||
%ghc_devel_files\
|
||||
%files -n %{basepkg}-devel -f %{basepkg}-devel.files\
|
||||
@ -82,7 +70,7 @@ diff -Nur 0.90/ghc-rpm-macros.ghc 0.90-suse-packaging/ghc-rpm-macros.ghc
|
||||
%if %{defined ghc_without_shared}\
|
||||
%{?base_doc_files:%doc %base_doc_files}\
|
||||
%endif\
|
||||
@@ -182,7 +185,7 @@
|
||||
@@ -187,7 +190,7 @@
|
||||
%define basepkg ghc-%{pkgname}\
|
||||
%package -n %{basepkg}-devel\
|
||||
Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library} development files\
|
||||
@ -91,12 +79,21 @@ diff -Nur 0.90/ghc-rpm-macros.ghc 0.90-suse-packaging/ghc-rpm-macros.ghc
|
||||
%{?1:Version: %{pkgver}}\
|
||||
%{-l:License: %{-l*}}\
|
||||
%{?ghc_devel_requires}\
|
||||
@@ -245,7 +248,7 @@
|
||||
%ghc_lib_build()\
|
||||
@@ -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}\
|
||||
%{?1:cd %1-%2}\
|
||||
-%cabal_configure %{!?without_prof:-p} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2}\
|
||||
+%cabal_configure %{!?without_prof:-p} %{?1:--docdir=%{_docdir}/ghc-%1 --htmldir=%{ghclibdocdir}/%1-%2}\
|
||||
-%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\
|
||||
%if %{undefined without_haddock}\
|
||||
%cabal haddock %{!?without_hscolour:%(if [ -x %{_bindir}/HsColour ]; then echo --hyperlink-source; fi)}\
|
||||
%{nil}
|
||||
|
||||
|
34
cabal-tweak-dep-ver
Normal file
34
cabal-tweak-dep-ver
Normal file
@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e +x
|
||||
|
||||
USAGE="Usage: $0 dep old new"
|
||||
|
||||
if [ $# -ne 3 ]; then
|
||||
echo "$USAGE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DEP=$1
|
||||
OLD=$(echo $2 | sed -e "s/*/\\\\*/g" -e "s/\./\\\\./g")
|
||||
NEW=$3
|
||||
|
||||
CABALFILE=$(ls *.cabal)
|
||||
|
||||
if [ $(echo $CABALFILE | wc -w) -ne 1 ]; then
|
||||
echo "There needs to be one .cabal file in the current dir!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
BREAK=[^[:alnum:]-]
|
||||
|
||||
if ! grep -q "$BREAK$DEP$BREAK[^,]*$OLD" $CABALFILE; then
|
||||
echo "$CABALFILE does not match: $DEP $OLD"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f $CABALFILE.orig ]; then
|
||||
BACKUP=.orig
|
||||
fi
|
||||
|
||||
sed -i$BACKUP -e "s/\($BREAK$DEP$BREAK[^,]*\)$OLD/\1$NEW/g" $CABALFILE
|
@ -16,7 +16,7 @@ GHC_VER=$(basename $PKGBASEDIR | sed -e s/ghc-//)
|
||||
if [ ! -x "/usr/bin/ghc-pkg-${GHC_VER}" -a -x "$PKGBASEDIR/ghc-pkg" ]; then
|
||||
GHC_PKG="$PKGBASEDIR/ghc-pkg --global-conf=$PKGCONFDIR"
|
||||
else
|
||||
GHC_PKG=/usr/bin/ghc-pkg
|
||||
GHC_PKG="/usr/bin/ghc-pkg"
|
||||
fi
|
||||
|
||||
case $MODE in
|
||||
@ -69,8 +69,11 @@ for i in $files; do
|
||||
elif [ "$MODE" = "--requires" ]; then
|
||||
if file $i | grep -q 'executable, .* dynamically linked'; then
|
||||
BIN_DEPS=$(ldd $i | grep libHS | grep -v libHSrts | sed -e "s%^\\tlibHS\(.*\)-ghc${GHCVERSION}.so =.*%\1%")
|
||||
if [ -d "$PKGCONFDIR" ]; then
|
||||
PACKAGE_CONF_OPT="--package-conf=$PKGCONFDIR"
|
||||
fi
|
||||
for p in ${BIN_DEPS}; do
|
||||
HASH=$(${GHC_PKG} --global field $p id | sed -e "s/^id: \+//")
|
||||
HASH=$(${GHC_PKG} --global $PACKAGE_CONF_OPT field $p id | sed -e "s/^id: \+//")
|
||||
echo "ghc($HASH)"
|
||||
done
|
||||
fi
|
||||
|
@ -1,3 +1,52 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 25 06:57:15 UTC 2012 - peter.trommler@ohm-hochschule.de
|
||||
|
||||
- update to 0.95.5.1 from upstream
|
||||
- cabal-tweak-dep-ver: be careful only to match complete dep name and
|
||||
do not match beyond ","
|
||||
|
||||
- some cabal-tweak-dep-ver improvements:
|
||||
- show file name when no match
|
||||
- backslash quote . and * in the match string
|
||||
- create a backup file if none exists
|
||||
|
||||
- new cabal-tweak-dep-ver script to tweak depends version bounds in .cabal
|
||||
|
||||
- ghc-dep.sh: only use buildroot package.conf.d if it exists
|
||||
|
||||
- ghc-deps.sh: look in buildroot package.conf.d for program deps
|
||||
|
||||
- add a meta-package option to ghc_devel_package and use in ghc_devel_requires
|
||||
|
||||
- let ghc_bin_install take an arg to disable implicit stripping for subpackages
|
||||
|
||||
- allow ghc_description, ghc_devel_description, ghc_devel_post_postun
|
||||
to take args
|
||||
|
||||
- fix doc handling of subpackages for ghc_without_shared
|
||||
|
||||
- move --disable-library-for-ghci to ghc_lib_build
|
||||
- revert back to fallback behaviour for common_summary and common_description
|
||||
since it is needed for ghc and haskell-platform subpackaging
|
||||
- without ghc_exclude_docdir include doc dir also for subpackages
|
||||
|
||||
- no longer build redundant ghci .o library files
|
||||
- support meta packages like haskell-platform without base lib files
|
||||
- make it possible not to have to use common_summary and common_description
|
||||
- rename ghc_binlib_package to ghc_lib_subpackage
|
||||
- add ghc_lib_build_without_haddock
|
||||
- no longer drop into package dirs when subpackaging with ghc_lib_build and
|
||||
ghc_lib_install
|
||||
- add shell variable cabal_configure_extra_options to cabal_configure for
|
||||
local configuration
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jun 24 08:53:28 UTC 2012 - peter.trommler@ohm-hochschule.de
|
||||
|
||||
- cleaned up file list
|
||||
- remove Obsoletes clauses from macros (buildService.patch)
|
||||
- rebased sle-sp1-rpmdeps.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat May 5 10:02:41 UTC 2012 - peter.trommler@ohm-hochschule.de
|
||||
|
||||
|
@ -21,7 +21,7 @@ fi
|
||||
# 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_shared:--enable-shared} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options}
|
||||
%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
|
||||
|
||||
# install
|
||||
%cabal_install %cabal copy --destdir=%{buildroot} -v
|
||||
@ -48,17 +48,17 @@ echo "%dir %{pkgdir}" >> %{basepkg}.files\
|
||||
echo "%attr(755,root,root) %{pkgdir}/libHS%{pkgnamever}-ghc%{ghc_version}.so" >> %{basepkg}.files\
|
||||
fi\
|
||||
%endif\
|
||||
%if 0%{!?1:1} && %{defined ghc_without_shared}\
|
||||
if [ "%{name}" = "ghc-%{pkg_name}" ]; then\
|
||||
if [ -d "%{buildroot}%{_docdir}/%{name}-%{version}" ]; then\
|
||||
mv %{buildroot}%{_docdir}/%{name}-%{version} %{buildroot}%{_docdir}/%{name}-devel-%{version}\
|
||||
%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 %{undefined ghc_exclude_docdir}\
|
||||
echo "%{_docdir}/%{name}-devel-%{version}" >> %{basepkg}-devel.files\
|
||||
echo "%{_docdir}/%{basepkg}-devel-%{version}" >> %{basepkg}-devel.files\
|
||||
%endif\
|
||||
fi\
|
||||
fi\
|
||||
%endif\
|
||||
%if 0%{!?1:1} && %{undefined ghc_exclude_docdir}\
|
||||
%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\
|
||||
@ -73,7 +73,11 @@ 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\
|
||||
for i in %{!?ghc_without_shared:%{basepkg}.files} %{basepkg}-devel.files; do\
|
||||
if [ -f "$i" ]; then\
|
||||
sed -i -e "s!%{buildroot}!!g" $i\
|
||||
fi\
|
||||
done\
|
||||
%{nil}
|
||||
|
||||
%ghc_add_basepkg_file()\
|
||||
@ -98,7 +102,7 @@ install --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.d\
|
||||
%ghc_devel_requires Requires: ghc-compiler = %{ghc_version}\
|
||||
Requires(post): ghc-compiler = %{ghc_version}\
|
||||
Requires(postun): ghc-compiler = %{ghc_version}\
|
||||
%if %{undefined ghc_without_shared}\
|
||||
%if %{undefined ghc_without_shared} && 0%{!?-m:1}\
|
||||
Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver:%{version}}-%{release}\
|
||||
%endif
|
||||
|
||||
@ -131,7 +135,7 @@ Group: System Environment/Libraries\
|
||||
%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1/g")}
|
||||
|
||||
# ghc_description [name] [version]
|
||||
%ghc_description\
|
||||
%ghc_description()\
|
||||
%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
%define basepkg ghc-%{pkgname}\
|
||||
%description -n %{basepkg}\
|
||||
@ -140,8 +144,8 @@ Group: System Environment/Libraries\
|
||||
This package provides the shared library.\
|
||||
%endif
|
||||
|
||||
# ghc_binlib_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-x] [name] [version]
|
||||
%ghc_binlib_package(c:h:l:x)\
|
||||
# ghc_lib_subpackage [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-x] [name] [version]
|
||||
%ghc_lib_subpackage(c:h:l:x)\
|
||||
%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
%define pkgver %{?2}%{!?2:%{version}}\
|
||||
%define pkgnamever %{pkgname}-%{pkgver}\
|
||||
@ -175,8 +179,9 @@ This package provides the shared library.\
|
||||
%ghc_devel_files\
|
||||
%{nil}
|
||||
|
||||
# ghc_devel_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [name] [version]
|
||||
%ghc_devel_package(c:h:l:)\
|
||||
# ghc_devel_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-m] [name] [version]
|
||||
# -m : meta-package
|
||||
%ghc_devel_package(c:h:l:m)\
|
||||
%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
%define pkgver %{?2}%{!?2:%{version}}\
|
||||
%define basepkg ghc-%{pkgname}\
|
||||
@ -198,7 +203,7 @@ Provides: %{basepkg}-prof = %{pkgver}-%{release}\
|
||||
%endif
|
||||
|
||||
# ghc_devel_description
|
||||
%ghc_devel_description\
|
||||
%ghc_devel_description()\
|
||||
%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
%define basepkg ghc-%{pkgname}\
|
||||
%description -n %{basepkg}-devel\
|
||||
@ -207,7 +212,7 @@ Provides: %{basepkg}-prof = %{pkgver}-%{release}\
|
||||
This package contains the development files.
|
||||
|
||||
# ghc_devel_post_postun
|
||||
%ghc_devel_post_postun\
|
||||
%ghc_devel_post_postun()\
|
||||
%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
%define basepkg ghc-%{pkgname}\
|
||||
%post -n %{basepkg}-devel\
|
||||
@ -241,38 +246,36 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \
|
||||
%cabal_configure\
|
||||
%cabal build
|
||||
|
||||
# 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 build\
|
||||
%{nil}
|
||||
|
||||
# ghc_lib_build [name] [version]
|
||||
%ghc_lib_build()\
|
||||
%global debug_package %{nil}\
|
||||
%{?1:cd %1-%2}\
|
||||
%cabal_configure %{!?without_prof:-p} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2}\
|
||||
%cabal build\
|
||||
%ghc_lib_build_without_haddock\
|
||||
%if %{undefined without_haddock}\
|
||||
%cabal haddock %{!?without_hscolour:%(if [ -x %{_bindir}/HsColour ]; then echo --hyperlink-source; fi)}\
|
||||
%endif\
|
||||
%{?1:cd -}\
|
||||
%{nil}
|
||||
|
||||
# install bin package
|
||||
%ghc_bin_install\
|
||||
%if %{undefined ghc_bootstrapping}\
|
||||
%ghc_bin_install()\
|
||||
%global _use_internal_dependency_generator 0\
|
||||
%global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\
|
||||
%endif\
|
||||
%cabal_install\
|
||||
%ghc_strip_dynlinked
|
||||
%{!?1:%ghc_strip_dynlinked}\
|
||||
%{nil}
|
||||
|
||||
# ghc_lib_install [name] [version]
|
||||
%ghc_lib_install()\
|
||||
%if %{undefined ghc_bootstrapping}\
|
||||
%global _use_internal_dependency_generator 0\
|
||||
%global __find_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir}\
|
||||
%global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\
|
||||
%endif\
|
||||
%{?1:cd %1-%2}\
|
||||
%cabal_install\
|
||||
%cabal_pkg_conf\
|
||||
%{?1:cd -}\
|
||||
%ghc_gen_filelists\
|
||||
%{!?1:%ghc_strip_dynlinked}\
|
||||
%{nil}
|
||||
|
@ -21,7 +21,7 @@
|
||||
%global macros_file %{_sysconfdir}/rpm/macros.ghc
|
||||
|
||||
Name: ghc-rpm-macros
|
||||
Version: 0.90
|
||||
Version: 0.95.5.1
|
||||
Release: 1
|
||||
Summary: Macros for building packages for GHC
|
||||
|
||||
@ -37,6 +37,7 @@ Source1: COPYING
|
||||
Source2: AUTHORS
|
||||
Source3: ghc-deps.sh
|
||||
Source4: macros.ghc-suse
|
||||
Source5: cabal-tweak-dep-ver
|
||||
Patch: buildService.patch
|
||||
Patch1: sle-sp1-rpmdeps.patch
|
||||
#Requires: redhat-rpm-config
|
||||
@ -69,6 +70,7 @@ install -p -D -m 0644 ./ghc-rpm-macros.ghc ${RPM_BUILD_ROOT}/%{macros_file}
|
||||
install -p -D -m 0644 %{SOURCE4} ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm/macros.ghc-suse
|
||||
|
||||
install -p -D -m 0755 ghc-deps.sh %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh
|
||||
install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-dep-ver
|
||||
|
||||
# this is why this package is now arch-dependent:
|
||||
# turn off shared libs and dynamic linking on secondary archs
|
||||
@ -88,6 +90,6 @@ EOF
|
||||
%config(noreplace) %{macros_file}
|
||||
%config(noreplace) %{_sysconfdir}/rpm/macros.ghc-suse
|
||||
%{_prefix}/lib/rpm/ghc-deps.sh
|
||||
#%{_prefix}/lib/rpm/magic
|
||||
%{_bindir}/cabal-tweak-dep-ver
|
||||
|
||||
%changelog
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -Nur 0.90-suse-packaging/ghc-deps.sh 0.90-sle-rpmdeps/ghc-deps.sh
|
||||
--- 0.90-suse-packaging/ghc-deps.sh 2012-04-26 16:08:59.000000000 +0200
|
||||
+++ 0.90-sle-rpmdeps/ghc-deps.sh 2012-04-26 16:16:10.000000000 +0200
|
||||
diff -Nur 0.95.1-suse-packaging/ghc-deps.sh 0.95.1-sle-sp1-rpmdeps/ghc-deps.sh
|
||||
--- 0.95.1-suse-packaging/ghc-deps.sh 2012-06-24 11:03:36.000000000 +0200
|
||||
+++ 0.95.1-sle-sp1-rpmdeps/ghc-deps.sh 2012-06-24 11:18:57.000000000 +0200
|
||||
@@ -20,8 +20,8 @@
|
||||
fi
|
||||
|
||||
@ -12,22 +12,720 @@ diff -Nur 0.90-suse-packaging/ghc-deps.sh 0.90-sle-rpmdeps/ghc-deps.sh
|
||||
*) echo "`basename $0`: Need --provides or --requires" ; exit 1
|
||||
esac
|
||||
|
||||
@@ -77,4 +77,4 @@
|
||||
@@ -80,4 +80,4 @@
|
||||
fi
|
||||
done
|
||||
|
||||
-echo $files | tr [:blank:] '\n' | /usr/lib/rpm/rpmdeps $MODE
|
||||
+echo $files | tr [:blank:] '\n' | /usr/lib/rpm/find$FINDMODE
|
||||
diff -Nur 0.90-suse-packaging/ghc-rpm-macros.ghc 0.90-sle-rpmdeps/ghc-rpm-macros.ghc
|
||||
--- 0.90-suse-packaging/ghc-rpm-macros.ghc 2012-04-26 16:10:36.000000000 +0200
|
||||
+++ 0.90-sle-rpmdeps/ghc-rpm-macros.ghc 2012-04-26 16:16:10.000000000 +0200
|
||||
@@ -256,6 +256,9 @@
|
||||
%{?1:cd -}\
|
||||
diff -Nur 0.95.1-suse-packaging/ghc-deps.sh.orig 0.95.1-sle-sp1-rpmdeps/ghc-deps.sh.orig
|
||||
--- 0.95.1-suse-packaging/ghc-deps.sh.orig 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ 0.95.1-sle-sp1-rpmdeps/ghc-deps.sh.orig 2012-06-24 11:17:51.000000000 +0200
|
||||
@@ -0,0 +1,83 @@
|
||||
+#!/bin/sh
|
||||
+# find rpm provides and requires for Haskell GHC libraries
|
||||
+
|
||||
+# To use add the following lines to spec file:
|
||||
+# %define _use_internal_dependency_generator 0
|
||||
+# %define __find_requires /usr/lib/rpm/ghc-deps.sh --requires %{buildroot}%{ghclibdir}
|
||||
+# %define __find_provides /usr/lib/rpm/ghc-deps.sh --provides %{buildroot}%{ghclibdir}
|
||||
+
|
||||
+[ $# -ne 2 ] && echo "Usage: `basename $0` [--provides|--requires] %{buildroot}%{ghclibdir}" && exit 1
|
||||
+
|
||||
+MODE=$1
|
||||
+PKGBASEDIR=$2
|
||||
+PKGCONFDIR=$PKGBASEDIR/package.conf.d
|
||||
+GHC_VER=$(basename $PKGBASEDIR | sed -e s/ghc-//)
|
||||
+
|
||||
+if [ ! -x "/usr/bin/ghc-pkg-${GHC_VER}" -a -x "$PKGBASEDIR/ghc-pkg" ]; then
|
||||
+ GHC_PKG="$PKGBASEDIR/ghc-pkg --global-conf=$PKGCONFDIR"
|
||||
+else
|
||||
+ GHC_PKG="/usr/bin/ghc-pkg"
|
||||
+fi
|
||||
+
|
||||
+case $MODE in
|
||||
+ --provides) FIELD=id ;;
|
||||
+ --requires) FIELD=depends ;;
|
||||
+ *) echo "`basename $0`: Need --provides or --requires" ; exit 1
|
||||
+esac
|
||||
+
|
||||
+if [ -d "$PKGBASEDIR" ]; then
|
||||
+ SHARED=$(find $PKGBASEDIR -type f -name '*.so')
|
||||
+fi
|
||||
+
|
||||
+GHCVERSION=$(ghc --numeric-version)
|
||||
+
|
||||
+files=$(cat)
|
||||
+
|
||||
+#set -x
|
||||
+
|
||||
+for i in $files; do
|
||||
+ LIB_FILE=$(echo $i | grep /libHS | egrep -v "$PKGBASEDIR/libHS")
|
||||
+ if [ "$LIB_FILE" ]; then
|
||||
+ if [ -d "$PKGCONFDIR" ]; then
|
||||
+ META=""
|
||||
+ SELF=""
|
||||
+ case $LIB_FILE in
|
||||
+ *.so) META=ghc ;;
|
||||
+ *.a) META=ghc-devel
|
||||
+ if [ "$SHARED" ]; then
|
||||
+ SELF=ghc
|
||||
+ fi
|
||||
+ ;;
|
||||
+ esac
|
||||
+ if [ "$META" ]; then
|
||||
+ PKGVER=$(echo $LIB_FILE | sed -e "s%$PKGBASEDIR/\([^/]\+\)/libHS.*%\1%")
|
||||
+ HASHS=$(${GHC_PKG} -f $PKGCONFDIR field $PKGVER $FIELD | sed -e "s/^$FIELD: \+//")
|
||||
+ for i in $HASHS; do
|
||||
+ case $i in
|
||||
+ *-*) echo "$META($i)" ;;
|
||||
+ *) ;;
|
||||
+ esac
|
||||
+ done
|
||||
+ if [ "$MODE" = "--requires" -a "$SELF" ]; then
|
||||
+ HASHS=$(${GHC_PKG} -f $PKGCONFDIR field $PKGVER id | sed -e "s/^id: \+//")
|
||||
+ for i in $HASHS; do
|
||||
+ echo "$SELF($i)"
|
||||
+ done
|
||||
+ fi
|
||||
+ fi
|
||||
+ fi
|
||||
+ elif [ "$MODE" = "--requires" ]; then
|
||||
+ if file $i | grep -q 'executable, .* dynamically linked'; then
|
||||
+ BIN_DEPS=$(ldd $i | grep libHS | grep -v libHSrts | sed -e "s%^\\tlibHS\(.*\)-ghc${GHCVERSION}.so =.*%\1%")
|
||||
+ if [ -d "$PKGCONFDIR" ]; then
|
||||
+ PACKAGE_CONF_OPT="--package-conf=$PKGCONFDIR"
|
||||
+ fi
|
||||
+ for p in ${BIN_DEPS}; do
|
||||
+ HASH=$(${GHC_PKG} --global $PACKAGE_CONF_OPT field $p id | sed -e "s/^id: \+//")
|
||||
+ echo "ghc($HASH)"
|
||||
+ done
|
||||
+ fi
|
||||
+ fi
|
||||
+done
|
||||
+
|
||||
+echo $files | tr [:blank:] '\n' | /usr/lib/rpm/rpmdeps $MODE
|
||||
diff -Nur 0.95.1-suse-packaging/ghc-rpm-macros.ghc 0.95.1-sle-sp1-rpmdeps/ghc-rpm-macros.ghc
|
||||
--- 0.95.1-suse-packaging/ghc-rpm-macros.ghc 2012-06-24 11:30:57.000000000 +0200
|
||||
+++ 0.95.1-sle-sp1-rpmdeps/ghc-rpm-macros.ghc 2012-06-24 11:30:09.000000000 +0200
|
||||
@@ -262,6 +262,9 @@
|
||||
%endif\
|
||||
%{nil}
|
||||
|
||||
+# SLE does not define _rpmconfigdir (yet)
|
||||
+%_rpmconfigdir %{_prefix}/lib/rpm
|
||||
+
|
||||
# install bin package
|
||||
%ghc_bin_install\
|
||||
%if %{undefined ghc_bootstrapping}\
|
||||
%ghc_bin_install()\
|
||||
%global _use_internal_dependency_generator 0\
|
||||
diff -Nur 0.95.1-suse-packaging/ghc-rpm-macros.ghc~ 0.95.1-sle-sp1-rpmdeps/ghc-rpm-macros.ghc~
|
||||
--- 0.95.1-suse-packaging/ghc-rpm-macros.ghc~ 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ 0.95.1-sle-sp1-rpmdeps/ghc-rpm-macros.ghc~ 2012-06-24 11:18:57.000000000 +0200
|
||||
@@ -0,0 +1,304 @@
|
||||
+# RPM Macros for packaging Haskell cabalized packages -*-rpm-spec-*-
|
||||
+# see https://fedoraproject.org/wiki/PackagingDrafts/Haskell for more details
|
||||
+
|
||||
+# "cabal"
|
||||
+%cabal [ -x Setup ] || ghc --make %{!?ghc_user_conf:-no-user-package-conf} %{!?ghc_without_dynamic:-dynamic} Setup\
|
||||
+./Setup
|
||||
+
|
||||
+# check ghc version was rebuilt against self
|
||||
+%ghc_check_bootstrap\
|
||||
+if [ ! "$(ghc --info | grep \\"Booter\\ version\\",\\"%{ghc_version}\\")" ]; then\
|
||||
+ echo "Warning: this ghc build is not self-bootstrapped."\
|
||||
+%if %{undefined ghc_bootstrapping}\
|
||||
+ echo "The ghc package should be rebuilt against its current version before\
|
||||
+proceeding, to avoid dependency ABI breakage from a future ghc rebuild."\
|
||||
+ echo "To override set ghc_bootstrapping."\
|
||||
+ echo "Aborting."\
|
||||
+ exit 1\
|
||||
+%endif\
|
||||
+fi
|
||||
+
|
||||
+# configure
|
||||
+%cabal_configure\
|
||||
+%ghc_check_bootstrap\
|
||||
+%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
|
||||
+%ghcdocroot %{_datadir}/doc/ghc
|
||||
+%ghcdocbasedir %{ghcdocroot}/html
|
||||
+# libraries doc dir
|
||||
+%ghclibdocdir %{ghcdocbasedir}/libraries
|
||||
+# top library dir
|
||||
+%ghclibdir %{_libdir}/ghc-%{ghc_version}
|
||||
+
|
||||
+# ghc_gen_filelists [name] [version]
|
||||
+%ghc_gen_filelists()\
|
||||
+%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
+%define pkgver %{?2}%{!?2:%{version}}\
|
||||
+%define pkgnamever %{pkgname}-%{pkgver}\
|
||||
+%define basepkg ghc-%{pkgname}\
|
||||
+%define pkgdir %{ghclibdir}/%{pkgnamever}\
|
||||
+%define docdir %{ghclibdocdir}/%{pkgnamever}\
|
||||
+rm -f %{basepkg}.files %{basepkg}-devel.files\
|
||||
+%if %{undefined ghc_without_shared}\
|
||||
+if [ -d "%{buildroot}%{pkgdir}" ]; then\
|
||||
+echo "%dir %{pkgdir}" >> %{basepkg}.files\
|
||||
+echo "%attr(755,root,root) %{pkgdir}/libHS%{pkgnamever}-ghc%{ghc_version}.so" >> %{basepkg}.files\
|
||||
+fi\
|
||||
+%endif\
|
||||
+%if %{defined ghc_without_shared}\
|
||||
+if [ "%{name}" = "%{basepkg}" -o -n "%{?1}" ]; then\
|
||||
+ if [ -d "%{buildroot}%{_docdir}/%{basepkg}" ]; then\
|
||||
+ mv %{buildroot}%{_docdir}/%{basepkg} %{buildroot}%{_docdir}/%{basepkg}-devel\
|
||||
+%if %{undefined ghc_exclude_docdir}\
|
||||
+ echo "%{_docdir}/%{basepkg}-devel" >> %{basepkg}-devel.files\
|
||||
+%endif\
|
||||
+ fi\
|
||||
+fi\
|
||||
+%endif\
|
||||
+%if %{undefined ghc_exclude_docdir}\
|
||||
+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\
|
||||
+if [ -d "%{buildroot}%{pkgdir}" ]; then\
|
||||
+find %{buildroot}%{pkgdir} -type d | sed "s/^/%dir /" >> %{basepkg}-devel.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\
|
||||
+for i in %{!?ghc_without_shared:%{basepkg}.files} %{basepkg}-devel.files; do\
|
||||
+if [ -f "$i" ]; then\
|
||||
+sed -i -e "s!%{buildroot}!!g" $i\
|
||||
+fi\
|
||||
+done\
|
||||
+%{nil}
|
||||
+
|
||||
+%ghc_add_basepkg_file()\
|
||||
+%define basepkg ghc-%{pkg_name}\
|
||||
+echo "%*" >> %{basepkg}%{?ghc_without_shared:-devel}.files
|
||||
+
|
||||
+# compiler version
|
||||
+%ghc_version %{!?ghc_version_override:%(ghc --numeric-version)}%{?ghc_version_override}
|
||||
+
|
||||
+# create and install package.conf file
|
||||
+# cabal_pkg_conf [name] [version]
|
||||
+%cabal_pkg_conf()\
|
||||
+%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
+%define pkgver %{?2}%{!?2:%{version}}\
|
||||
+%define pkgnamever %{pkgname}-%{pkgver}\
|
||||
+%cabal register --gen-pkg-config\
|
||||
+mkdir -p %{buildroot}%{ghclibdir}/package.conf.d\
|
||||
+install --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.d\
|
||||
+%{nil}
|
||||
+
|
||||
+# devel pkg basic requires
|
||||
+%ghc_devel_requires Requires: ghc-compiler = %{ghc_version}\
|
||||
+Requires(post): ghc-compiler = %{ghc_version}\
|
||||
+Requires(postun): ghc-compiler = %{ghc_version}\
|
||||
+%if %{undefined ghc_without_shared} && 0%{!?-m:1}\
|
||||
+Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver:%{version}}-%{release}\
|
||||
+%endif
|
||||
+
|
||||
+%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}
|
||||
+
|
||||
+# ghc_lib_package [-c cdepslist] [-h pkgdepslist]
|
||||
+%ghc_lib_package(c:h:)\
|
||||
+%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
+%define basepkg ghc-%{pkgname}\
|
||||
+%ghc_shared_files\
|
||||
+\
|
||||
+%ghc_package_devel\
|
||||
+%{nil}
|
||||
+
|
||||
+# ghc_package [-l licensetag] [name] [version]
|
||||
+%ghc_package(l:)\
|
||||
+%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
+%define pkgver %{?2}%{!?2:%{version}}\
|
||||
+%define basepkg ghc-%{pkgname}\
|
||||
+%package -n %{basepkg}\
|
||||
+Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library}\
|
||||
+Group: Development/Libraries/Other\
|
||||
+%{?1:Version: %{pkgver}}\
|
||||
+%{-l:License: %{-l*}}\
|
||||
+%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1/g")}
|
||||
+
|
||||
+# ghc_description [name] [version]
|
||||
+%ghc_description()\
|
||||
+%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
+%define basepkg ghc-%{pkgname}\
|
||||
+%description -n %{basepkg}\
|
||||
+%{?common_description}%{!?common_description:Haskell %{pkgname} library.}\
|
||||
+%if %{defined ghc_version} && %{undefined ghc_without_shared}\
|
||||
+This package provides the shared library.\
|
||||
+%endif
|
||||
+
|
||||
+# ghc_lib_subpackage [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-x] [name] [version]
|
||||
+%ghc_lib_subpackage(c:h:l:x)\
|
||||
+%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
+%define pkgver %{?2}%{!?2:%{version}}\
|
||||
+%define pkgnamever %{pkgname}-%{pkgver}\
|
||||
+%{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgnamever}}}\
|
||||
+%define basepkg ghc-%{pkgname}\
|
||||
+%ghc_package\
|
||||
+\
|
||||
+%ghc_description\
|
||||
+\
|
||||
+%ghc_lib_package\
|
||||
+%{nil}
|
||||
+
|
||||
+%ghc_pkg_recache %{_bindir}/ghc-pkg recache --no-user-package-conf || :
|
||||
+
|
||||
+# (deprecated) for docs post and postun
|
||||
+%ghc_reindex_haddock :
|
||||
+
|
||||
+%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\
|
||||
+%{?devel_doc_files:%doc %devel_doc_files}\
|
||||
+%{nil}
|
||||
+
|
||||
+%ghc_files()\
|
||||
+%{?1:%define base_doc_files %*}\
|
||||
+%define basepkg ghc-%{pkg_name}\
|
||||
+%ghc_shared_files\
|
||||
+\
|
||||
+%ghc_devel_files\
|
||||
+%{nil}
|
||||
+
|
||||
+# ghc_devel_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-m] [name] [version]
|
||||
+# -m : meta-package
|
||||
+%ghc_devel_package(c:h:l:m)\
|
||||
+%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
+%define pkgver %{?2}%{!?2:%{version}}\
|
||||
+%define basepkg ghc-%{pkgname}\
|
||||
+%package -n %{basepkg}-devel\
|
||||
+Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library} development files\
|
||||
+Group: Development/Libraries/Other\
|
||||
+%{?1:Version: %{pkgver}}\
|
||||
+%{-l:License: %{-l*}}\
|
||||
+%{?ghc_devel_requires}\
|
||||
+%{-h:Requires: %{-h*}}\
|
||||
+%{?ghc_pkg_c_deps:Requires: %{ghc_pkg_c_deps}}\
|
||||
+%{-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
|
||||
+
|
||||
+# ghc_devel_description
|
||||
+%ghc_devel_description()\
|
||||
+%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
+%define basepkg ghc-%{pkgname}\
|
||||
+%description -n %{basepkg}-devel\
|
||||
+%{?common_description}%{!?common_description:Haskell %{pkgname} library.}\
|
||||
+\
|
||||
+This package contains the development files.
|
||||
+
|
||||
+# ghc_devel_post_postun
|
||||
+%ghc_devel_post_postun()\
|
||||
+%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
+%define basepkg ghc-%{pkgname}\
|
||||
+%post -n %{basepkg}-devel\
|
||||
+%ghc_pkg_recache\
|
||||
+\
|
||||
+%postun -n %{basepkg}-devel\
|
||||
+%ghc_pkg_recache
|
||||
+
|
||||
+# ghc_package_devel [-c cdepslist] [-h pkgdepslist] [-l licensetag] [name] [version]
|
||||
+%ghc_package_devel(c:h:l:)\
|
||||
+%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
+%define basepkg ghc-%{pkgname}\
|
||||
+%ghc_devel_package\
|
||||
+\
|
||||
+%ghc_devel_description\
|
||||
+\
|
||||
+%ghc_devel_post_postun\
|
||||
+\
|
||||
+%ghc_devel_files\
|
||||
+%{nil}
|
||||
+
|
||||
+# ghc_strip_dynlinked
|
||||
+%ghc_strip_dynlinked\
|
||||
+%if %{undefined __debug_package}\
|
||||
+find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -exec strip "{}" \\;\
|
||||
+%endif
|
||||
+
|
||||
+# ghc_bin_build
|
||||
+%ghc_bin_build\
|
||||
+%global debug_package %{nil}\
|
||||
+%cabal_configure\
|
||||
+%cabal build
|
||||
+
|
||||
+# 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 --htmldir=%{ghclibdocdir}/%1} %{!?ghc_with_lib_for_ghci:--disable-library-for-ghci}\
|
||||
+%cabal build\
|
||||
+%{nil}
|
||||
+
|
||||
+# ghc_lib_build [name] [version]
|
||||
+%ghc_lib_build()\
|
||||
+%ghc_lib_build_without_haddock\
|
||||
+%if %{undefined without_haddock}\
|
||||
+%cabal haddock %{!?without_hscolour:%(if [ -x %{_bindir}/HsColour ]; then echo --hyperlink-source; fi)}\
|
||||
+%endif\
|
||||
+%{nil}
|
||||
+
|
||||
+# SLE does not define _rpmconfigdir (yet)
|
||||
+%_rpmconfigdir %{_prefix}/lib/rpm
|
||||
+
|
||||
+# install bin package
|
||||
+%ghc_bin_install()\
|
||||
+%global _use_internal_dependency_generator 0\
|
||||
+%global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\
|
||||
+%cabal_install\
|
||||
+%{!?1:%ghc_strip_dynlinked}\
|
||||
+%{nil}
|
||||
+
|
||||
+# ghc_lib_install [name] [version]
|
||||
+%ghc_lib_install()\
|
||||
+%global _use_internal_dependency_generator 0\
|
||||
+%global __find_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir}\
|
||||
+%global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\
|
||||
+%cabal_install\
|
||||
+%cabal_pkg_conf\
|
||||
+%ghc_gen_filelists\
|
||||
+%{!?1:%ghc_strip_dynlinked}\
|
||||
+%{nil}
|
||||
+
|
||||
+# - without_hscolour, without_testsuite, and ghc_bootstrapping
|
||||
+# need to be set locally in the spec file
|
||||
+
|
||||
+# skip prof libs, and documentation
|
||||
+%ghc_test\
|
||||
+%global without_prof 1\
|
||||
+%global without_haddock 1\
|
||||
+%global without_manual 1
|
||||
+
|
||||
+# skip shared and prof libs, documentation, and testsuite
|
||||
+%ghc_bootstrap\
|
||||
+%global ghc_without_shared 1\
|
||||
+%global ghc_without_dynamic 1\
|
||||
+%ghc_test
|
||||
+
|
||||
+%ghc_exclude_docdir 1
|
||||
diff -Nur 0.95.1-suse-packaging/ghc-rpm-macros.ghc.orig 0.95.1-sle-sp1-rpmdeps/ghc-rpm-macros.ghc.orig
|
||||
--- 0.95.1-suse-packaging/ghc-rpm-macros.ghc.orig 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ 0.95.1-sle-sp1-rpmdeps/ghc-rpm-macros.ghc.orig 2012-06-24 11:17:51.000000000 +0200
|
||||
@@ -0,0 +1,299 @@
|
||||
+# RPM Macros for packaging Haskell cabalized packages -*-rpm-spec-*-
|
||||
+# see https://fedoraproject.org/wiki/PackagingDrafts/Haskell for more details
|
||||
+
|
||||
+# "cabal"
|
||||
+%cabal [ -x Setup ] || ghc --make %{!?ghc_user_conf:-no-user-package-conf} %{!?ghc_without_dynamic:-dynamic} Setup\
|
||||
+./Setup
|
||||
+
|
||||
+# check ghc version was rebuilt against self
|
||||
+%ghc_check_bootstrap\
|
||||
+if [ ! "$(ghc --info | grep \\"Booter\\ version\\",\\"%{ghc_version}\\")" ]; then\
|
||||
+ echo "Warning: this ghc build is not self-bootstrapped."\
|
||||
+%if %{undefined ghc_bootstrapping}\
|
||||
+ echo "The ghc package should be rebuilt against its current version before\
|
||||
+proceeding, to avoid dependency ABI breakage from a future ghc rebuild."\
|
||||
+ echo "To override set ghc_bootstrapping."\
|
||||
+ echo "Aborting."\
|
||||
+ exit 1\
|
||||
+%endif\
|
||||
+fi
|
||||
+
|
||||
+# configure
|
||||
+%cabal_configure\
|
||||
+%ghc_check_bootstrap\
|
||||
+%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
|
||||
+%ghcdocroot %{_datadir}/doc/ghc
|
||||
+%ghcdocbasedir %{ghcdocroot}/html
|
||||
+# libraries doc dir
|
||||
+%ghclibdocdir %{ghcdocbasedir}/libraries
|
||||
+# top library dir
|
||||
+%ghclibdir %{_libdir}/ghc-%{ghc_version}
|
||||
+
|
||||
+# ghc_gen_filelists [name] [version]
|
||||
+%ghc_gen_filelists()\
|
||||
+%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
+%define pkgver %{?2}%{!?2:%{version}}\
|
||||
+%define pkgnamever %{pkgname}-%{pkgver}\
|
||||
+%define basepkg ghc-%{pkgname}\
|
||||
+%define pkgdir %{ghclibdir}/%{pkgnamever}\
|
||||
+%define docdir %{ghclibdocdir}/%{pkgnamever}\
|
||||
+rm -f %{basepkg}.files %{basepkg}-devel.files\
|
||||
+%if %{undefined ghc_without_shared}\
|
||||
+if [ -d "%{buildroot}%{pkgdir}" ]; then\
|
||||
+echo "%dir %{pkgdir}" >> %{basepkg}.files\
|
||||
+echo "%attr(755,root,root) %{pkgdir}/libHS%{pkgnamever}-ghc%{ghc_version}.so" >> %{basepkg}.files\
|
||||
+fi\
|
||||
+%endif\
|
||||
+%if %{defined ghc_without_shared}\
|
||||
+if [ "%{name}" = "%{basepkg}" -o -n "%{?1}" ]; then\
|
||||
+ if [ -d "%{buildroot}%{_docdir}/%{basepkg}" ]; then\
|
||||
+ mv %{buildroot}%{_docdir}/%{basepkg} %{buildroot}%{_docdir}/%{basepkg}-devel\
|
||||
+%if %{undefined ghc_exclude_docdir}\
|
||||
+ echo "%{_docdir}/%{basepkg}-devel" >> %{basepkg}-devel.files\
|
||||
+%endif\
|
||||
+ fi\
|
||||
+fi\
|
||||
+%endif\
|
||||
+%if %{undefined ghc_exclude_docdir}\
|
||||
+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\
|
||||
+if [ -d "%{buildroot}%{pkgdir}" ]; then\
|
||||
+find %{buildroot}%{pkgdir} -type d | sed "s/^/%dir /" >> %{basepkg}-devel.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\
|
||||
+for i in %{!?ghc_without_shared:%{basepkg}.files} %{basepkg}-devel.files; do\
|
||||
+if [ -f "$i" ]; then\
|
||||
+sed -i -e "s!%{buildroot}!!g" $i\
|
||||
+fi\
|
||||
+done\
|
||||
+%{nil}
|
||||
+
|
||||
+%ghc_add_basepkg_file()\
|
||||
+%define basepkg ghc-%{pkg_name}\
|
||||
+echo "%*" >> %{basepkg}%{?ghc_without_shared:-devel}.files
|
||||
+
|
||||
+# compiler version
|
||||
+%ghc_version %{!?ghc_version_override:%(ghc --numeric-version)}%{?ghc_version_override}
|
||||
+
|
||||
+# create and install package.conf file
|
||||
+# cabal_pkg_conf [name] [version]
|
||||
+%cabal_pkg_conf()\
|
||||
+%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
+%define pkgver %{?2}%{!?2:%{version}}\
|
||||
+%define pkgnamever %{pkgname}-%{pkgver}\
|
||||
+%cabal register --gen-pkg-config\
|
||||
+mkdir -p %{buildroot}%{ghclibdir}/package.conf.d\
|
||||
+install --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.d\
|
||||
+%{nil}
|
||||
+
|
||||
+# devel pkg basic requires
|
||||
+%ghc_devel_requires Requires: ghc-compiler = %{ghc_version}\
|
||||
+Requires(post): ghc-compiler = %{ghc_version}\
|
||||
+Requires(postun): ghc-compiler = %{ghc_version}\
|
||||
+%if %{undefined ghc_without_shared} && 0%{!?-m:1}\
|
||||
+Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver:%{version}}-%{release}\
|
||||
+%endif
|
||||
+
|
||||
+%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}
|
||||
+
|
||||
+# ghc_lib_package [-c cdepslist] [-h pkgdepslist]
|
||||
+%ghc_lib_package(c:h:)\
|
||||
+%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
+%define basepkg ghc-%{pkgname}\
|
||||
+%ghc_shared_files\
|
||||
+\
|
||||
+%ghc_package_devel\
|
||||
+%{nil}
|
||||
+
|
||||
+# ghc_package [-l licensetag] [name] [version]
|
||||
+%ghc_package(l:)\
|
||||
+%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
+%define pkgver %{?2}%{!?2:%{version}}\
|
||||
+%define basepkg ghc-%{pkgname}\
|
||||
+%package -n %{basepkg}\
|
||||
+Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library}\
|
||||
+Group: Development/Libraries/Other\
|
||||
+%{?1:Version: %{pkgver}}\
|
||||
+%{-l:License: %{-l*}}\
|
||||
+%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1/g")}
|
||||
+
|
||||
+# ghc_description [name] [version]
|
||||
+%ghc_description()\
|
||||
+%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
+%define basepkg ghc-%{pkgname}\
|
||||
+%description -n %{basepkg}\
|
||||
+%{?common_description}%{!?common_description:Haskell %{pkgname} library.}\
|
||||
+%if %{defined ghc_version} && %{undefined ghc_without_shared}\
|
||||
+This package provides the shared library.\
|
||||
+%endif
|
||||
+
|
||||
+# ghc_lib_subpackage [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-x] [name] [version]
|
||||
+%ghc_lib_subpackage(c:h:l:x)\
|
||||
+%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
+%define pkgver %{?2}%{!?2:%{version}}\
|
||||
+%define pkgnamever %{pkgname}-%{pkgver}\
|
||||
+%{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgnamever}}}\
|
||||
+%define basepkg ghc-%{pkgname}\
|
||||
+%ghc_package\
|
||||
+\
|
||||
+%ghc_description\
|
||||
+\
|
||||
+%ghc_lib_package\
|
||||
+%{nil}
|
||||
+
|
||||
+%ghc_pkg_recache %{_bindir}/ghc-pkg recache --no-user-package-conf || :
|
||||
+
|
||||
+# (deprecated) for docs post and postun
|
||||
+%ghc_reindex_haddock :
|
||||
+
|
||||
+%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\
|
||||
+%{?devel_doc_files:%doc %devel_doc_files}\
|
||||
+%{nil}
|
||||
+
|
||||
+%ghc_files()\
|
||||
+%{?1:%define base_doc_files %*}\
|
||||
+%define basepkg ghc-%{pkg_name}\
|
||||
+%ghc_shared_files\
|
||||
+\
|
||||
+%ghc_devel_files\
|
||||
+%{nil}
|
||||
+
|
||||
+# ghc_devel_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-m] [name] [version]
|
||||
+# -m : meta-package
|
||||
+%ghc_devel_package(c:h:l:m)\
|
||||
+%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
+%define pkgver %{?2}%{!?2:%{version}}\
|
||||
+%define basepkg ghc-%{pkgname}\
|
||||
+%package -n %{basepkg}-devel\
|
||||
+Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library} development files\
|
||||
+Group: Development/Libraries/Other\
|
||||
+%{?1:Version: %{pkgver}}\
|
||||
+%{-l:License: %{-l*}}\
|
||||
+%{?ghc_devel_requires}\
|
||||
+%{-h:Requires: %{-h*}}\
|
||||
+%{?ghc_pkg_c_deps:Requires: %{ghc_pkg_c_deps}}\
|
||||
+%{-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")}\
|
||||
+%if %{undefined without_prof}\
|
||||
+Provides: %{basepkg}-prof = %{pkgver}-%{release}\
|
||||
+%endif
|
||||
+
|
||||
+# ghc_devel_description
|
||||
+%ghc_devel_description()\
|
||||
+%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
+%define basepkg ghc-%{pkgname}\
|
||||
+%description -n %{basepkg}-devel\
|
||||
+%{?common_description}%{!?common_description:Haskell %{pkgname} library.}\
|
||||
+\
|
||||
+This package contains the development files.
|
||||
+
|
||||
+# ghc_devel_post_postun
|
||||
+%ghc_devel_post_postun()\
|
||||
+%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
+%define basepkg ghc-%{pkgname}\
|
||||
+%post -n %{basepkg}-devel\
|
||||
+%ghc_pkg_recache\
|
||||
+\
|
||||
+%postun -n %{basepkg}-devel\
|
||||
+%ghc_pkg_recache
|
||||
+
|
||||
+# ghc_package_devel [-c cdepslist] [-h pkgdepslist] [-l licensetag] [name] [version]
|
||||
+%ghc_package_devel(c:h:l:)\
|
||||
+%define pkgname %{?1}%{!?1:%{pkg_name}}\
|
||||
+%define basepkg ghc-%{pkgname}\
|
||||
+%ghc_devel_package\
|
||||
+\
|
||||
+%ghc_devel_description\
|
||||
+\
|
||||
+%ghc_devel_post_postun\
|
||||
+\
|
||||
+%ghc_devel_files\
|
||||
+%{nil}
|
||||
+
|
||||
+# ghc_strip_dynlinked
|
||||
+%ghc_strip_dynlinked\
|
||||
+%if %{undefined __debug_package}\
|
||||
+find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -exec strip "{}" \\;\
|
||||
+%endif
|
||||
+
|
||||
+# ghc_bin_build
|
||||
+%ghc_bin_build\
|
||||
+%global debug_package %{nil}\
|
||||
+%cabal_configure\
|
||||
+%cabal build
|
||||
+
|
||||
+# 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 --htmldir=%{ghclibdocdir}/%1} %{!?ghc_with_lib_for_ghci:--disable-library-for-ghci}\
|
||||
+%cabal build\
|
||||
+%{nil}
|
||||
+
|
||||
+# ghc_lib_build [name] [version]
|
||||
+%ghc_lib_build()\
|
||||
+%ghc_lib_build_without_haddock\
|
||||
+%if %{undefined without_haddock}\
|
||||
+%cabal haddock %{!?without_hscolour:%(if [ -x %{_bindir}/HsColour ]; then echo --hyperlink-source; fi)}\
|
||||
+%endif\
|
||||
+%{nil}
|
||||
+
|
||||
+# install bin package
|
||||
+%ghc_bin_install()\
|
||||
+%global _use_internal_dependency_generator 0\
|
||||
+%global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\
|
||||
+%cabal_install\
|
||||
+%{!?1:%ghc_strip_dynlinked}\
|
||||
+%{nil}
|
||||
+
|
||||
+# ghc_lib_install [name] [version]
|
||||
+%ghc_lib_install()\
|
||||
+%global _use_internal_dependency_generator 0\
|
||||
+%global __find_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir}\
|
||||
+%global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\
|
||||
+%cabal_install\
|
||||
+%cabal_pkg_conf\
|
||||
+%ghc_gen_filelists\
|
||||
+%{!?1:%ghc_strip_dynlinked}\
|
||||
+%{nil}
|
||||
+
|
||||
+# - without_hscolour, without_testsuite, and ghc_bootstrapping
|
||||
+# need to be set locally in the spec file
|
||||
+
|
||||
+# skip prof libs, and documentation
|
||||
+%ghc_test\
|
||||
+%global without_prof 1\
|
||||
+%global without_haddock 1\
|
||||
+%global without_manual 1
|
||||
+
|
||||
+# skip shared and prof libs, documentation, and testsuite
|
||||
+%ghc_bootstrap\
|
||||
+%global ghc_without_shared 1\
|
||||
+%global ghc_without_dynamic 1\
|
||||
+%ghc_test
|
||||
+
|
||||
+%ghc_exclude_docdir 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user