From 9c94cfbdcd3c5a90cee45579353112ae3ab5a3d1 Mon Sep 17 00:00:00 2001 From: socatlolmeow Date: Fri, 9 Oct 2026 20:09:56 +0200 Subject: [PATCH] Add Makefile, update README with install instructions, fix .gitignore --- .gitignore | 11 +++++++++-- Cargo.toml | 4 ++-- Makefile | 19 +++++++++++++++++++ README.md | 36 +++++++++++++++++++++++++++++++++--- 4 files changed, 63 insertions(+), 7 deletions(-) create mode 100644 Makefile diff --git a/.gitignore b/.gitignore index b12938c..630ad22 100644 --- a/.gitignore +++ b/.gitignore @@ -2,8 +2,6 @@ # will have compiled files and executables debug target -README.md - # These are backup files generated by rustfmt **/*.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 # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ + +# makepkg build artifacts +pkg/ +drift-music/ +src/cargo-home/ +src/drift-music/ +src/target/ +*.pkg.tar.zst +*.pkg.tar.xz \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index de198d7..582b230 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,11 +2,11 @@ name = "drift" version = "0.1.0" edition = "2021" - -[workspace] description = "A Vim-style terminal music player for YouTube Music (no login required)" license = "MIT" +[workspace] + [dependencies] ratatui = "0.29" anyhow = "1" diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..aa2901a --- /dev/null +++ b/Makefile @@ -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 diff --git a/README.md b/README.md index 0363ab9..d4e3184 100644 --- a/README.md +++ b/README.md @@ -34,9 +34,39 @@ Stream your favourite music from YouTube Music — all in one client, in your te ## Installation -> **Not implemented yet.** -> -> 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. +### Dependencies + +- [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 | ---