Here's something that you can try...
the last argument in an fpm command can contain an equals operator which defines the direcotry to come from and to install to.
Try using this command instead
fpm -f -s "dir" -t "deb" -a "all" -n "myproject" -v 1 -C "/tmp/tmpoklyPn" myproject=/var/lib/myproject
Notice the myproject=/var/lib/myproject, the left side is the directory name of my project (relative, because I used -C to change directory to /tmp/tmpoklyPn before looking for packages) and on the right side is where I want to install to on the remote machine...
the myproject=/var/lib/myproject, the left side is the directory name of the project and on the right side is where I want to install to on the remote machine. This is because you used -C to change directory to /tmp/tmpoklyPn before looking for packages