diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ce635eb --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/gettid-0.1.2.crate diff --git a/gettid-fix-metadata-auto.diff b/gettid-fix-metadata-auto.diff new file mode 100644 index 0000000..ed1a4f5 --- /dev/null +++ b/gettid-fix-metadata-auto.diff @@ -0,0 +1,9 @@ +--- gettid-0.1.2/Cargo.toml 2020-06-25T01:35:16+00:00 ++++ gettid-0.1.2/Cargo.toml 2020-06-25T01:35:16+00:00 +@@ -23,6 +23,3 @@ + repository = "https://github.com/jmgao/gettid" + [target."cfg(unix)".dependencies.libc] + version = "0.2" +-[target."cfg(windows)".dependencies.winapi] +-version = "0.3" +-features = ["processthreadsapi"] diff --git a/rust-gettid.spec b/rust-gettid.spec new file mode 100644 index 0000000..89a28b0 --- /dev/null +++ b/rust-gettid.spec @@ -0,0 +1,69 @@ +# Generated by rust2rpm 23 +%bcond_without check +%global debug_package %{nil} + +%global crate gettid + +Name: rust-gettid +Version: 0.1.2 +Release: %autorelease +Summary: Helper to get an integer ID for the current thread + +License: 0BSD +URL: https://crates.io/crates/gettid +Source: %{crates_source} +# Automatically generated patch to strip foreign dependencies +Patch: gettid-fix-metadata-auto.diff + +BuildRequires: rust-packaging >= 21 + +%global _description %{expand: +Helper to get an integer ID for the current thread.} + +%description %{_description} + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel %{_description} + +This package contains library source intended for building other packages which +use the "%{crate}" crate. + +%files devel +%license %{crate_instdir}/LICENSE +%{crate_instdir}/ + +%package -n %{name}+default-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+default-devel %{_description} + +This package contains library source intended for building other packages which +use the "default" feature of the "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{crate_instdir}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version_no_tilde} -p1 +%cargo_prep + +%generate_buildrequires +%cargo_generate_buildrequires + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +%autochangelog diff --git a/sources b/sources new file mode 100644 index 0000000..92aecfe --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (gettid-0.1.2.crate) = 273df52096bf91f640bb527720f2b715d602b101ad0e58b89ca5852cf70ad1961f3a6fb1ca999ab2d84e0202bef79229f6e9274b38b5509506c216d08094746b