You told install command to install under full path, containing directories. Please read your install command once more carefully. You need to strip directory part from find output.
I don’t know why I didn’t think about $basename. So for now, here is the command :
find $pwd ! -name ‘*.so’ ! -name ‘Makefile’ -type f -executable -exec install -m 755 {} %{buildroot}%{_bindir} ;
Well, the problem with writing scripts is often that you can not be clairvoyant and know that such a thing as basename exists. You can only know that after someone else tells, or one happens to read it somewhere, or similar. And even then you have to remember it on the right moment.
There are a lot of those tiny, but usefull tools, but where to look for them?
That is why asking here can save a lot of time and frustration