[GH-ISSUE #40] Specify target-dir in AUR PKGBUILD #823

Closed
opened 2026-05-23 00:58:13 +01:00 by JakeStanger · 1 comment
Owner

Originally created by @Serial-ATA on GitHub (Jun 8, 2023).
Original GitHub issue: https://github.com/JakeStanger/mpd-discord-rpc/issues/40

When using a global target-dir, the package step of the PKGBUILD fails:

==> Starting package()...
install: cannot stat '/home/serial/.cache/paru/clone/mpd-discord-rpc/src/mpd-discord-rpc/target/release/mpd-discord-rpc': No such file or directory
==> ERROR: A failure occurred in package().
    Aborting...
error: failed to build 'mpd-discord-rpc-v1.6.0.r0.ee29533-1 (mpd-discord-rpc-git)':
error: packages failed to build: mpd-discord-rpc-v1.6.0.r0.ee29533-1 (mpd-discord-rpc-git)

The fix is to just specify the target-dir:

 build() {
     cd "$srcdir/mpd-discord-rpc"
-    cargo build --release --locked
+    cargo build --release --locked --target-dir target
 }
Originally created by @Serial-ATA on GitHub (Jun 8, 2023). Original GitHub issue: https://github.com/JakeStanger/mpd-discord-rpc/issues/40 When using a global target-dir, the `package` step of the PKGBUILD fails: ``` ==> Starting package()... install: cannot stat '/home/serial/.cache/paru/clone/mpd-discord-rpc/src/mpd-discord-rpc/target/release/mpd-discord-rpc': No such file or directory ==> ERROR: A failure occurred in package(). Aborting... error: failed to build 'mpd-discord-rpc-v1.6.0.r0.ee29533-1 (mpd-discord-rpc-git)': error: packages failed to build: mpd-discord-rpc-v1.6.0.r0.ee29533-1 (mpd-discord-rpc-git) ``` The fix is to just specify the target-dir: ```diff build() { cd "$srcdir/mpd-discord-rpc" - cargo build --release --locked + cargo build --release --locked --target-dir target } ```
Author
Owner

@JakeStanger commented on GitHub (Jun 8, 2023):

Just released an update to the package, thanks for the fix :)

<!-- gh-comment-id:1583442892 --> @JakeStanger commented on GitHub (Jun 8, 2023): Just released an update to the package, thanks for the fix :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/mpd-discord-rpc#823
No description provided.