ln -sf /opt/bupc2.8/bin/upcc ${RPM_BUILD_ROOT}/%{_bindir}
The link needs to be created in the %build
section and it also needs to point to where you’re installing the RPM.
Before creating the link make sure that the destination directory exists, i.e. ${RPM_BUILD_ROOT}/%{_bindir}
. You can use mkdir
or install -d
for this.