Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packaging spotify-qt for NetBSD #25

Closed
ghost opened this issue Aug 18, 2020 · 21 comments
Closed

Packaging spotify-qt for NetBSD #25

ghost opened this issue Aug 18, 2020 · 21 comments

Comments

@ghost
Copy link

ghost commented Aug 18, 2020

Hi,
Had a go at packaging it for NetBSD. It builds, installs and launches. Can't test further as I don't have a primium account.
Looks like an interesting addition to the repo.
Although, currently there are a lot of post-install steps to copy all icons to DESTDIR.
Are you planing to implement this on the source?
I mean adding something like

install(
    FILES icons/spotify-qt.svg
    DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps"
)

or

install(FILES
    ${DESKTOP_FILES}
    DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications"
    COMPONENT Runtime
)

and so on,
would make life easier for package maintainers.
Just a suggestion.
Thanks for making this software available.

@kraxarn
Copy link
Owner

kraxarn commented Aug 18, 2020

Never actually thought of it, sounds like a good idea though, so definitely something I'll look into. I do plan on removing all bitmap icons though, leaving only the svg one for simplicity.

@ghost
Copy link
Author

ghost commented Aug 18, 2020

Glad you liked it.
Would you mind replying to this issue when you do so I can keep track of it?
I'll add a package to the wip (work in progress) repo in the coming days and wait for your clean-up.
On atother topic, do you happen to know if it works using ncspot as the client backend?
I've just packaged it for NetBSD and spotifyd isn't really ready for prime time yet :)

@kraxarn
Copy link
Owner

kraxarn commented Aug 18, 2020

ncspot is similar to this, as it doesn't play music on it's own, but instead relies on librespot for playback, even if it's built-in into the application itself. At least that's what I gathered from the readme. Any client that can play music is supported, as this mostly just works as a remote. If ncspot is supported, that means librespot is supported as well, which I would recommend using directly instead, but either should work fine. spotifyd is also based of librespot.

There's currently no configuration support for librespot inside of the application, but that is something I'm planning to add support for very soon.

@ghost
Copy link
Author

ghost commented Aug 18, 2020

ncspot is similar but, its a pain, rustc is annoyingly slow. It takes about 2h on 4 cores to compile, while spotify-qt takes 5min :)
Yeah, that was actually my thought, use librespot directly. I'll look at packaging it independently and not as a part of ncspot.
Looking forward to the development of spotify-qt.

@kraxarn
Copy link
Owner

kraxarn commented Aug 30, 2020

Unsure if there are any clear advantages to using GNUInstallDirs instead of just specifying the directory manually.

@ghost
Copy link
Author

ghost commented Aug 30, 2020

No, not for you but, for package maintainers.

@ghost
Copy link
Author

ghost commented Aug 30, 2020

@kraxarn Sorry, guess I misunderstood your comment.
Just saw you've commited a fix, thanks. I'll re-package it locally when I find the time.
Unfortunately, I can't get librespot to build. ncspot builds just fine and it now available for the users.
The issue is that ncspot actually doesn't use all the components of librespot, it leaves out librespot-connect which, is the component that fails to build due to a rust "out-of-scope" error when compiling get_if_addrs. Which, btw is an unmaintained crate.
Either I use ncspot as "bloated" backend, or I'll try to package the components of librespot one by one.

@kraxarn
Copy link
Owner

kraxarn commented Aug 30, 2020

I'm somewhat familiar with how Rust/Cargo works, but not at all with BSD, otherwise I would see if I could get it to build myself. Spotify Connect is otherwise required for this app to work, so ncspot probably interacts with the library directly. Could also possibly just be fixed in the librespot if everything else required is available.

@ghost
Copy link
Author

ghost commented Aug 30, 2020

@kraxarn here is the error I'm getting, librespot-org/librespot#520

@kraxarn
Copy link
Owner

kraxarn commented Sep 12, 2020

Initial librespot support is now available as of b2a7fa0.

@ghost
Copy link
Author

ghost commented Sep 13, 2020

This is awesome thanks!
The package for spotify-qt its ready to go but, still on my machine only, as I haven't had time/managed to get librespot to build.

@ghost
Copy link
Author

ghost commented Sep 15, 2020

@kraxarn So, I've decided to push the package to the wip-repo and call for help from other devs,
http://mail-index.netbsd.org/pkgsrc-wip-changes/2020/09/15/msg017701.html

If we (anybody better at rust than me!!!) can fix the build of librespot, I'll import the package to the main repo.

@ghost
Copy link
Author

ghost commented Sep 16, 2020

@kraxarn Insåg just att du befinner dig i Sverige 😉
Det finns hopp, om du är nyfiken kan du kolla den issue som jag har hos librespot och som fick oväntade besök inatt.

EDIT: librespot-org/libmdns#16

@ghost
Copy link
Author

ghost commented Oct 7, 2020

@ghost
Copy link
Author

ghost commented Oct 7, 2020

@kraxarn
Copy link
Owner

kraxarn commented Oct 8, 2020

Exciting stuff! Too bad i don't know NetBSD enough to actually try it out myself.

@ghost
Copy link
Author

ghost commented Oct 8, 2020

@kraxarn there's not much to try, it runs perfectly :)

The volume control is bit glitchy but, I can use my keybindings to raise and lower the sound.
I've asked for import permission.
Normally, I would just import it without asking but, it requires librespot from the git-dev branch hence, I've asked. Otherwise, I have to wait for an upstream release.

@kraxarn
Copy link
Owner

kraxarn commented Oct 8, 2020

If you compiled librespot with PulseAudio support, if that's even a thing on BSD, you can enable "pa volume control" in the settings and it should work a lot better. Otherwise it sends a request every time, which librespot seems to have some issues with. There's a reason the setting exists to begin with.

@ghost
Copy link
Author

ghost commented Oct 8, 2020

Yes, pulseaudio is available and maybe I should add it for others. On my system, no thanks. I don't want pulseaudio, consolekit, policykit or avahi on my system. For now, I still have to live with dbus.
Thanks for the hint.

@ghost
Copy link
Author

ghost commented Oct 11, 2020

@kraxarn spotify-qt is now available to NetBSD users, https://mail-index.netbsd.org/pkgsrc-changes/2020/10/11/msg222510.html

Depending on which branch an user is tracking and which repo-mirror they are pulling binaries from, installing the app can be as simple as, pkgin install spotify-qt

Feel free to add NetBSD to the list of platforms supporting spotify-qt.

@ghost
Copy link
Author

ghost commented Oct 18, 2020

@kraxarn you probably would like to know that, after a short discussion on reddit, spotify-qt was ported to FreeBSD, https://svnweb.freebsd.org/ports/head/audio/spotify-qt/

I was only involved in the reddit discussion, not on the port but, though you'd like to know it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant