I've solved the problem already. As I said I reinstalled the whole system. Now everything seems to work fine. I have no idea what was causing previous problem.
Moreover, there is nothing wrong with
Code:
makepkg ../some_lib.tgz
Let's suppose we are in /tmp/some_lib. Package will be made in parent directory /tmp/.