[packages/rust-cbindgen] up to 0.24.3

atler atler at pld-linux.org
Tue Jul 26 21:26:10 CEST 2022


commit cdfdca7f7ead5505686a89798bd0dde00b189672
Author: Jan Palus <atler at pld-linux.org>
Date:   Tue Jul 26 21:25:53 2022 +0200

    up to 0.24.3

 create-crates.sh   | 72 ------------------------------------------------------
 rust-cbindgen.spec |  8 +++---
 2 files changed, 4 insertions(+), 76 deletions(-)
---
diff --git a/rust-cbindgen.spec b/rust-cbindgen.spec
index 950d1a4..4e20d6e 100644
--- a/rust-cbindgen.spec
+++ b/rust-cbindgen.spec
@@ -1,22 +1,22 @@
 # TODO: use shared crates?
-%define		crates_ver	0.23.0
+%define		crates_ver	0.24.3
 
 Summary:	Tool for generating C bindings to Rust code
 Summary(pl.UTF-8):	Narzędzie do generowania wiązań C do kodu w języku Rust
 Name:		rust-cbindgen
-Version:	0.23.0
+Version:	0.24.3
 Release:	1
 License:	MPL v2.0
 Group:		Development/Tools
 #Source0Download: https://github.com/eqrion/cbindgen/releases
 Source0:	https://github.com/eqrion/cbindgen/archive/v%{version}/cbindgen-%{version}.tar.gz
-# Source0-md5:	60f7d909a91c4740af08ca5fa1f049c3
+# Source0-md5:	6aa2991ca8411f9ebf9961e8b873e884
 # cd cbindgen-%{version}
 # cargo vendor
 # cd ..
 # tar cJf cbindgen-crates-%{version}.tar.xz cbindgen-%{version}/{vendor,Cargo.lock}
 Source1:	cbindgen-crates-%{crates_ver}.tar.xz
-# Source1-md5:	64201f007216216ed798474f829c7143
+# Source1-md5:	3e65be492423019a5de8fc1f3844cfd2
 URL:		https://github.com/eqrion/cbindgen
 BuildRequires:	cargo
 BuildRequires:	rpmbuild(macros) >= 2.004
diff --git a/create-crates.sh b/create-crates.sh
deleted file mode 100755
index f74b258..0000000
--- a/create-crates.sh
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/bin/sh
-
-force_cargo_package="cbindgen"
-force_source_name="cbindgen"
-
-for cmd in bsdtar rpm-specdump cargo perl; do
-  if ! command -v $cmd > /dev/null 2> /dev/null; then
-    not_installed="$not_installed$cmd "
-  fi
-done
-
-if [ -n "$not_installed" ]; then
-  echo "ERROR: required commands not found: $not_installed" >&2
-  exit 1
-fi
-
-pkg_dir=$(readlink -f $(dirname "$0"))
-pkg_name=$(basename "$pkg_dir")
-
-if [ ! -f "$pkg_dir/$pkg_name.spec" ]; then
-  echo "ERROR: unable to determine package name" >&2
-  exit 1
-fi
-
-spec_dump=$(rpm-specdump "$pkg_dir/$pkg_name.spec")
-pkg_version=$(echo "$spec_dump" | grep PACKAGE_VERSION | cut -f3 -d' ')
-pkg_src=$(basename $(echo "$spec_dump" | grep SOURCEURL0 | cut -f3- -d' '))
-crates_file="${force_source_name:-$pkg_name}-crates-$pkg_version.tar.xz"
-cargo_package=${force_cargo_package:-$pkg_name}
-
-if [ -e "$pkg_dir/$crates_file" ]; then
-  echo "ERROR: crates file $crates_file already exists" >&2
-  exit 1
-fi
-
-if [ ! -f "$pkg_dir/$pkg_src" ]; then
-  echo "ERROR: source file $pkg_src not found" >&2
-  exit 1
-fi
-
-tmpdir=$(mktemp -d)
-
-rm_tmpdir() {
-  if [ -n "$tmpdir" -a -d "$tmpdir" ]; then
-    rm -rf "$tmpdir"
-  fi
-}
-
-trap rm_tmpdir EXIT INT HUP
-
-cd "$tmpdir"
-bsdtar xf "$pkg_dir/$pkg_src"
-src_dir=$(ls)
-if [ $(echo "$src_dir" | wc -l) -ne 1 ]; then
-  echo "ERROR: unexpected source structure:\n$src_dir" >&2
-  exit 1
-fi
-
-cd "$src_dir"
-cargo vendor
-if [ $? -ne 0 ]; then
-  echo "ERROR: cargo vendor failed" >&2
-  exit 1
-fi
-
-# replace cargo package version with @@VERSION@@
-perl -pi -e 'BEGIN { undef $/;} s/(\[\[package\]\]\nname\s*=\s*"'"$cargo_package"'"\nversion\s*=\s*")[^"]+/$1\@\@VERSION\@\@/m' Cargo.lock
-
-cd ..
-tar cJf "$pkg_dir/$crates_file" "$src_dir"/{Cargo.lock,vendor}
-
-# vim: expandtab shiftwidth=2 tabstop=2
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rust-cbindgen.git/commitdiff/cdfdca7f7ead5505686a89798bd0dde00b189672



More information about the pld-cvs-commit mailing list