Add Makefile, update README with install instructions, fix .gitignore

This commit is contained in:
socatlolmeow 2026-10-09 20:09:56 +02:00
commit 9c94cfbdcd
4 changed files with 63 additions and 7 deletions

11
.gitignore vendored
View file

@ -2,8 +2,6 @@
# will have compiled files and executables # will have compiled files and executables
debug debug
target target
README.md
# These are backup files generated by rustfmt # These are backup files generated by rustfmt
**/*.rs.bk **/*.rs.bk
@ -23,3 +21,12 @@ rustc-ice-*.txt
# and can be added to the global gitignore or merged into this file. For a more nuclear # and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder. # option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/ #.idea/
# makepkg build artifacts
pkg/
drift-music/
src/cargo-home/
src/drift-music/
src/target/
*.pkg.tar.zst
*.pkg.tar.xz

View file

@ -2,11 +2,11 @@
name = "drift" name = "drift"
version = "0.1.0" version = "0.1.0"
edition = "2021" edition = "2021"
[workspace]
description = "A Vim-style terminal music player for YouTube Music (no login required)" description = "A Vim-style terminal music player for YouTube Music (no login required)"
license = "MIT" license = "MIT"
[workspace]
[dependencies] [dependencies]
ratatui = "0.29" ratatui = "0.29"
anyhow = "1" anyhow = "1"

19
Makefile Normal file
View file

@ -0,0 +1,19 @@
PREFIX ?= /usr/local
BINDIR := $(PREFIX)/bin
BINARY := drift
.PHONY: all build install uninstall clean
all: build
build:
cargo build --release
install: build
install -Dm755 target/release/$(BINARY) $(DESTDIR)$(BINDIR)/$(BINARY)
uninstall:
rm -f $(DESTDIR)$(BINDIR)/$(BINARY)
clean:
cargo clean

View file

@ -34,9 +34,39 @@ Stream your favourite music from YouTube Music — all in one client, in your te
## Installation ## Installation
> **Not implemented yet.** ### Dependencies
>
> Package manager installs are not available yet. Distro-specific instructions will be added here (Arch Linux, Void Linux, NixOS, Debian/Ubuntu, etc.) once packages are published. - [mpv](https://mpv.io/) — audio playback
- [yt-dlp](https://github.com/yt-dlp/yt-dlp) — YouTube stream extraction
- [Rust](https://rustup.rs/) (build only)
Install them with your package manager, e.g. on Arch:
```
sudo pacman -S mpv yt-dlp
```
### Build & install
```bash
git clone https://github.com/socatlolmeow/drift.git
cd drift
sudo make install
```
This installs `drift` to `/usr/local/bin`. To install to `/usr/bin` instead:
```bash
sudo make install PREFIX=/usr
```
### Other make targets
| Command | Description |
|---|---|
| `make` | Build (debug skipped, release only) |
| `make build` | Same as above |
| `sudo make install` | Build and install to `$PREFIX/bin` |
| `sudo make uninstall` | Remove the installed binary |
| `make clean` | Remove build artifacts |
--- ---