Big Picture: I am building an in-house rpm for a customized php. I build an rpm which works, but generate library requirements that I can't seem to meet without using 'nodeps', which I want to avoid to ensure other requirements are met in future usage.
The cause of This Problem: (As usual in linux it comes down to proprietary software)... is the Oracle client library. The RPM I built for it is not registering its 'provide' correctly so that RPM understands that it provides this library capability.
%prep
%setup -q -n %{shortname}-%{version}
%build
%install
mkdir -p %{buildroot}/%{prefix}
mkdir -p %{buildroot}/%{_sysconfdir}/profile.d
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
cp -a %{_builddir}/%{shortname}-%{version} %{buildroot}/%{prefix}/
%{__install} -m 644 -p %{SOURCE1} \
$RPM_BUILD_ROOT%{_sysconfdir}/profile.d/oracle-instantclient.sh
echo %{prefix}/%{shortname}-%{version}>%{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}.conf
rm -fv /opt/%{shortname}-%{version} /opt/%{shortname} /thisDir/%{shortname}-%{version} /thisDir/%{shortname}
ln -sv %{prefix}/%{shortname}-%{version} /opt/
ln -sv /opt/%{shortname}-%{version} /opt/%{shortname}
ln -sv %{prefix}/%{shortname}-%{version} /thisDir/
ln -sv /thisDir/%{shortname}-%{version} /thisDir/%{shortname}
chown -h user:user /opt/%{shortname}-%{version} /opt/%{shortname} /thisDir/%{shortname}-%{version} /thisDir/%{shortname}
%clean
rm -rf %{buildroot}
%files
###%defattr(-,root,root,0755)
%{prefix}/%{shortname}-%{version}
/%{_sysconfdir}/profile.d/%{name}.sh
/%{_sysconfdir}/ld.so.conf.d/%{name}.conf
%post -p /sbin/ldconfig
%postun
rm -f /%{_sysconfdir}/profile.d/%{name}.sh /%{_sysconfdir}/ld.so.conf.d/%{name}.conf
rm -rfv /opt/%{shortname}-%{version} /opt/%{shortname} /thisDir/%{shortname}-%{version} /thisDir/%{shortname} %{_sysconfdir}/profile.d/%{source1}
ldconfig
rm -rf %{prefix}/%{shortname}-%{version}
rm -fv /opt/%{shortname}-%{version}
rm -fv /opt/%{shortname}
rm -fv /thisDir/%{shortname}-%{version}
rm -fv /thisDir/%{shortname}
rm -fv %{_sysconfdir}/profile.d/%{name}.sh
/sbin/ldconfig
Most of this is just script providing symlinks we use for standard locations across our environment; the functional part is the ldconfig. What am I doing wrong to ensure that rpmbuild picks up the 'provides'? I'm having a very hard time finding documentation on how this works in contemporary rpmbuild in Cent6.