26 lines
1.0 KiB
Makefile
26 lines
1.0 KiB
Makefile
package=librustzcash
|
|
$(package)_version=0.1
|
|
$(package)_download_path=https://github.com/zcash/$(package)/archive/
|
|
$(package)_file_name=$(package)-$($(package)_git_commit).tar.gz
|
|
$(package)_download_file=$($(package)_git_commit).tar.gz
|
|
$(package)_sha256_hash=b63ba98d569d332764f27706038c04d03ac7e2c836dc15dc4eaa24b04b8c7f4a
|
|
$(package)_git_commit=6cc1813ae3bb1e42224fd8ca0a8977b95c576738
|
|
$(package)_dependencies=rust $(rust_crates)
|
|
$(package)_patches=cargo.config
|
|
|
|
define $(package)_preprocess_cmds
|
|
mkdir .cargo && \
|
|
cat $($(package)_patch_dir)/cargo.config | sed 's|CRATE_REGISTRY|$(host_prefix)/$(CRATE_REGISTRY)|' > .cargo/config
|
|
endef
|
|
|
|
define $(package)_build_cmds
|
|
cargo build --frozen --release
|
|
endef
|
|
|
|
define $(package)_stage_cmds
|
|
mkdir $($(package)_staging_dir)$(host_prefix)/lib/ && \
|
|
mkdir $($(package)_staging_dir)$(host_prefix)/include/ && \
|
|
cp target/release/librustzcash.a $($(package)_staging_dir)$(host_prefix)/lib/ && \
|
|
cp include/librustzcash.h $($(package)_staging_dir)$(host_prefix)/include/
|
|
endef
|