Accepting request 105888 from home:ptrommler:devel:languages:haskell:platform-2011.4
SLE11-SP1 patch OBS-URL: https://build.opensuse.org/request/show/105888 OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc-rpm-macros?expand=0&rev=3
This commit is contained in:
parent
2df70001a8
commit
9f03fe397e
@ -1,33 +1,21 @@
|
||||
diff -Nur 0.15.2.orig/ghc-deps.sh 0.15.2/ghc-deps.sh
|
||||
--- 0.15.2.orig/ghc-deps.sh 2012-01-05 10:48:24.000000000 +0100
|
||||
+++ 0.15.2/ghc-deps.sh 2012-01-05 11:08:11.000000000 +0100
|
||||
diff -Nur 0.15.4.orig/ghc-deps.sh 0.15.4/ghc-deps.sh
|
||||
--- 0.15.4.orig/ghc-deps.sh 2012-02-19 15:49:26.000000000 +0100
|
||||
+++ 0.15.4/ghc-deps.sh 2012-02-19 16:02:03.000000000 +0100
|
||||
@@ -41,10 +41,11 @@
|
||||
if [ -d "$PKGCONFDIR" ]; then
|
||||
META=""
|
||||
SELF=""
|
||||
+ POST=""
|
||||
case $LIB_FILE in
|
||||
- *.so) META=ghc ;;
|
||||
*.so) META=ghc ;;
|
||||
- *_p.a) META=ghc-prof SELF=ghc-devel ;;
|
||||
- *.a) META=ghc-devel
|
||||
+ *.so) META=ghc ;;
|
||||
+ *_p.a) META=ghc-prof POST=-prof SELF=ghc-devel ;;
|
||||
+ *.a) META=ghc-devel POST=-devel
|
||||
if [ "$SHARED" ]; then
|
||||
SELF=ghc
|
||||
fi
|
||||
@@ -52,14 +53,29 @@
|
||||
esac
|
||||
if [ "$META" ]; then
|
||||
PKGVER=$(echo $LIB_FILE | sed -e "s%$PKGBASEDIR/\([^/]\+\)/libHS.*%\1%")
|
||||
+ if [ "$POST" ]; then
|
||||
+ for i in $PKGVER; do
|
||||
+ case $i in
|
||||
+ *-*) echo $i | sed -e "s/\(.*\)-\(.*\)/ghc-\1$POST = \2/" ;;
|
||||
+ *) ;;
|
||||
+ esac
|
||||
+ done
|
||||
+ fi
|
||||
@@ -55,11 +56,18 @@
|
||||
HASHS=$(${GHC_PKG} -f $PKGCONFDIR field $PKGVER $FIELD | sed -e "s/^$FIELD: \+//")
|
||||
for i in $HASHS; do
|
||||
case $i in
|
||||
@ -47,7 +35,7 @@ diff -Nur 0.15.2.orig/ghc-deps.sh 0.15.2/ghc-deps.sh
|
||||
HASHS=$(${GHC_PKG} -f $PKGCONFDIR field $PKGVER id | sed -e "s/^id: \+//")
|
||||
for i in $HASHS; do
|
||||
echo $i | sed -e "s/\(.*\)-\(.*\)/$SELF(\1) = \2/"
|
||||
@@ -69,8 +85,14 @@
|
||||
@@ -69,8 +77,14 @@
|
||||
fi
|
||||
elif [ "$MODE" = "--requires" ]; then
|
||||
if file $i | grep -q 'executable, .* dynamically linked'; then
|
||||
@ -63,10 +51,10 @@ diff -Nur 0.15.2.orig/ghc-deps.sh 0.15.2/ghc-deps.sh
|
||||
HASH=$(${GHC_PKG} --global field $p id | sed -e "s/^id: \+//")
|
||||
echo $HASH | sed -e "s/\(.*\)-\(.*\)/ghc(\1) = \2/"
|
||||
done
|
||||
diff -Nur 0.15.2.orig/ghc-rpm-macros.ghc 0.15.2/ghc-rpm-macros.ghc
|
||||
--- 0.15.2.orig/ghc-rpm-macros.ghc 2012-01-05 10:48:24.000000000 +0100
|
||||
+++ 0.15.2/ghc-rpm-macros.ghc 2012-01-22 16:10:31.000000000 +0100
|
||||
@@ -21,13 +21,13 @@
|
||||
diff -Nur 0.15.4.orig/ghc-rpm-macros.ghc 0.15.4/ghc-rpm-macros.ghc
|
||||
--- 0.15.4.orig/ghc-rpm-macros.ghc 2012-02-19 15:49:26.000000000 +0100
|
||||
+++ 0.15.4/ghc-rpm-macros.ghc 2012-02-19 15:57:19.000000000 +0100
|
||||
@@ -21,13 +21,14 @@
|
||||
# configure
|
||||
%cabal_configure\
|
||||
%ghc_check_bootstrap\
|
||||
@ -78,11 +66,12 @@ diff -Nur 0.15.2.orig/ghc-rpm-macros.ghc 0.15.2/ghc-rpm-macros.ghc
|
||||
|
||||
# root dir for ghc docs
|
||||
-%ghcdocbasedir %{_docdir}/ghc/html
|
||||
+%ghcdocbasedir %{_docdir}/ghc-docs/html
|
||||
+%ghcdocroot %{_datadir}/doc/ghc
|
||||
+%ghcdocbasedir %{ghcdocroot}/html
|
||||
# libraries doc dir
|
||||
%ghclibdocdir %{ghcdocbasedir}/libraries
|
||||
# top library dir
|
||||
@@ -49,16 +49,16 @@
|
||||
@@ -49,16 +50,16 @@
|
||||
fi\
|
||||
%endif\
|
||||
%if 0%{!?1:1} && %{undefined ghc_exclude_docdir}\
|
||||
@ -105,7 +94,7 @@ diff -Nur 0.15.2.orig/ghc-rpm-macros.ghc 0.15.2/ghc-rpm-macros.ghc
|
||||
fi\
|
||||
fi\
|
||||
%endif\
|
||||
@@ -98,6 +98,7 @@
|
||||
@@ -102,6 +103,7 @@
|
||||
%ghc_shared_files\
|
||||
%if %{undefined ghc_without_shared}\
|
||||
%files -n %{basepkg} -f %{basepkg}.files\
|
||||
@ -113,7 +102,7 @@ diff -Nur 0.15.2.orig/ghc-rpm-macros.ghc 0.15.2/ghc-rpm-macros.ghc
|
||||
%{?base_doc_files:%doc %base_doc_files}\
|
||||
%endif\
|
||||
%{nil}
|
||||
@@ -118,7 +119,7 @@
|
||||
@@ -122,7 +124,7 @@
|
||||
%define basepkg ghc-%{pkgname}\
|
||||
%package -n %{basepkg}\
|
||||
Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library}\
|
||||
@ -122,7 +111,7 @@ diff -Nur 0.15.2.orig/ghc-rpm-macros.ghc 0.15.2/ghc-rpm-macros.ghc
|
||||
%{?1:Version: %{pkgver}}\
|
||||
%{-l:License: %{-l*}}\
|
||||
%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1/g")}
|
||||
@@ -154,6 +155,7 @@
|
||||
@@ -158,6 +160,7 @@
|
||||
|
||||
%ghc_devel_files\
|
||||
%files -n %{basepkg}-devel -f %{basepkg}-devel.files\
|
||||
@ -130,7 +119,7 @@ diff -Nur 0.15.2.orig/ghc-rpm-macros.ghc 0.15.2/ghc-rpm-macros.ghc
|
||||
%if %{defined ghc_without_shared}\
|
||||
%{?base_doc_files:%doc %base_doc_files}\
|
||||
%endif\
|
||||
@@ -175,7 +177,7 @@
|
||||
@@ -179,7 +182,7 @@
|
||||
%define basepkg ghc-%{pkgname}\
|
||||
%package -n %{basepkg}-devel\
|
||||
Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library} development files\
|
||||
@ -139,7 +128,7 @@ diff -Nur 0.15.2.orig/ghc-rpm-macros.ghc 0.15.2/ghc-rpm-macros.ghc
|
||||
%{?1:Version: %{pkgver}}\
|
||||
%{-l:License: %{-l*}}\
|
||||
%{?ghc_devel_requires}\
|
||||
@@ -229,15 +231,17 @@
|
||||
@@ -233,15 +236,17 @@
|
||||
|
||||
# ghc_bin_build
|
||||
%ghc_bin_build\
|
||||
@ -158,3 +147,300 @@ diff -Nur 0.15.2.orig/ghc-rpm-macros.ghc 0.15.2/ghc-rpm-macros.ghc
|
||||
%cabal build\
|
||||
%if %{undefined without_haddock}\
|
||||
%cabal haddock %{!?without_hscolour:%(if [ -x %{_bindir}/HsColour ]; then echo --hyperlink-source; fi)}\
|
||||
diff -Nur 0.15.4.orig/ghc-rpm-macros.ghc.orig 0.15.4/ghc-rpm-macros.ghc.orig
|
||||
--- 0.15.4.orig/ghc-rpm-macros.ghc.orig 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ 0.15.4/ghc-rpm-macros.ghc.orig 2012-02-19 15:45:21.000000000 +0100
|
||||
@@ -0,0 +1,293 @@
|
||||
+# 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}-%{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}
|
||||
+
|
||||
+# install
|
||||
+%cabal_install %cabal copy --destdir=%{buildroot} -v
|
||||
+
|
||||
+# root dir for ghc docs
|
||||
+%ghcdocbasedir %{_docdir}/ghc/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 0%{!?1:1} && %{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\
|
||||
+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}\
|
||||
+ fi\
|
||||
+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\
|
||||
+sed -i -e "s!%{buildroot}!!g" %{!?ghc_without_shared:%{basepkg}.files} %{basepkg}-devel.files\
|
||||
+%{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}\
|
||||
+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\
|
||||
+%{?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: System Environment/Libraries\
|
||||
+%{?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_binlib_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-x] [name] [version]
|
||||
+%ghc_binlib_package(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\
|
||||
+%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] [name] [version]
|
||||
+%ghc_devel_package(c:h:l:)\
|
||||
+%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\
|
||||
+%{?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}\
|
||||
+Provides: %{basepkg}-doc = %{pkgver}-%{release}\
|
||||
+Obsoletes: %{basepkg}-prof < %{pkgver}-%{release}\
|
||||
+Provides: %{basepkg}-prof = %{pkgver}-%{release}\
|
||||
+
|
||||
+# 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 [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\
|
||||
+%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}\
|
||||
+%global _use_internal_dependency_generator 0\
|
||||
+%global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\
|
||||
+%endif\
|
||||
+%cabal_install\
|
||||
+%ghc_strip_dynlinked
|
||||
+
|
||||
+# 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}
|
||||
+
|
||||
+# skip shared and prof libs, documentation, and testsuite
|
||||
+# - without_hscolour needs to be set locally in the spec file
|
||||
+%ghc_bootstrap\
|
||||
+%global ghc_without_shared 1\
|
||||
+%global ghc_without_dynamic 1\
|
||||
+%global without_prof 1\
|
||||
+%global without_haddock 1\
|
||||
+%global without_manual 1\
|
||||
+%global without_testsuite 1\
|
||||
+# needs to be set also in ghc.spec\
|
||||
+%global ghc_bootstrapping 1
|
||||
+
|
||||
+# skip prof libs, and documentation
|
||||
+# - without_hscolour needs to be set locally in the spec file
|
||||
+%ghc_test\
|
||||
+%global without_prof 1\
|
||||
+%global without_haddock 1\
|
||||
+%global without_manual 1
|
||||
|
@ -1,3 +1,30 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 19 15:11:35 UTC 2012 - peter.trommler@ohm-hochschule.de
|
||||
|
||||
- update to 0.15.4 from upstream
|
||||
- patches rebased
|
||||
- fix rpmdeps on SLE-11-SP1
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 6 19:41:51 UTC 2012 - peter.trommler@ohm-hochschule.de
|
||||
|
||||
- do not pass .conf file to rpmdeps (fails on SLE-11-SP1)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 2 21:38:35 UTC 2012 - peter.trommler@ohm-hochschule.de
|
||||
|
||||
- remove version on docs dir
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 2 20:45:36 UTC 2012 - peter.trommler@ohm-hochschule.de
|
||||
|
||||
- put documentation into /usr/share/doc/ghc-<version>
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 2 14:15:48 UTC 2012 - peter.trommler@ohm-hochschule.de
|
||||
|
||||
- add build root tag (for SLE11)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jan 22 15:28:04 UTC 2012 - peter.trommler@ohm-hochschule.de
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
# 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_shared:%{!?ghc_without_dynamic:-dynamic}} Setup\
|
||||
%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
|
||||
@ -73,6 +73,10 @@ fi\
|
||||
sed -i -e "s!%{buildroot}!!g" %{!?ghc_without_shared:%{basepkg}.files} %{basepkg}-devel.files\
|
||||
%{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}
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
%global macros_file %{_sysconfdir}/rpm/macros.ghc
|
||||
|
||||
Name: ghc-rpm-macros
|
||||
Version: 0.15.2
|
||||
Version: 0.15.4
|
||||
Release: 1
|
||||
Summary: Macros for building packages for GHC
|
||||
|
||||
@ -33,9 +33,12 @@ Source2: AUTHORS
|
||||
Source3: ghc-deps.sh
|
||||
Source4: macros.ghc-suse
|
||||
Patch: buildService.patch
|
||||
Patch1: sle-sp1-rpmdeps.patch
|
||||
#Requires: redhat-rpm-config
|
||||
Requires: rpm
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
A set of macros for building GHC packages following the Haskell Guidelines
|
||||
of the Fedora Haskell SIG. ghc needs to be installed in order to make use of
|
||||
@ -47,6 +50,7 @@ these macros.
|
||||
cp %{SOURCE1} %{SOURCE2} .
|
||||
cp %{SOURCE0} %{SOURCE3} .
|
||||
%patch -p1
|
||||
%patch1 -p1
|
||||
|
||||
|
||||
%build
|
||||
@ -58,6 +62,8 @@ 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
|
||||
# fix magic issue on SLE-11-SP1
|
||||
ln -s /usr/share/misc/magic %{buildroot}/%{_prefix}/lib/rpm/magic
|
||||
|
||||
# this is why this package is now arch-dependent:
|
||||
# turn off shared libs and dynamic linking on secondary archs
|
||||
@ -77,7 +83,7 @@ EOF
|
||||
%config(noreplace) %{macros_file}
|
||||
%config(noreplace) %{_sysconfdir}/rpm/macros.ghc-suse
|
||||
%{_prefix}/lib/rpm/ghc-deps.sh
|
||||
|
||||
%{_prefix}/lib/rpm/magic
|
||||
|
||||
%changelog
|
||||
* Fri Dec 2 2011 Jens Petersen <petersen@redhat.com> - 0.14.3-1
|
||||
|
20
sle-sp1-rpmdeps.patch
Normal file
20
sle-sp1-rpmdeps.patch
Normal file
@ -0,0 +1,20 @@
|
||||
diff -Nur 0.15.4/ghc-deps.sh 0.15.4.sle11-sp1/ghc-deps.sh
|
||||
--- 0.15.4/ghc-deps.sh 2012-02-19 16:02:03.000000000 +0100
|
||||
+++ 0.15.4.sle11-sp1/ghc-deps.sh 2012-02-19 16:05:14.000000000 +0100
|
||||
@@ -20,8 +20,8 @@
|
||||
fi
|
||||
|
||||
case $MODE in
|
||||
- --provides) FIELD=id ;;
|
||||
- --requires) FIELD=depends ;;
|
||||
+ --provides) FIELD=id FINDMODE=-provides ;;
|
||||
+ --requires) FIELD=depends FINDMODE=-requires ;;
|
||||
*) echo "`basename $0`: Need --provides or --requires" ; exit 1
|
||||
esac
|
||||
|
||||
@@ -92,4 +92,4 @@
|
||||
fi
|
||||
done
|
||||
|
||||
-echo $files | tr [:blank:] '\n' | /usr/lib/rpm/rpmdeps $MODE
|
||||
+echo $files | tr [:blank:] '\n' | /usr/lib/rpm/find$FINDMODE
|
Loading…
x
Reference in New Issue
Block a user