Libspotify ?

I need this to work mopidy, It must be very easy to port this library here is Makefile there is issu with that install -T flag.

Makefile:
prefix ?= /usr/local

all:
    $(error "Usage: make [prefix=/install/me/here] install | uninstall")

install:
    mkdir -p $(prefix)/include/libspotify
    install include/libspotify/api.h $(prefix)/include/libspotify

    mkdir -p $(prefix)/lib
    install -T lib/libspotify.so.12 $(prefix)/lib/libspotify.so.12.1.51

    cd $(prefix)/lib && ln -sf libspotify.so.12.1.51 libspotify.so.12 && ln -sf libspotify.so.12.1.51 libspotify.so

    mkdir -p $(prefix)/lib/pkgconfig
    sed -e s:PKG_PREFIX:$(prefix):g <lib/pkgconfig/libspotify.pc >$(prefix)/lib/pkgconfig/libspotify.pc

    ldconfig

uninstall:
    rm -rf $(prefix)/include/libspotify
    rm -f  $(prefix)/lib/libspotify.so.12.1.51
    rm -f  $(prefix)/lib/libspotify.so.12
    rm -f  $(prefix)/lib/libspotify.so
    rm -f  $(prefix)/lib/pkgconfig/libspotify.pc

What is the problem with that -T flag what is BSD equievelant of it ?
 
Read the man page for install on Linux, figure out what -T does. I just did, but that one sentence "treat DEST as a normal file" isn't immediately obvious and I'm feeling to lazy to understand the whole man page. Unfortunately, the FreeBSD version of install also has a -T option, and it is completely different, and requires arguments. I get the feeling that on FreeBSD, the -T option is actually not needed at all; if the target doesn't exist yet, the target is automatically treated as a file. But please read the man pages yourself.
 

Strictly speaking, it is possible to mix in a Linux shared library provided that:
1. it only does syscalls through libc syscall function and not directly (thankfully, that's usually the case);
2. there are necessary conversions in place for ABI differences between FreeBSD libc and Linux glibc;
3. the library doesn't not pass incompatible structs/constants/function pointers to native code through its own API, otherwise it would need wrapping as well.

Now, as far as I can see, libspotify was officially deprecated 4 years ago, so it's absolutely not worth the time investment.
 
Back
Top