Commit graph

21 commits

Author SHA1 Message Date
Igor Gnatenko
2cac5e5ad5
split features into subpackages
References: https://discussion.fedoraproject.org/t/rfc-new-crates-packaging-design-features-have-their-own-subpackages/563?u=ignatenkobrain
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-11-03 21:45:04 +01:00
Igor Gnatenko
80237720ae
macros: remove support for target-dir
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-06-22 21:53:09 +02:00
Igor Gnatenko
c9ce952e26
macros: make %cargo_* macros parametric
Unfortunately cargo-install doesn't accept --target-dir, so have to pass
setting through envvar.

Also %{shrink:…} them so it looks nicer in build log.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-06-22 21:05:42 +02:00
Igor Gnatenko
c5bab762f5 macros: pass %__cargo_common_opts to %cargo_install
Reason this has not been done before is that cargo-install doesn't
understand --release. Let's just add it to other commands and be done
with it.

Reported-by: Josh Stone <jistone@redhat.com>
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-20 22:08:02 +01:00
Igor Gnatenko
cd63296353 macros: remove spurious whitespace
Fixes: https://pagure.io/fedora-rust/rust2rpm/issue/48
Reported-by: Josh Stone <jistone@redhat.com>
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-01-09 06:52:36 +01:00
Igor Gnatenko
5313b35271 macros: remove Cargo.lock
cargo-package automatically strips it out, but we package also some
things directly from git.

Acked-by: Josh Stone <jistone@redhat.com>
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-01-09 00:00:04 +01:00
Igor Gnatenko
09a434b55a make 'rlib' first-class citizen
Fixes: https://pagure.io/fedora-rust/rust2rpm/issue/47
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-01-08 19:09:54 +01:00
Igor Gnatenko
4b31b3e594 macros: search for whole string
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-01-08 19:09:10 +01:00
Igor Gnatenko
47b6c3ef80 macros.crago: pass --no-fail-fast
It is quite useful to see all failing tests instead of few of first.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
Reviewed-by: Josh Stone <jistone@redhat.com>
2017-12-05 13:03:41 +01:00
Igor Gnatenko
59809d4940 use cp instead of install
We want to preserve original modes and so on.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-11-04 15:32:39 +01:00
Martin Sehnoutka
2c556e1473 macros: explicitly set rustdoc
On systems where rustup is used, simple rpmbuild will use rustc from system,
but rustdoc will be taken from PATH which might be different from system.
Given this, doc-tests or anything related to rustdoc will fail with mis-mathching
rustc version.

Merges: https://pagure.io/fedora-rust/rust2rpm/pull-request/38
2017-06-23 13:41:42 +02:00
Igor Gnatenko
cce3d7bc92 macros: switch to /usr/share/cargo/registry
We should not be using /usr/src because that one is supposed to be used for
"Source code may be placed in this subdirectory, only for reference purposes".

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-06-20 23:10:28 +02:00
Igor Gnatenko
a254693cde Revert "macros: move Cargo.toml.orig inplace"
Somehow this doesn't really work. No time for investigation.

This reverts commit fc12436f25.
2017-02-25 21:51:08 +01:00
Igor Gnatenko
86d06ae613 macros: strip all dev-dependencies sections
Even [dev-dependencies.foo].

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-02-25 21:45:24 +01:00
Igor Gnatenko
fc12436f25 macros: move Cargo.toml.orig inplace
cargo package -l lists Cargo.toml.orig and we're installing it anyway,
so let's just do mv -f instead of doing new install.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-02-25 19:21:40 +01:00
Igor Gnatenko
e834debc6a add support for proc-macro kind
Closes: https://pagure.io/fedora-rust/rust2rpm/issue/19
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-02-18 19:53:08 +01:00
Igor Gnatenko
d4334a2ee7 macros: automatically strip dev-dependencies
All background written in upstream cargo GitHub issue[0].

In short, cargo build/install enforces us to have all dev-dependencies
even they are not used for building/installed.

[0] https://github.com/rust-lang/cargo/issues/3732

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-02-18 16:10:50 +01:00
Igor Gnatenko
ee68fab15b macros: don't define %cargo_build/test as functions
There are only problems from this.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-02-18 02:25:21 +01:00
Igor Gnatenko
2fbb50e1dc distribute rust2rpm in PyPI via setuptools
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-02-12 11:35:45 +01:00
Igor Gnatenko
c12df7d085 %cargo_install is now smart to handle libs and bins
So far we had %cargo_install (for binaries) and %cargo_install_crate
(for libraries) which is a bit awkward and requires us to put
additional arguments for latter one.

We can do all the magic behind the scene.

Closes: https://pagure.io/fedora-rust/rust2rpm/issue/7
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-02-10 22:17:45 +01:00
Igor Gnatenko
74beb9388f move RPM stuff into subdirectory
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-02-05 18:15:28 +01:00
Renamed from macros.cargo (Browse further)