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

Recognise OpenBSD to unbreak build #1253

Merged
merged 3 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- [Cross Compiling on Ubuntu](./installation/Cross-Compiling-on-Ubuntu.md)
- [Installing with Homebrew on macOS](./installation/MacOS.md)
- [Installing on FreeBSD](./installation/FreeBSD.md)
- [Installing on OpenBSD](./installation/OpenBSD.md)
- [Configuration](./config/README.md)
- [CLI options](./config/Cli.md)
- [Configuration file](./config/File.md)
Expand Down
4 changes: 2 additions & 2 deletions docs/src/config/File.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ dbus_type = "session"

# The audio backend used to play music. To get
# a list of possible backends, run `spotifyd --help`.
backend = "alsa" # use portaudio for macOS [homebrew]
backend = "alsa" # use portaudio for BSD and macOS [homebrew]

# The alsa audio device to stream audio. To get a
# list of valid devices, run `aplay -L`,
Expand All @@ -66,7 +66,7 @@ mixer = "PCM" # omit for macOS
# The volume controller. Each one behaves different to
# volume increases. For possible values, run
# `spotifyd --help`.
volume_controller = "alsa" # use softvol for macOS
volume_controller = "alsa" # use softvol for BSD and macOS

# A command that gets executed in your shell after each song changes.
on_song_change_hook = "command_to_run_on_playback_events"
Expand Down
25 changes: 25 additions & 0 deletions docs/src/installation/OpenBSD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# OpenBSD install guide

`spotifyd` is available on all supported Rust architectures:

* aarch64
* amd64
* i386
* powerpc64
* riscv64
* sparc64

## Install

```sh
# pkg_add spotifyd
```

## Configuring spotifyd

The official package uses PortAudio and works out of the box, no configuration is required.

## Running spotifyd

You may start `spotifyd` as background daemon in your `~/.xsession` X11 startup script
or have clients like `spotify-qt` start/stop it accordingly.
2 changes: 1 addition & 1 deletion docs/src/installation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,6 @@ To enable an additional audio backend, pass `<audio_backend_name>_backend` as a
| Feature Flag | Description |
|--------------|-------------------------------------------------------------------------------------|
| dbus_keyring | Provides password authentication over the system's keyring (supports all platforms) |
| dbus_mpris | Provides multimedia key support (Linux only) |
| dbus_mpris | Provides multimedia key support (Linux and BSD only) |

> __Note:__ Compiling Spotifyd with all features and the pulseaudio backend on Ubuntu would result in the following command: `cargo build --release --no-default-features --features pulseaudio_backend,dbus_keyring,dbus_mpris`
2 changes: 1 addition & 1 deletion src/utils.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use log::trace;
use std::env;

#[cfg(any(target_os = "freebsd", target_os = "linux"))]
#[cfg(any(target_os = "freebsd", target_os = "linux", target_os = "openbsd"))]
fn get_shell_ffi() -> Option<String> {
use libc::{geteuid, getpwuid_r};
use std::{ffi::CStr, mem, ptr};
Expand Down
Loading