diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4e38a08 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/munge_macro-0.4.1.crate diff --git a/rust-munge_macro.rpmlintrc b/rust-munge_macro.rpmlintrc new file mode 100644 index 0000000..6141190 --- /dev/null +++ b/rust-munge_macro.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_macro.spec b/rust-munge_macro.spec new file mode 100644 index 0000000..83598e0 --- /dev/null +++ b/rust-munge_macro.spec @@ -0,0 +1,71 @@ +# Generated by rust2rpm 26 +%bcond_without check +%global debug_package %{nil} + +%global crate munge_macro + +Name: rust-munge_macro +Version: 0.4.1 +Release: %autorelease +Summary: Macro for custom destructuring + +License: MIT +URL: https://crates.io/crates/munge_macro +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 +%{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. +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..51c8bae --- /dev/null +++ b/rust2rpm.toml @@ -0,0 +1,10 @@ +[requires] +build = [ + "dos2unix", +] + +[scripts.prep] +pre = [ + "# The crate has a mixture of newline styles.", + "find . -type f | xargs -r -t dos2unix --keepdate", +] diff --git a/sources b/sources new file mode 100644 index 0000000..b3bfc91 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (munge_macro-0.4.1.crate) = 6a9347e25df5589528abe42bf65768d4c6efefaccc45924193679762a8ddfc1b310ae8d458193587e1b4a84ccb28e92f1ab4d526c5853463dfbe319f41724e1c