diff --git a/README.md b/README.md deleted file mode 100644 index 8f17e49..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-onig_sys - -The rust-onig_sys package \ No newline at end of file diff --git a/onig_sys-fix-metadata.diff b/onig_sys-fix-metadata.diff index d861bde..9a6dcf9 100644 --- a/onig_sys-fix-metadata.diff +++ b/onig_sys-fix-metadata.diff @@ -1,6 +1,12 @@ --- onig_sys-69.8.1/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ onig_sys-69.8.1/Cargo.toml 2023-04-12T12:14:30.588379+00:00 -@@ -35,9 +35,8 @@ ++++ onig_sys-69.8.1/Cargo.toml 2024-09-14T12:38:07.946784+00:00 +@@ -29,15 +29,13 @@ + instead check out the `onig` crate. + """ + documentation = "http://rust-onig.github.io/rust-onig/onig_sys/" +-readme = "README.md" + categories = ["external-ffi-bindings"] + license = "MIT" repository = "http://github.com/iwillspeak/rust-onig" [build-dependencies.bindgen] @@ -11,7 +17,7 @@ [build-dependencies.cc] version = "1.0" -@@ -46,6 +45,7 @@ +@@ -46,6 +44,7 @@ version = "^0.3.16" [features] diff --git a/rust-onig_sys.spec b/rust-onig_sys.spec index 84c7af8..05013d0 100644 --- a/rust-onig_sys.spec +++ b/rust-onig_sys.spec @@ -1,4 +1,4 @@ -# Generated by rust2rpm 24 +# Generated by rust2rpm 26 %bcond_without check %global debug_package %{nil} @@ -14,11 +14,13 @@ URL: https://crates.io/crates/onig_sys Source: %{crates_source} # Manually created patch for downstream crate metadata changes # * bump bindgen build-dependency from 0.59 to 0.63 +# * remove reference to readme file that is not included in published crates Patch: onig_sys-fix-metadata.diff # * unconditionally use bindgen and dynamic linking with pkg-config -Patch: 0001-Unconditionally-use-bindgen-and-dynamic-linking-with.patch +Patch1: 0001-Unconditionally-use-bindgen-and-dynamic-linking-with.patch -BuildRequires: rust-packaging >= 21 +BuildRequires: cargo-rpm-macros >= 24 +BuildRequires: pkgconfig(oniguruma) >= 6.8.0 %global _description %{expand: The `onig_sys` crate contains raw rust bindings to the oniguruma @@ -104,14 +106,13 @@ use the "print-debug" feature of the "%{crate}" crate. %ghost %{crate_instdir}/Cargo.toml %prep -%autosetup -n %{crate}-%{version_no_tilde} -p1 +%autosetup -n %{crate}-%{version} -p1 +%cargo_prep # remove bundled oniguruma sources rm -r oniguruma/ -%cargo_prep %generate_buildrequires %cargo_generate_buildrequires -echo 'pkgconfig(oniguruma) >= 6.8.0' %build %cargo_build diff --git a/rust2rpm.conf b/rust2rpm.conf deleted file mode 100644 index 5cbd7ed..0000000 --- a/rust2rpm.conf +++ /dev/null @@ -1,5 +0,0 @@ -[DEFAULT] -buildrequires = - pkgconfig(oniguruma) >= 6.8.0 -lib.requires = - pkgconfig(oniguruma) >= 6.8.0 diff --git a/rust2rpm.toml b/rust2rpm.toml new file mode 100644 index 0000000..3ae713a --- /dev/null +++ b/rust2rpm.toml @@ -0,0 +1,26 @@ +[package] +summary = "Rust bindings for oniguruma" +cargo-toml-patch-comments = [ + "bump bindgen build-dependency from 0.59 to 0.63", + "remove reference to readme file that is not included in published crates", +] + +[[package.extra-patches]] +number = 1 +file = "0001-Unconditionally-use-bindgen-and-dynamic-linking-with.patch" +comments = ["unconditionally use bindgen and dynamic linking with pkg-config"] + +[requires] +build = [ + "pkgconfig(oniguruma) >= 6.8.0", +] +lib = [ + "pkgconfig(oniguruma) >= 6.8.0", +] + +[scripts] +prep.post = [ + "# remove bundled oniguruma sources", + "rm -r oniguruma/", +] +