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=22cd7afa38b0f60a0b326d1810f1c48204972946d3bf2d2ed6e3feb79e10d554
|
|
$(package)_git_commit=fefa46b4c4f2815819e0c7f2d1771239596ea450
|
|
$(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
|