%files for the profiling rpm was missing .p_hi files that were nested deeply.
Fixed by calculating %files for prof rpm similar to how it is calculated
for the main rpm.
libdir=`echo %{prefix}/lib | sed 's|^/||'`
find $libdir ! -type d ! -name '*.p_hi' ! -name '*_p.a' -print | sed 's|^|/|'\
>$dir/rpm-noprof-lib-files
+find $libdir ! -type d \( -name '*.p_hi' -or -name '*_p.a' \) -print | sed 's|^|/|'\
+ >$dir/rpm-prof-lib-files
cd $dir
%clean
%doc ghc/ANNOUNCE ghc/README
%{prefix}/bin/*
-%files prof
-%{prefix}/lib/ghc-%{version}/imports/*/*.p_hi
-%{prefix}/lib/ghc-%{version}/libHS*_p.a
+%files prof -f rpm-prof-lib-files
%files doc
%doc docs/