diff --git a/device-mapper-persistent-data.spec b/device-mapper-persistent-data.spec index a84fdd3..66e68b2 100644 --- a/device-mapper-persistent-data.spec +++ b/device-mapper-persistent-data.spec @@ -2,7 +2,7 @@ # Copyright (C) 2011-2017 Red Hat, Inc # %bcond_without check -%global debug_package %{nil} +#%%global debug_package %%{nil} #%%global version_suffix -rc2 #%%global release_suffix .test3 @@ -10,7 +10,7 @@ Summary: Device-mapper Persistent Data Tools Name: device-mapper-persistent-data Version: 1.0.9 -Release: 3%{?dist}%{?release_suffix} +Release: 3%{?dist}%{?release_suffix}.1 License: GPLv3+ URL: https://github.com/jthornber/thin-provisioning-tools #Source0: https://github.com/jthornber/thin-provisioning-tools/archive/thin-provisioning-tools-%%{version}.tar.gz @@ -48,15 +48,53 @@ snapshot eras #%%cargo_prep #%%cargo_generate_buildrequires tar xf %{SOURCE1} -mkdir -p .cargo -cat > .cargo/config < .cargo/config.toml << EOF +[build] +rustc = "%{__rustc}" +rustdoc = "%{__rustdoc}" +[profile.rpm] +inherits = "release" +opt-level = 3 # %%{rustflags_opt_level} +codegen-units = 1 # %%{rustflags_codegen_units} +debug = 2 # %%{rustflags_debuginfo} +strip = "none" + +[env] +CFLAGS = "%{build_cflags}" +CXXFLAGS = "%{build_cxxflags}" +LDFLAGS = "%{build_ldflags}" + +[install] +root = "%{buildroot}%{_prefix}" + +[term] +verbose = true + +[net] +offline = true + +EOF +cat >> .cargo/config.toml << EOF [source.vendored-sources] directory = "vendor" -END +[source.crates-io] +registry = "https://crates.io" +replace-with = "vendored-sources" + +EOF +%{__rm} -f Cargo.toml.orig +cat .cargo/config.toml +) + echo %{version}-%{release} > VERSION %generate_buildrequires @@ -73,7 +111,7 @@ RUST_BACKTRACE=1 %%cargo_test -- --nocapture --test-threads=1 || true %endif %install -make DESTDIR=%{buildroot} MANDIR=%{_mandir} install +%make_install MANDIR=%{_mandir} STRIP=true %files %doc COPYING README.md