i made a package with makepkg and now have a program that needs a shared library. This library is part of the package.
Where do I have to put the library or where can I change the searchpath for shared libraries?
It kind of depends on the package, but shared libraries almost always go in /usr/lib. If they are core system libraries, they may go in /lib. If they are application specific, they may go in /usr/lib, or if the application is installed to /opt for some reason, they may go in /opt/appname/lib or something similar.
Assuming your library is standard, you should have makepkg install it to /usr/lib. If, on the other hand, you aren't sure, you can install it to any directory, put that directory in /etc/ld.so.conf, and run ldconfig. Then other applications should be able to see it.
Cool, got it working.
Related question: where is the PATH Variable then? I could not find it in .bashrc.
PATH is originally set in /etc/profile. If you want to make system wide changes, you edit it there, if you want to make it specific to one user (recommended), you set it in ~/.bashrc using PATH=$PATH:/new/path So as to not overwrite the default path.
If you are making a package that installs to /opt and wants to have an entry in the PATH, it should have an entry in /etc/profile.d. Look at some of the other entries there for more info.