make ghc_gen_filelists pkg_name arg optional

This commit is contained in:
Jens Petersen 2010-07-31 16:21:10 +10:00
parent 85ba4d157e
commit a57e6949bb
2 changed files with 17 additions and 10 deletions

View File

@ -19,15 +19,18 @@
# ghc_gen_filelists [pkgname]
%ghc_gen_filelists() \
rm -f %1-devel.files %1-prof.files %1-doc.files \
echo '%defattr(-,root,root,-)' > %1-devel.files \
find ${RPM_BUILD_ROOT}%{ghcpkgdir} -type d | sed 's/^/%dir /' >> %1-devel.files \
find ${RPM_BUILD_ROOT}%{ghcpkgdir} ! \\( -type d -o -name '*_p.a' -o -name '*.p_hi' \\) >> %1-devel.files \
echo '%defattr(-,root,root,-)' > %1-prof.files \
find ${RPM_BUILD_ROOT}%{ghcpkgdir} \\( -name '*_p.a' -o -name '*.p_hi' \\) >> %1-prof.files \
sed -i -e "s!${RPM_BUILD_ROOT}!!g" %1-devel.files %1-prof.files \
echo '%defattr(-,root,root,-)' > %1-doc.files \
echo '%{ghcdocdir}' >> %1-doc.files \
pkgname=%{?1}%{!?1:%{pkg_name}} \
basefile=ghc-${pkgname} \
pkgnamever=${pkgname}-%{version} \
rm -f ${basefile}-devel.files ${basefile}-prof.files ${basefile}-doc.files \
echo '%defattr(-,root,root,-)' > ${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 \
echo '%defattr(-,root,root,-)' > ${basefile}-prof.files \
find ${RPM_BUILD_ROOT}%{ghcpkgdir} \\( -name '*_p.a' -o -name '*.p_hi' \\) >> ${basefile}-prof.files \
sed -i -e "s!${RPM_BUILD_ROOT}!!g" ${basefile}-devel.files ${basefile}-prof.files \
echo '%defattr(-,root,root,-)' > ${basefile}-doc.files \
echo '%{ghcdocdir}' >> ${basefile}-doc.files \
%{nil}
%ghc_gen_scripts %cabal register --gen-script ; %cabal unregister --gen-script

View File

@ -1,5 +1,5 @@
Name: ghc-rpm-macros
Version: 0.7.0.610.2
Version: 0.7.0.610.3
Release: 1%{?dist}
Summary: Macros for building packages for GHC
@ -48,6 +48,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Sat Jul 31 2010 Jens Petersen <petersen@redhat.com> - 0.7.0.610.3-1
- make ghc_gen_filelists pkg_name arg optional
* Sat Jul 31 2010 Jens Petersen <petersen@redhat.com> - 0.7.0.610.2-1
- also backport cabal_pkg_conf for f13 compatibility
- fix ghc_strip_dynlinked when no dynlinked files
@ -64,6 +67,7 @@ rm -rf $RPM_BUILD_ROOT
in current released f12 binlib packages
- for same reason ghcdocdir, ghcpkgdir, ghc_gen_filelists do not take
optional name arg
- ghc-6.10.4 haddock does not support hscolour
* Thu Dec 24 2009 Jens Petersen <petersen@redhat.com> - 0.2.6-1
- backport: