fix without_shared build so it actually works

epel9
Jens Petersen 15 years ago
parent 742ca58b86
commit 02c69a3bd2

@ -23,17 +23,17 @@ pkgname=%{?1}%{!?1:%{pkg_name}} \
basefile=ghc-${pkgname} \ basefile=ghc-${pkgname} \
pkgnamever=${pkgname}-%{version} \ pkgnamever=${pkgname}-%{version} \
rm -f ${basefile}.files ${basefile}-devel.files ${basefile}-prof.files \ 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} \ %if 0%{!?without_shared:1} \
echo "%defattr(-,root,root,-)" > ${basefile}.files \
if [ -d "${RPM_BUILD_ROOT}%{ghcpkgdir}" ]; then \ if [ -d "${RPM_BUILD_ROOT}%{ghcpkgdir}" ]; then \
echo "%dir %{ghcpkgdir}" >> ${basefile}.files \ echo "%dir %{ghcpkgdir}" >> ${basefile}.files \
echo "%attr(755,root,root) %{ghcpkgdir}/libHS${pkgnamever}-ghc%{ghc_version}.so" >> ${basefile}.files \ echo "%attr(755,root,root) %{ghcpkgdir}/libHS${pkgnamever}-ghc%{ghc_version}.so" >> ${basefile}.files \
fi \ fi \
%endif \ %endif \
echo "%defattr(-,root,root,-)" > ${basefile}-devel.files \ 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 \ echo "%{ghcpkgbasedir}/package.conf.d/${pkgnamever}*.conf" >> ${basefile}-devel.files \
if [ -d "${RPM_BUILD_ROOT}%{ghcpkgdir}" ]; then \ if [ -d "${RPM_BUILD_ROOT}%{ghcpkgdir}" ]; then \
find ${RPM_BUILD_ROOT}%{ghcpkgdir} -type d | sed "s/^/%dir /" >> ${basefile}-devel.files \ 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 \ if [ -d "${RPM_BUILD_ROOT}%{ghcdocdir}" ]; then \
echo "%{ghcdocdir}" >> ${basefile}-devel.files \ echo "%{ghcdocdir}" >> ${basefile}-devel.files \
fi \ 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} %{nil}
# compiler version # compiler version
@ -102,7 +102,9 @@ Group: System Environment/Libraries\
%description -n %{ghc_pkg_name}\ %description -n %{ghc_pkg_name}\
%{?common_description}%{!?common_description:Haskell %{local_pkg_name} library.}\ %{?common_description}%{!?common_description:Haskell %{local_pkg_name} library.}\
\ \
%if 0%{!?without_shared:1} \
This package provides the shared library.\ This package provides the shared library.\
%endif \
\ \
%ghc_lib_package\ %ghc_lib_package\
%{nil} %{nil}

@ -1,5 +1,5 @@
Name: ghc-rpm-macros Name: ghc-rpm-macros
Version: 0.9.0 Version: 0.9.1
Release: 1%{?dist} Release: 1%{?dist}
Summary: Macros for building packages for GHC Summary: Macros for building packages for GHC
@ -53,11 +53,14 @@ rm -rf $RPM_BUILD_ROOT
%changelog %changelog
* Sat Sep 25 2010 Jens Petersen <petersen@redhat.com> - 0.9.0-1 * Thu Sep 30 2010 Jens Petersen <petersen@redhat.com> - 0.9.1-1
- add ghc-deps.sh to add ghc package hash rpm metadata provides and requires - fix without_shared build so it actually works
* Thu Sep 30 2010 Jens Petersen <petersen@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 - turn on hash provides and disable debuginfo by default
- make shared and hscolour 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 - add ghc_pkg_obsoletes for obsoleting old packages
- use ghcpkgbasedir - use ghcpkgbasedir
- always obsolete -doc packages, but keep -o for now for backward compatibility - always obsolete -doc packages, but keep -o for now for backward compatibility

Loading…
Cancel
Save