diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..51687a4 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/munge-0.4.1.crate diff --git a/rust-munge.rpmlintrc b/rust-munge.rpmlintrc new file mode 100644 index 0000000..6141190 --- /dev/null +++ b/rust-munge.rpmlintrc @@ -0,0 +1,4 @@ +# Feature metapackages are not supposed to have documentation! +addFilter(r"\+[-_\w]+-devel.noarch: W: no-documentation") +# Not a real spelling error +addFilter(r"spelling-error \('[Dd]estructuring',") diff --git a/rust-munge.spec b/rust-munge.spec new file mode 100644 index 0000000..467b54f --- /dev/null +++ b/rust-munge.spec @@ -0,0 +1,73 @@ +# Generated by rust2rpm 26 +%bcond_without check +%global debug_package %{nil} + +%global crate munge + +Name: rust-munge +Version: 0.4.1 +Release: %autorelease +Summary: Macro for custom destructuring + +License: MIT +URL: https://crates.io/crates/munge +Source: %{crates_source} + +BuildRequires: cargo-rpm-macros >= 24 +BuildRequires: dos2unix + +%global _description %{expand: +Macro for custom destructuring.} + +%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 +%doc %{crate_instdir}/README.md +%doc %{crate_instdir}/example.md +%{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} -p1 +# The crate has a mixture of newline styles. +# https://github.com/djkoloski/munge/pull/5 +find . -type f | xargs -r -t dos2unix --keepdate +%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/rust2rpm.toml b/rust2rpm.toml new file mode 100644 index 0000000..f367c8f --- /dev/null +++ b/rust2rpm.toml @@ -0,0 +1,11 @@ +[requires] +build = [ + "dos2unix", +] + +[scripts.prep] +pre = [ + "# The crate has a mixture of newline styles.", + "# https://github.com/djkoloski/munge/pull/5", + "find . -type f | xargs -r -t dos2unix --keepdate", +] diff --git a/sources b/sources new file mode 100644 index 0000000..c23134d --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (munge-0.4.1.crate) = 861f95d05d14812f553f942e2ba4cd1231d5671212d658c3fa7f7eed3515b82ddf4e2501028680af81576fb2bbc1831e0f8a63fecfa9c4624669c297e2536f04