# Generated by rust2rpm 23 %bcond_without check %global crate selinux-cascade Name: rust-selinux-cascade Version: 0.0.2 Release: %autorelease -s 20230120155112 Summary: High Level Language for specifying SELinux policy License: MIT URL: https://crates.io/crates/selinux-cascade Source: %{crates_source} Source1: selinux-cascade-vendor.tar.gz BuildRequires: rust-packaging >= 21 BuildRequires: (crate(atty/default) >= 0.2.0 with crate(atty/default) < 0.3.0~) BuildRequires: (crate(backtrace/default) >= 0.3.0 with crate(backtrace/default) < 0.4.0~) # BuildRequires: (crate(clap/default) >= 4.0.0 with crate(clap/default) < 5.0.0~) # BuildRequires: (crate(clap/derive) >= 4.0.0 with crate(clap/derive) < 5.0.0~) # BuildRequires: (crate(clap_mangen/default) >= 0.2.0 with crate(clap_mangen/default) < 0.3.0~) BuildRequires: (crate(codespan-reporting/default) >= 0.11.0 with crate(codespan-reporting/default) < 0.12.0~) BuildRequires: (crate(flate2/default) >= 1.0.0 with crate(flate2/default) < 2.0.0~) BuildRequires: (crate(lalrpop-util/default) >= 0.19.0 with crate(lalrpop-util/default) < 0.20.0~) BuildRequires: (crate(lalrpop/default) >= 0.19.0 with crate(lalrpop/default) < 0.20.0~) # BuildRequires: (crate(quick-xml/default) >= 0.26.0 with crate(quick-xml/default) < 0.27.0~) BuildRequires: (crate(regex/default) >= 1.0.0 with crate(regex/default) < 2.0.0~) # BuildRequires: (crate(sexp/default) >= 1.1.0 with crate(sexp/default) < 2.0.0~) BuildRequires: (crate(tar/default) >= 0.4.0 with crate(tar/default) < 0.5.0~) BuildRequires: (crate(termcolor/default) >= 1.1.0 with crate(termcolor/default) < 2.0.0~) BuildRequires: (crate(thiserror/default) >= 1.0.0 with crate(thiserror/default) < 2.0.0~) BuildRequires: (crate(walkdir/default) >= 2.0.0 with crate(walkdir/default) < 3.0.0~) BuildRequires: (crate(strsim/default)) BuildRequires: (crate(heck/default)) BuildRequires: (crate(proc-macro-error/default)) BuildRequires: (crate(os_str_bytes/default)) BuildRequires: (crate(io-lifetimes/default)) BuildRequires: (crate(rustix/default)) %global _description %{expand: High Level Language for specifying SELinux policy.} %description %{_description} %package -n %{crate} Summary: %{summary} %description -n %{crate} %{_description} %files -n %{crate} %license LICENSE %doc CHANGELOG.md %doc README.md %doc ROADMAP.md %doc owners.txt %{_bindir}/audit2cascade %{_bindir}/casc %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}/CHANGELOG.md %doc %{crate_instdir}/README.md %doc %{crate_instdir}/ROADMAP.md %doc %{crate_instdir}/owners.txt %{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 %package -n %{name}-policies Summary: Demo and test Cascade policies BuildArch: noarch %description -n %{name}-policies Demo and test Cascade policies %files -n %{name}-policies %_datadir/cascade %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 %cargo_prep tar xfvz %{SOURCE1} cat >> .cargo/config << EOF [source.vendor] directory = "vendor" EOF sed -i 's/"local-registry"/"vendor"/' .cargo/config cat .cargo/config for i in /usr/share/cargo/registry/*; do ln -s $i vendor/; done %build %cargo_build %install %cargo_install mkdir -p %{buildroot}/%_datadir/cascade cp -r -p data/* %{buildroot}/%_datadir/cascade/ %changelog %autochangelog