fix backport of ghc_gen_filelists pkg_name arg handling

This commit is contained in:
Jens Petersen 2010-07-31 17:21:51 +10:00
parent a57e6949bb
commit 8c7eb7e3ee
2 changed files with 9 additions and 5 deletions

View File

@ -19,11 +19,12 @@
# ghc_gen_filelists [pkgname] # ghc_gen_filelists [pkgname]
%ghc_gen_filelists() \ %ghc_gen_filelists() \
pkgname=%{?1}%{!?1:%{pkg_name}} \ basefile=%{?1}%{!?1:ghc-%{pkg_name}}\
basefile=ghc-${pkgname} \
pkgnamever=${pkgname}-%{version} \
rm -f ${basefile}-devel.files ${basefile}-prof.files ${basefile}-doc.files \ rm -f ${basefile}-devel.files ${basefile}-prof.files ${basefile}-doc.files \
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}-devel.files} %{?1::} \
fi \
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 \
find ${RPM_BUILD_ROOT}%{ghcpkgdir} ! \\( -type d -o -name '*_p.a' -o -name '*.p_hi' \\) >> ${basefile}-devel.files \ find ${RPM_BUILD_ROOT}%{ghcpkgdir} ! \\( -type d -o -name '*_p.a' -o -name '*.p_hi' \\) >> ${basefile}-devel.files \
echo '%defattr(-,root,root,-)' > ${basefile}-prof.files \ echo '%defattr(-,root,root,-)' > ${basefile}-prof.files \
@ -195,5 +196,5 @@ find $RPM_BUILD_ROOT -type f -exec sh -c "file {} | grep -q 'dynamically linked'
%ghc_lib_install\ %ghc_lib_install\
%cabal_install\ %cabal_install\
%cabal_pkg_conf\ %cabal_pkg_conf\
%ghc_gen_filelists ghc-%{?pkg_name}%{!?pkg_name:%name}\ %ghc_gen_filelists\
%ghc_strip_dynlinked %ghc_strip_dynlinked

View File

@ -1,5 +1,5 @@
Name: ghc-rpm-macros Name: ghc-rpm-macros
Version: 0.7.0.610.3 Version: 0.7.0.610.4
Release: 1%{?dist} Release: 1%{?dist}
Summary: Macros for building packages for GHC Summary: Macros for building packages for GHC
@ -48,6 +48,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog %changelog
* Sat Jul 31 2010 Jens Petersen <petersen@redhat.com> - 0.7.0.610.4-1
- fix backport of ghc_gen_filelists pkg_name arg handling
* Sat Jul 31 2010 Jens Petersen <petersen@redhat.com> - 0.7.0.610.3-1 * Sat Jul 31 2010 Jens Petersen <petersen@redhat.com> - 0.7.0.610.3-1
- make ghc_gen_filelists pkg_name arg optional - make ghc_gen_filelists pkg_name arg optional