From 912fb046a9ab7f5c49414c6fa1aec4c53928fe06 Mon Sep 17 00:00:00 2001 From: Nathaniel Daniel Date: Fri, 16 Aug 2024 14:16:56 -0700 Subject: [PATCH] Fix cross compilation (#324) * Upgrade deps * Update depandabot * Update CI * Ignore test that fails on CI * Use rustls for reqwest * Fix cross compilation * Update README CI badge --- Cargo.lock | 4 ++-- Cargo.toml | 16 ++++++++++------ Makefile | 2 +- README.md | 2 +- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d73bae4..fa6e312 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -120,8 +120,7 @@ dependencies = [ [[package]] name = "audiopus_sys" version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62314a1546a2064e033665d658e88c620a62904be945f8147e6b16c3db9f8651" +source = "git+https://github.com/adumbidiot/audiopus_sys?branch=pkg-config#7a79e9bd0f7af8b992de09a8463c85ac304411fc" dependencies = [ "cmake", "log", @@ -1587,6 +1586,7 @@ version = "0.0.2" dependencies = [ "anyhow", "argh", + "audiopus_sys", "camino", "chrono", "clokwerk", diff --git a/Cargo.toml b/Cargo.toml index 9f5fcc7..7103991 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,10 +4,12 @@ version = "0.0.2" authors = [ "adumbidiot " ] edition = "2021" publish = false +license = "MIT" [dependencies] anyhow = "1.0.86" argh = "0.1.12" +audiopus_sys = { version = "0.2.2", default-features = false } camino = { version = "1.1.8", features = [ "serde1" ] } # clokwerk = "0.4.0" clokwerk = { git = "https://github.com/mdsherry/clokwerk" } @@ -31,6 +33,12 @@ toml = "0.8.19" zalgo = { git = "https://github.com/adumbidiot/zalgo-rs" } poise = "0.6.1" +[features] +default = [] +pkg-config = [ + "audiopus_sys/pkg-config", +] + [profile.release] lto = "fat" codegen-units = 1 @@ -40,6 +48,7 @@ debug-assertions = false strip = "symbols" [patch.crates-io] +audiopus_sys = { git = "https://github.com/adumbidiot/audiopus_sys", branch = "pkg-config" } [workspace] members = [ @@ -48,7 +57,7 @@ members = [ [package.metadata.deb] name = "quarky" -depends = "" +depends = [ "libopus0", "yt-dlp" ] assets = [ [ "target/release/quarky", "usr/bin/", "700" ], [ "deb-config.toml", "etc/quarky/config.toml", "600" ], @@ -61,8 +70,3 @@ maintainer-scripts = "debian/" [package.metadata.deb.systemd-units] enable = false start = false - -[package.metadata.rpi-deploy] -targets = [ - "aarch64-unknown-linux-gnu", -] diff --git a/Makefile b/Makefile index 34db07f..bfd8586 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,6 @@ HOST = dagger.local .PHONY: deploy deploy: - debian-sysroot-build --target ${TARGET} --package ${PACKAGE} --install-package libc6 --install-package libc6-dev --install-package linux-libc-dev --install-package libgcc-12-dev + debian-sysroot-build --target ${TARGET} --package ${PACKAGE} --features pkg-config --install-package libc6 --install-package libc6-dev --install-package linux-libc-dev --install-package libgcc-12-dev --install-package libopus-dev cargo deb --target ${TARGET} --no-build --no-strip deploy-deb target/${TARGET}/debian/${DEB_NAME} ${HOST} \ No newline at end of file diff --git a/README.md b/README.md index 518da89..2fc7bd3 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # quarky -![CI](https://github.com/adumbidiot/quarky/workflows/CI/badge.svg) +[![CI](https://github.com/adumbidiot/quarky/actions/workflows/CI.yaml/badge.svg)](https://github.com/adumbidiot/quarky/actions/workflows/CI.yaml) ## Description Heyo, it's your boi Nate D the hip hop star. you may know me by my alias: adumbidiot. I present to you a life changing discord bot known as "Quarky".