|
|
|
@ -70,8 +70,10 @@ fi\
|
|
|
|
|
%define pkgver %{?2}%{!?2:%{version}}\
|
|
|
|
|
%define pkgnamever %{pkgname}-%{pkgver}\
|
|
|
|
|
%define basepkg %{?ghc_name}%{!?ghc_name:ghc}-%{pkgname}\
|
|
|
|
|
if [ -z "$(ls %{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf)" ]; then\
|
|
|
|
|
echo '%{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf not found'\
|
|
|
|
|
%define ghcliblib %{ghclibdir}%{?with_hadrian:/lib}\
|
|
|
|
|
%define ghclibplatform %{ghcliblib}%{?with_hadrian:/%{_arch}-linux-ghc-%{ghc_version}}\
|
|
|
|
|
if [ -z "$(ls %{buildroot}%{ghcliblib}/package.conf.d/%{pkgnamever}*.conf)" ]; then\
|
|
|
|
|
echo '%{buildroot}%{ghcliblib}/package.conf.d/%{pkgnamever}*.conf not found'\
|
|
|
|
|
exit 1\
|
|
|
|
|
fi\
|
|
|
|
|
rm -f %{basepkg}.files %{basepkg}-doc.files\
|
|
|
|
@ -81,21 +83,21 @@ for i in $(ls %{buildroot}%{_ghclicensedir}/%{basepkg}); do\
|
|
|
|
|
echo "%%license %{pkgnamever}/$i" >> %{basepkg}.files\
|
|
|
|
|
done\
|
|
|
|
|
%endif\
|
|
|
|
|
for i in %{buildroot}%{_ghcdynlibdir}/libHS%{pkgnamever}-*ghc%{ghc_version}.so; do\
|
|
|
|
|
for i in %{buildroot}%{?_ghcdynlibdir}%{!?_ghcdynlibdir:%{ghclibplatform}}/libHS%{pkgnamever}-*ghc%{ghc_version}.so; do\
|
|
|
|
|
if [ -x "$i" ]; then\
|
|
|
|
|
echo $i >> %{basepkg}.files\
|
|
|
|
|
else\
|
|
|
|
|
echo 'Warning: %{buildroot}%{_ghcdynlibdir}/libHS%{pkgnamever}-*ghc%{ghc_version}.so not found'\
|
|
|
|
|
echo 'Warning: %{buildroot}%{?_ghcdynlibdir}%{!?_ghcdynlibdir:%{ghclibplatform}}/libHS%{pkgnamever}-*ghc%{ghc_version}.so not found'\
|
|
|
|
|
fi\
|
|
|
|
|
done\
|
|
|
|
|
pkgdir="%{ghclibdir}/%{pkgnamever}"\
|
|
|
|
|
pkgdir="%{ghclibplatform}/%{pkgnamever}"\
|
|
|
|
|
if [ -d "%{buildroot}${pkgdir}" ]; then\
|
|
|
|
|
find %{buildroot}${pkgdir} -type d -fprintf %{basepkg}-devel.files '%%%%dir %p\\n' -o \\( -name '*.p_hi' -o -name 'libHS*_p.a' \\) -fprint %{basepkg}-prof.files -o -fprint %{basepkg}-devel.files\
|
|
|
|
|
else\
|
|
|
|
|
rm -f %{basepkg}-devel.files %{basepkg}-prof.files\
|
|
|
|
|
touch %{basepkg}-devel.files %{basepkg}-prof.files\
|
|
|
|
|
fi\
|
|
|
|
|
ls %{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf >> %{basepkg}-devel.files\
|
|
|
|
|
ls %{buildroot}%{ghcliblib}/package.conf.d/%{pkgnamever}*.conf >> %{basepkg}-devel.files\
|
|
|
|
|
%if %{with haddock}\
|
|
|
|
|
if [ -d %{buildroot}%{ghc_html_libraries_dir}/%{pkgnamever} ]; then\
|
|
|
|
|
echo %{ghc_html_libraries_dir}/%{pkgnamever} >> %{basepkg}-doc.files\
|
|
|
|
|