GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Unverified Commit a5471ba2 authored by Georg Koppen's avatar Georg Koppen Committed by Matthew Finkel
Browse files

Bug 40156: Add uniffi-rs for application-services

parent fd0d37dc
#!/bin/bash
[% c("var/set_default_env") -%]
distdir=/var/tmp/dist
builddir=/var/tmp/build/[% project %]
mkdir -p $distdir/[% project %]
tar -C $distdir -xf $rootdir/[% c('input_files_by_name/rust') %]
export PATH="/var/tmp/dist/rust/bin:$PATH"
mkdir -p /var/tmp/build
tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
# Now prepare the offline build
# Move the directory for hardcoding the path in .cargo/config
mv /var/tmp/build/[% project %]-[% c('version') %] $builddir
tar -C $builddir -xjf uniffi-rs-vendor-[% c('version') %].tar.bz2
cd $builddir
mkdir .cargo
cat > .cargo/config << 'EOF'
[source.crates-io]
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "/var/tmp/build/uniffi-rs/vendor"
EOF
# We usually use --frozen but there is no Cargo.lock file available. Thus resort
# to --offline.
cargo build --release --offline --target x86_64-unknown-linux-gnu
mv target/x86_64-unknown-linux-gnu/release/uniffi-bindgen $distdir/[% project %]
cd $distdir
[% c('tar', {
tar_src => [ project ],
tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
}) %]
# vim: filetype=yaml sw=2
version: 0.5.0
git_url: https://github.com/mozilla/uniffi-rs
git_hash: bc4a8570ab8430a4f80c3722ef79ff9a4819969e
filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz'
var:
container:
use_container: 1
input_files:
- project: container-image
- name: rust
project: rust
# `cargo vendor vendor` in the `uniffi-rs` directory has vendored the sources.
- URL: https://people.torproject.org/~gk/mirrors/sources/uniffi-rs-vendor-[% c('version') %].tar.bz2
sha256sum: 71d912237208c35a762b3c812afe0a758823792dd745c1253314bcccc1694b7f
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment