mirror of
https://github.com/fosskers/cargo-aur.git
synced 2026-03-09 07:13:12 -05:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a047906db | ||
|
|
da9934bf00 | ||
|
|
ccd4e9cdb9 | ||
|
|
fdc2a8ee9c | ||
|
|
244d4f2980 | ||
|
|
6ea9720f90 | ||
|
|
99f36f8f47 | ||
|
|
94bd36af28 |
2
.github/workflows/rust.yml
vendored
2
.github/workflows/rust.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cargo build --verbose
|
run: cargo build --verbose
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
|
|||||||
15
CHANGELOG.md
15
CHANGELOG.md
@@ -1,5 +1,20 @@
|
|||||||
# `cargo-aur` Changelog
|
# `cargo-aur` Changelog
|
||||||
|
|
||||||
|
## Unreleased
|
||||||
|
|
||||||
|
#### Added
|
||||||
|
|
||||||
|
- A new `custom` field in `[package.metadata.aur]` which accepts a list of
|
||||||
|
strings that will be added as-is to the `package()` function of the PKGBUILD.
|
||||||
|
This allows the user to add specific extra commands to their build process.
|
||||||
|
See the README for more details.
|
||||||
|
|
||||||
|
## 1.7.1 (2024-03-18)
|
||||||
|
|
||||||
|
#### Fixed
|
||||||
|
|
||||||
|
- The crypt startup error `unexpected free argument aur`.
|
||||||
|
|
||||||
## 1.7.0 (2024-03-07)
|
## 1.7.0 (2024-03-07)
|
||||||
|
|
||||||
#### Added
|
#### Added
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "cargo-aur"
|
name = "cargo-aur"
|
||||||
version = "1.7.0"
|
version = "1.7.1"
|
||||||
authors = ["Colin Woodbury <colin@fosskers.ca>"]
|
authors = ["Colin Woodbury <colin@fosskers.ca>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "Prepare Rust projects to be released on the Arch Linux User Repository."
|
description = "Prepare Rust projects to be released on the Arch Linux User Repository."
|
||||||
@@ -28,3 +28,4 @@ panic = "abort"
|
|||||||
[package.metadata.aur]
|
[package.metadata.aur]
|
||||||
# depends = ["blah"]
|
# depends = ["blah"]
|
||||||
# files = [[".github/dependabot.yml", "/usr/local/share/cargo-aur/dependabot.yml"]]
|
# files = [[".github/dependabot.yml", "/usr/local/share/cargo-aur/dependabot.yml"]]
|
||||||
|
custom = ["echo hi"]
|
||||||
|
|||||||
28
README.md
28
README.md
@@ -51,6 +51,12 @@ If you wish, you can now run `makepkg` to ensure that your package actually buil
|
|||||||
==> Finished making: cargo-aur-bin 1.0.0-1 (Wed 10 Jun 2020 08:23:47 PM PDT)
|
==> Finished making: cargo-aur-bin 1.0.0-1 (Wed 10 Jun 2020 08:23:47 PM PDT)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You can also run `namcap` to verify your package doesn't have errors.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
> namcap *.zst
|
||||||
|
```
|
||||||
|
|
||||||
Notice that the built package itself is postfixed with `-bin`, which follows the
|
Notice that the built package itself is postfixed with `-bin`, which follows the
|
||||||
AUR standard.
|
AUR standard.
|
||||||
|
|
||||||
@@ -103,6 +109,28 @@ package() {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Custom commands within `package()`
|
||||||
|
|
||||||
|
The `custom` list can be used to add specific commands to the `package()`
|
||||||
|
function. This config:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[package.metadata.aur]
|
||||||
|
custom = ["echo hi"]
|
||||||
|
```
|
||||||
|
|
||||||
|
yields:
|
||||||
|
|
||||||
|
```
|
||||||
|
package() {
|
||||||
|
install -Dm755 cargo-aur -t "$pkgdir/usr/bin"
|
||||||
|
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||||
|
echo hi
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Note:** Caveat emptor. No attempt is made to verify the injected commands.
|
||||||
|
|
||||||
### Static Binaries
|
### Static Binaries
|
||||||
|
|
||||||
Run with `--musl` to produce a release binary that is statically linked via
|
Run with `--musl` to produce a release binary that is statically linked via
|
||||||
|
|||||||
@@ -164,4 +164,6 @@ pub struct AUR {
|
|||||||
optdepends: Vec<String>,
|
optdepends: Vec<String>,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub files: Vec<(PathBuf, PathBuf)>,
|
pub files: Vec<(PathBuf, PathBuf)>,
|
||||||
|
#[serde(default)]
|
||||||
|
pub custom: Vec<String>,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,6 +45,9 @@ struct Args {
|
|||||||
musl: bool,
|
musl: bool,
|
||||||
/// Don't actually build anything.
|
/// Don't actually build anything.
|
||||||
dryrun: bool,
|
dryrun: bool,
|
||||||
|
/// Absorbs any extra junk arguments.
|
||||||
|
#[options(free)]
|
||||||
|
free: Vec<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, Debug)]
|
#[derive(Deserialize, Debug)]
|
||||||
@@ -250,6 +253,10 @@ where
|
|||||||
)?;
|
)?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for custom in aur.custom.iter() {
|
||||||
|
writeln!(file, " {}", custom)?;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
writeln!(file, "}}")?;
|
writeln!(file, "}}")?;
|
||||||
|
|||||||
Reference in New Issue
Block a user