Skip to content

Commit

Permalink
add: rust-bindgen-git (#6410)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Elsie <[email protected]>
  • Loading branch information
3 people authored Oct 22, 2024
1 parent d42b272 commit 2cb2e30
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 0 deletions.
1 change: 1 addition & 0 deletions packagelist
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@ rpcs3-app
rsbbi-git
rstudio-deb
rust-bin
rust-bindgen-git
rust-motd-deb
rustdesk-deb
schildichat-deb
Expand Down
14 changes: 14 additions & 0 deletions packages/rust-bindgen-git/.SRCINFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pkgbase = rust-bindgen-git
gives = bindgen
pkgver = 0.70.1
pkgdesc = Binding generator for rust language
url = https://github.com/rust-lang-nursery/rust-bindgen
arch = i686
arch = x86_64
depends = clang
pacdeps = rust-bin
maintainer = davius <[email protected]>
source = https://github.com/rust-lang-nursery/rust-bindgen.git
sha512sums = SKIP

pkgname = rust-bindgen-git
47 changes: 47 additions & 0 deletions packages/rust-bindgen-git/rust-bindgen-git.pacscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
pkgname="rust-bindgen-git"
gives="bindgen"
pkgver="0.70.1"
pkgdesc="Binding generator for rust language"
arch=('i686' 'x86_64')
url='https://github.com/rust-lang-nursery/rust-bindgen'
pacdeps=('rust-bin')
depends=('clang')
source=("https://github.com/rust-lang-nursery/rust-bindgen.git")
sha512sums=('SKIP')
maintainer=("davius <[email protected]>")
external_connection=true

prepare() {
cd "${srcdir}/rust-bindgen"
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
mkdir -p completions
}

build() {
cd "${srcdir}/rust-bindgen"
cargo build --release

local _completion="target/release/${gives} --generate-shell-completions"
${_completion} bash > "completions/${gives}"
${_completion} fish > "completions/${gives}.fish"
${_completion} zsh > "completions/_${gives}"

}

package() {
cd "${srcdir}/rust-bindgen"

install -D "target/release/bindgen" "${pkgdir}/usr/bin/bindgen"
install -Dm664 "completions/${gives}" -t "${pkgdir}/usr/share/bash-completion/completions/"
install -Dm664 "completions/${gives}.fish" -t "${pkgdir}/usr/share/fish/vendor_completions.d/"
install -Dm664 "completions/_${gives}" -t "${pkgdir}/usr/share/zsh/site-functions/"

cd "${srcdir}/rust-bindgen/target/release/"

libbindgen=$(ls libbindgen*.rlib)
# shellcheck disable=SC2068
for i in ${libbindgen[@]}; do
install -D "${i}" "${pkgdir}/usr/lib/${i}"
done

}
15 changes: 15 additions & 0 deletions srclist
Original file line number Diff line number Diff line change
Expand Up @@ -9223,6 +9223,21 @@ pkgbase = rust-bin

pkgname = rust-bin
---
pkgbase = rust-bindgen-git
gives = bindgen
pkgver = 0.70.1
pkgdesc = Binding generator for rust language
url = https://github.com/rust-lang-nursery/rust-bindgen
arch = i686
arch = x86_64
depends = clang
pacdeps = rust-bin
maintainer = davius <[email protected]>
source = https://github.com/rust-lang-nursery/rust-bindgen.git
sha512sums = SKIP

pkgname = rust-bindgen-git
---
pkgbase = rust-motd-deb
gives = rust-motd
pkgver = 1.0.1
Expand Down

0 comments on commit 2cb2e30

Please sign in to comment.