[ghc-rpm-macros] fix without_shared build so it actually works
Jens Petersen
petersen at fedoraproject.org
Thu Sep 30 03:12:45 UTC 2010
commit 02c69a3bd25dbc612505b92fa27a474a561b70c5
Author: Jens Petersen <petersen at redhat.com>
Date: Thu Sep 30 13:12:47 2010 +1000
fix without_shared build so it actually works
ghc-rpm-macros.ghc | 12 +++++++-----
ghc-rpm-macros.spec | 11 +++++++----
2 files changed, 14 insertions(+), 9 deletions(-)
---
diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc
index 8a18acd..e311dcd 100644
--- a/ghc-rpm-macros.ghc
+++ b/ghc-rpm-macros.ghc
@@ -23,17 +23,17 @@ pkgname=%{?1}%{!?1:%{pkg_name}} \
basefile=ghc-${pkgname} \
pkgnamever=${pkgname}-%{version} \
rm -f ${basefile}.files ${basefile}-devel.files ${basefile}-prof.files \
-echo "%defattr(-,root,root,-)" > ${basefile}.files \
-if [ -d "${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}" ]; then \
- %{!?1:echo "%{_docdir}/%{name}-%{version}" >> ${basefile}%{?without_shared:-devel}.files} %{?1::} \
-fi \
%if 0%{!?without_shared:1} \
+echo "%defattr(-,root,root,-)" > ${basefile}.files \
if [ -d "${RPM_BUILD_ROOT}%{ghcpkgdir}" ]; then \
echo "%dir %{ghcpkgdir}" >> ${basefile}.files \
echo "%attr(755,root,root) %{ghcpkgdir}/libHS${pkgnamever}-ghc%{ghc_version}.so" >> ${basefile}.files \
fi \
%endif \
echo "%defattr(-,root,root,-)" > ${basefile}-devel.files \
+if [ -d "${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}" ]; then \
+ %{!?1:echo "%{_docdir}/%{name}-%{version}" >> ${basefile}%{?without_shared:-devel}.files} %{?1::} \
+fi \
echo "%{ghcpkgbasedir}/package.conf.d/${pkgnamever}*.conf" >> ${basefile}-devel.files \
if [ -d "${RPM_BUILD_ROOT}%{ghcpkgdir}" ]; then \
find ${RPM_BUILD_ROOT}%{ghcpkgdir} -type d | sed "s/^/%dir /" >> ${basefile}-devel.files \
@@ -46,7 +46,7 @@ fi \
if [ -d "${RPM_BUILD_ROOT}%{ghcdocdir}" ]; then \
echo "%{ghcdocdir}" >> ${basefile}-devel.files \
fi \
-sed -i -e "s!${RPM_BUILD_ROOT}!!g" ${basefile}.files ${basefile}-devel.files ${basefile}-prof.files \
+sed -i -e "s!${RPM_BUILD_ROOT}!!g" %{!?without_shared:${basefile}.files} ${basefile}-devel.files ${basefile}-prof.files \
%{nil}
# compiler version
@@ -102,7 +102,9 @@ Group: System Environment/Libraries\
%description -n %{ghc_pkg_name}\
%{?common_description}%{!?common_description:Haskell %{local_pkg_name} library.}\
\
+%if 0%{!?without_shared:1} \
This package provides the shared library.\
+%endif \
\
%ghc_lib_package\
%{nil}
diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec
index 01531b0..a7ddbab 100644
--- a/ghc-rpm-macros.spec
+++ b/ghc-rpm-macros.spec
@@ -1,5 +1,5 @@
Name: ghc-rpm-macros
-Version: 0.9.0
+Version: 0.9.1
Release: 1%{?dist}
Summary: Macros for building packages for GHC
@@ -53,11 +53,14 @@ rm -rf $RPM_BUILD_ROOT
%changelog
-* Sat Sep 25 2010 Jens Petersen <petersen at redhat.com> - 0.9.0-1
-- add ghc-deps.sh to add ghc package hash rpm metadata provides and requires
+* Thu Sep 30 2010 Jens Petersen <petersen at redhat.com> - 0.9.1-1
+- fix without_shared build so it actually works
+
+* Thu Sep 30 2010 Jens Petersen <petersen at redhat.com> - 0.9.0-1
+- add rpm provides and requires script ghc-deps.sh for package hash metadata
- turn on hash provides and disable debuginfo by default
- make shared and hscolour default
-- use without_shared and without_hscolour to disble them
+- use without_shared and without_hscolour to disable them
- add ghc_pkg_obsoletes for obsoleting old packages
- use ghcpkgbasedir
- always obsolete -doc packages, but keep -o for now for backward compatibility
More information about the scm-commits
mailing list