Files
BMLFS/build-scripts/cbindgen.build
2023-11-20 14:45:41 -06:00

44 lines
1.4 KiB
Bash

#! /bin/bash
# Cbindgen
# Source: https://github.com/mozilla/cbindgen/archive/v0.26.0/cbindgen-0.26.0.tar.gz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: rustc cargo
# Recommended: NONE
# Optional: NONE
#read -p "Compile?" && cargo build --release --locked --verbose &&
cargo build --release
sudo -S mkdir -pv ${BUILD}/usr/bin &&
sudo -S install -Dm0755 target/release/cbindgen -t ${BUILD}/usr/bin &&
cd $BUILD && sudo -S mkdir -v ${BUILD}/install &&
cat > /tmp/slack-desc << "EOF"
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
cbindgen: Cbindgen
cbindgen:
cbindgen: cbindgen creates C/C++11 headers for Rust libraries which expose a
cbindgen: public C API.
cbindgen:
cbindgen: Homepage: https://github.com/eqrion/cbindgen
cbindgen:
cbindgen:
cbindgen:
cbindgen:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/cbindgen-0.26.0-$PSUFFIX &&
sudo -S rm -rf ${BUILD}/*