diff --git a/.gitignore b/.gitignore index 5cd77ea..7c8042a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /cbindgen-0.6.1.crate /cbindgen-0.6.3.crate /cbindgen-0.6.4.crate +/cbindgen-0.6.6.crate diff --git a/cbindgen-test-release.patch b/cbindgen-test-release.patch new file mode 100644 index 0000000..11d41cd --- /dev/null +++ b/cbindgen-test-release.patch @@ -0,0 +1,18 @@ +--- cbindgen-0.6.6/test.py.orig 2018-05-31 09:03:09.000000000 -0700 ++++ cbindgen-0.6.6/test.py 2018-10-22 15:21:50.222301880 -0700 +@@ -8,13 +8,13 @@ import filecmp + + def build_cbindgen(): + try: +- subprocess.check_output(["cargo", "build"]) ++ subprocess.check_output(["cargo", "build", "--release"]) + return True + except subprocess.CalledProcessError: + return False + + def cbindgen(path, out, c, style, verify): +- bin = ["target/debug/cbindgen"] ++ bin = ["target/release/cbindgen"] + compile = [path, "-o", out] + flags = [] + diff --git a/rust-cbindgen.spec b/rust-cbindgen.spec index e6238c8..8462e56 100644 --- a/rust-cbindgen.spec +++ b/rust-cbindgen.spec @@ -4,7 +4,7 @@ %global crate cbindgen Name: rust-%{crate} -Version: 0.6.4 +Version: 0.6.6 Release: 1%{?dist} Summary: Tool for generating C bindings to Rust code @@ -13,6 +13,9 @@ License: MPLv2.0 URL: https://crates.io/crates/cbindgen Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +# Run tests with the release binaries +Patch1: cbindgen-test-release.patch + ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging @@ -25,6 +28,11 @@ BuildRequires: (crate(serde_json) >= 1.0.0 with crate(serde_json) < 2.0.0) BuildRequires: ((crate(syn) >= 0.14.0 with crate(syn) < 0.15.0) with crate(syn/clone-impls) with crate(syn/derive) with crate(syn/extra-traits) with crate(syn/full) with crate(syn/parsing) with crate(syn/printing)) BuildRequires: (crate(tempfile) >= 3.0.0 with crate(tempfile) < 4.0.0) BuildRequires: (crate(toml) >= 0.4.0 with crate(toml) < 0.5.0) +BuildRequires: /usr/bin/pathfix.py +%if %{with check} +BuildRequires: python3 +BuildRequires: gcc-c++ +%endif %description %{summary}. @@ -48,6 +56,7 @@ which use %{crate} from crates.io. %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep +pathfix.py -pni "%{__python3} %{py3_shbang_opts}" test.py %build %cargo_build @@ -58,6 +67,7 @@ which use %{crate} from crates.io. %if %{with check} %check %cargo_test +./test.py -v %endif %files -n %{crate} @@ -71,6 +81,9 @@ which use %{crate} from crates.io. %{cargo_registry}/%{crate}-%{version}/ %changelog +* Mon Oct 22 2018 Josh Stone - 0.6.6-1 +- Update to 0.6.6 + * Thu Oct 04 2018 Josh Stone - 0.6.4-1 - Update to 0.6.4 diff --git a/sources b/sources index 67f4ddf..145834e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cbindgen-0.6.4.crate) = 652fbf20b0a33d8b5414f2aaca815f813795c7d1da16636c1437603f51b08fac9e289b0367d79274c8318966ba069fb68cdd15b4b7345b1034f9ab440c6b3a8e +SHA512 (cbindgen-0.6.6.crate) = d51d17765d705424dead65e4240c52fe93da731d5ac1cc76fe79e2eb68a42c26a7de58b08149cccd6806ee5bb189df8c15c3a532a5f857a65c2fd69c656d7137