Help with building from source

The directions on http://docs.pimusicbox.com/en/latest/ appear to be for Linux, is there any directions for mac os x? Also, I attempted following the directions on a Parallels based Ubuntu VM and the musicbox.sh script is not working. For example losetup is being passed an invalid option:

losetup: invalid option – ‘P’

Any advice or alternate instructions would be appreciated.

Edit: I managed to get a working image going, below are the solutions to the problems I had. Could still use advice on what to edit in create_musicbox0.7.sh in order to install mopidy-spotify from alternate repo.

issues with step #1)
E: Unable to locate package qemu-arm-static
solution: qemu-arm-static seems to be part of qemu-user-static package
apt-get install qemu-user-static
which qemu-arm-static
$ /usr/bin/qemu-arm-static

issue with step #3)
unzip pimusicbox-0.6.0.zip && mv pimusicbox-0.6.0/.img musicbox.img
mv pimusicbox-0.6.0/
.img musicbox.img
mv: cannot stat ‘pimusicbox-0.6.0/*.img’: No such file or directory
solved by running this command instead
unzip pimusicbox-0.6.0.zip && mv musicbox0.6.img musicbox.img

issues with step #4)
./src/makeimage.sh musicbox.img bigger
fatal: Not a git repository (or any of the parent directories): .git
solved by hardcoding SRC_VERSION to v666 (randomly chosen) SRC_VERSION is not used in bigger() anyways

edit: I gave up on this idea and decided to try updating from the pi itself starting with a fresh pi musicbox install. that sent me to a long and unpleasant visit to dependency hell. then I decided to scrap the idea and install mopidy on a fresh raspbian install, no pi musicbox. now everything is working just fine.