How to run Arduino code on Linux?
Arduino libraries rely on the Arduino API to operate (usually). Things like the Serial object are expected to be defined.

Linux doesn't have any of that stuff, so you would have to implement it all yourself.

There is the "Wiring Pi" project for (obviously) the Raspberry Pi that implements the majority of the Arudino API, but whether that could be made to run on Linux on a PC is anyone's guess.

It may be simpler to just examine the existing library (and datasheet) and implement it yourself in your chosen language.