mirror of
https://github.com/ivabus/pantry
synced 2024-11-29 19:55:06 +03:00
eaf5f19362
closes #4727
57 lines
1.4 KiB
YAML
57 lines
1.4 KiB
YAML
distributable:
|
|
url: https://github.com/bjorn/raccoin/archive/refs/tags/v{{ version }}.tar.gz
|
|
strip-components: 1
|
|
|
|
provides:
|
|
- bin/raccoin
|
|
|
|
dependencies:
|
|
gnu.org/libiconv: ^1
|
|
openssl.org: ^1.1
|
|
|
|
versions:
|
|
github: bjorn/raccoin
|
|
strip: /v/
|
|
|
|
build:
|
|
dependencies:
|
|
rust-lang.org: '>=1.56'
|
|
rust-lang.org/cargo: '*'
|
|
script:
|
|
# raccoin doesn't provide any testability without
|
|
# a UI, so we add some
|
|
- run: |
|
|
sed -i \
|
|
-e'1a\
|
|
const VERSION: &str = "{{version}}";' \
|
|
main.rs
|
|
working-directory: src
|
|
- run: |
|
|
sed -i \
|
|
-e'/let portfolio_file: PathBuf = portfolio_file.into();/i\
|
|
if portfolio_file == "--version" {\
|
|
println!("raccoin v{VERSION}");\
|
|
return Ok(());\
|
|
}' \
|
|
main.rs
|
|
if: '<0.2.0'
|
|
working-directory: src
|
|
- run: |
|
|
sed -i \
|
|
-e'/let Some(portfolio_file)/i\
|
|
if let Some(arg1) = env::args_os().nth(1) {\
|
|
if arg1 == "--version" {\
|
|
println!("raccoin v{VERSION}");\
|
|
return Ok(());\
|
|
}\
|
|
}' \
|
|
main.rs
|
|
if: '>=0.2.0'
|
|
working-directory: src
|
|
|
|
- cargo install --locked --path . --root {{prefix}}
|
|
env:
|
|
linux:
|
|
LD: clang
|
|
|
|
test: test "$(raccoin --version)" = "raccoin v{{version}}"
|