Files
BMLFS/build-scripts/cbindgen.build
2022-04-05 13:05:03 -05:00

45 lines
1.4 KiB
Bash

#! /bin/bash
# Cbindgen
# Source: https://github.com/eqrion/cbindgen/archive/v0.21.0/cbindgen-0.21.0.tar.gz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: rustc
# Recommended: NONE
# Optional: NONE
# Builds with rustc 1.59.0 (9d1b2106e 2022-02-23), from rustup
read -p "Compile?" && cargo build --release --locked --verbose &&
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.15.0-$(uname -m)-mlfs.txz &&
sudo -S rm -rf ${BUILD}/*